Log in

View Full Version : x264: faster or slower preset to keep a pmp from choking?


djloewen
28th April 2010, 13:40
I'm encoding my movie collection to x264. Down the road I expect I'll occasionally be playing them on hypothetical future PMPs, but I'm not taking any quality-reducing steps to make that happen right now. So, my current experiments involve almost fully default lines - I'm only playing with --crf, --preset and --tune (as well as --sar - the whole "Clever DAR" system of MeGUI does not rock my world, it seems bizarrely convoluted for a person who just wants DVD encodes with SAR 10:11 or 40:33 as per H.264 spec).

What I'm wondering is, if I encode a movie at "--preset medium" and then at "--preset placebo", which is more likely to play back smoothly on a PMP? The first will have a larger filesize and therefore a higher average bitrate (although not necessarily a higher peak bitrate?), the second presumably has more decoding complexity involved (yrs/no?). Any thoughts?

And as a side note, regarding --crf, if "Around 19-21.5 is where a rip will look very good" as per the documentation, why is the preset 23? Is a smaller filesize that important to "most" people? Is the quality difference somewhat negligible?

Chengbin
28th April 2010, 13:57
There is only one difference in decoding complexity between --preset medium and --preset placebo, and that is the number of ref frames.

nurbs
28th April 2010, 14:03
Also the influence of the number of reference frames on the decoding complexity is probably small, since --tune fastdecode doesn't change the number of refs.

djloewen
28th April 2010, 14:06
There is only one difference in decoding complexity between --preset medium and --preset placebo, and that is the number of ref frames.

A placebo encode certainly took a longer time than medium (6hrs vs 30mins), and the filesize difference is not much. What would I find with veryslow? I would have thought that it would be slightly faster than placebo but a slightly larger result. Is that not the case?

nurbs
28th April 2010, 14:11
The encoding time doesn't necessarily influence the decoding complexity. There are plenty of analysis options that will increase encoding time but don't change decoding complexity at all at the same bitrate. Furthermore if you are doing CRF encoding using a slower preset won't guarantee that you'll get a smaller file. The only thing you know is that the result will have higher quality/bitrate.

djloewen
28th April 2010, 14:24
The only thing you know is that the result will have higher quality/bitrate.

Hrm. The x264 wiki says "Change [preset] options to trade off compression efficiency against time". My understanding was that this doesn't affect quality at all. So "medium", "veryslow" and "placebo" encodes should all look (essentially) identical (= crf 23 or whatever I choose to set it to) with a progressive decrease in filesize (and therefore bitrate). This would be due to the greater "compression efficiency" - and I'm wondering if "compression efficiency" also translates to "decoding complexity".

nurbs
28th April 2010, 14:33
Your understanding is wrong. Every option you change changes the meaning of the rate factor and thereby the resulting bitrate and quality. For instance if you compare the defaults to --preset faster with CRF encoding the second encode will be faster (obviously), smaller (likely, 'cause you turned of the psy optimizations) and lower quality (see the previous point; also less analysis in general).

As I said compression efficiency doesn't necesarrily influence decoding complexity (at the same bitrate) and using slower presets only increases quality/bitrate, but doesn't necessarily decrease filesize when using CRF.

Mah
29th April 2010, 07:20
So, is the placebo considerably greater quality. Let's say I want to encode it. I give extreme quality and size of 15000 MB and placebo size 15000 MB, everything else the same. Will the difference in quality be significant or not at all or not enough to make some difference?

mariush
29th April 2010, 07:35
Placebo is not necessary greater quality - think of it as squeezing the maximum possible out of encoder without caring about the time it takes.

So for example, you may encode something with veryslow in 20 minutes which is 99.9% of the quality of the clip encoded with -placebo in 30 minutes.

Depending on what you encode and the device you watch it on, it's often not worth using placebo. For example, I doubt you'd notice the difference between veryslow and placebo on a 480x360 iPod screen.

Mah
29th April 2010, 08:00
Thank you much for the answer. I want to encode Blu-ray, so I am not sure which quality to give. I gave Extreme quality. I hope there is no true significant difference watching it on Blu-ray then on LG D390. What would you recommend me to give?