[MEncoder-users] Terrible results with x264

Grozdan neutrino8 at gmail.com
Thu Dec 23 22:45:40 CET 2010


On Thu, Dec 23, 2010 at 10:28 PM, belcampo <belcampo at zonnet.nl> wrote:
> Grozdan wrote:
>>
>> On Thu, Dec 23, 2010 at 6:55 PM, belcampo <belcampo at zonnet.nl> wrote:
>>>
>>> Grozdan wrote:
>>>>
>>>> On Thu, Dec 23, 2010 at 2:13 PM, belcampo <belcampo at zonnet.nl> wrote:
>>>>>
>>>>> Joseph Miller wrote:
>>>>>>
>>>>>> On Wed, Dec 22, 2010 at 4:19 PM, Jason Cumiskey
>>>>>> <jason.cumiskey at gmail.com> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have just started using x264 to encode my dvds.  I am going for
>>>>>>> quality, not speed.  I am basing my -x264encopts off of the
>>>>>>> recommendations from
>>>>>>> http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html
>>>>>>>
>>>>>>> Here are the commands I issue (I am using 2 pass encode):
>>>>>>> mencoder -dvd-device /dev/dvd1 dvd://1 -alang eng -aid 128 -oac
>>>>>>> mp3lame
>>>>>>> -lameopts cbr:br=128:vol=7 -vf
>>>>>>> pullup,softskip,crop=704:480:10:0,hqdn3d=2:1:2,harddup -ovc x264
>>>>>>> -x264encopts
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> pass=1:bitrate=1400:subq=1:partitions=all:8x8dct:me=umh:frameref=1:bframes=3:b_pyramid=normal:weight_b:threads=auto
>>>>>>> -o movie.h264
>>>>>>>
>>>>>>> # Pass 2
>>>>>>> mencoder -dvd-device /dev/dvd1 dvd://1 -alang eng -aid 128 -oac
>>>>>>> mp3lame
>>>>>>> -lameopts cbr:br=128:vol=7 -vf
>>>>>>> pullup,softskip,crop=704:480:10:0,hqdn3d=2:1:2,harddup -ovc x264
>>>>>>> -x264encopts
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> pass=2:bitrate=1400:subq=6:partitions=all:8x8dct:me=umh:frameref=6:bframes=3:b_pyramid=normal:weight_b:threads=auto
>>>>>>> -o movie.h264
>>>>>>>
>>>>>>>
>>>>>>> On pass 2, I change subq to 6 and frameref to 6 (as recommended in
>>>>>>> the
>>>>>>> docs link above to speed up 1st pass and have higher quality for 2nd
>>>>>>> pass).Can anyone see anything obviously wrong in my command chain?
>>>>>>>  The
>>>>>>> resulting video is heavily pixelated and mplayer shows a bitrate of
>>>>>>> 0kbps.
>>>>>>>
>>>>> FYI. multi-pass does NOT add any quality, it's only usefull when you
>>>>> have
>>>>> a
>>>>> hard-limit of size to obey. If you need to put the result on a
>>>>> cd/usb-stick/DVD or something like that, then you can get max-quality
>>>>> given
>>>>> a fixed size.
>>>>> If that is not the case use a qp=16-26 for very good to very acceptable
>>>>> quality. You can leave out the bitrate when you choose Quality instead
>>>>> of
>>>>> Size.
>>>>>>
>>>>>> My experience has been that the bitrate option either doesn't work
>>>>>> very well, or I don't know how to use it.  Use qp=20 or so and you'll
>>>>>> get good quality.  I have just started using the presets as well and
>>>>>> preset=placebo gives very nice results.  Something like
>>>>>> qp=20:preset=placebo:pass=1 then switching to pass=3 for 2nd encoding
>>>>>> gives nice results and decent filesize.  I'm assuming that
>>>>>> preset=[veryslow|slower|slow] would probably also give good results.
>>>>>>
>>>>>> -Joseph
>>>>>> _______________________________________________
>>>>>> MEncoder-users mailing list
>>>>>> MEncoder-users at mplayerhq.hu
>>>>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>>>>
>>>>> _______________________________________________
>>>>> MEncoder-users mailing list
>>>>> MEncoder-users at mplayerhq.hu
>>>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>>>>
>>>> Why are you both recommending qp? How many times do experienced
>>>> encoders and the devs themselves need to mention that qp should NOT be
>>>> used since it's "very dumb" compared to crf, which is the preferred
>>>> option?
>>>
>>> I would like to learn how dumb I am. My observations:
>>> qp gives the most 'constant' quality, less quality variations than crf
>>> qp encodes 'significantly' faster than crf.
>>
>> Well, not to attack you or anything, but you're not very bright if you
>> couldn't get the sentence above where the "very dumb" appears...
>> Please re-read it again and think about whether it's about you or
>> whether it's about the mode itself... Wait, I'll answer it for you.
>>
>> IT'S ABOUT THE MODE ITSELF..... the qp mode is very dumb which means
>> it can't do "intelligent" decisions on how much bitrate to allocate or
>> not thus wasting where you could have come around with (much) lesser
>> bitrate and couldn't see the difference if you compared the crf with
>> the qp encode! The "very dumb" has absolutely nothing to do with you
>> but apparently it was too hard to see.
>>
>> And in the world of encoding, it's not only about "the most constant
>> quality". There's an equally important factor or you wouldn't be
>> encoding, unless if you want to shift formats for some reason. It's
>> also about size. Why would you allocate, say, 1000kbps if you could
>> have come around with 800 only on that specific frame and absolutely
>> couldn't see the difference between the two?
>>
>> about the being faster, I just asked Jason (x264 main dev). The only
>> case where qp is faster than crf is if lookahead doesn't matter or
>> isn't necessary. So why would you disable lookahead which improves
>> quality just to gain a little bit of speed?
>>
>> And finally, I'll repeat what Jason often mentions.... [quote] qp is
>> only there for testing purposes. crf is the preferred mode for
>> encoding if you go for constant quality. [/quote]
>>
>>  Every knowledgeable self-respected encoder uses and recommends crf.
>> If you think you're smarter than the devs or code itself, you're free
>> to use whatever you believe (how unlikely it may be) provides better
>> quality or speed.
>
> Thanks a lot for the explanation. I do encode about 12 hours of
> source-material a day, have done a lot of testing/comparing and have found
> my 'ideal' mix of parameters. For me the order of importance is:
> A. Quality
> B. Speed
> C. Size (indeed my preference results in a little less effective size)

Even in this case, crf is more likely to allocate better than qp and
offer the same quality since crf has a "decision mode" which qp lacks.
Various tests by the devs themselves (and other people) have come to
the same conclusion and I'm more likely to trust a dev who perfectly
knows his code what/how it does it than 3rd party testers who aren't
familiar with the internals. You don't gain anything from using qp
over crf (well, you gain a higher file size) but you do gain a few
things for using crf over qp (better size which results from better
allocation). :-)

In the end, it's your choice. I'm not here to convince you. Take it or leave it

>>
>>>> Gee, people, stop giving bad advice or just keep quiet if you don't know
>>>> :)
>>>>
>>>> About multipass, I do not have any issues with it nor get pixelated
>>>> results
>>>> _______________________________________________
>>>> MEncoder-users mailing list
>>>> MEncoder-users at mplayerhq.hu
>>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>>
>>> _______________________________________________
>>> MEncoder-users mailing list
>>> MEncoder-users at mplayerhq.hu
>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>>
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>


More information about the MEncoder-users mailing list