View Single Post
Old 11th April 2017, 12:30   #1180  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
About x264 Presets, etc.

Quote:
Originally Posted by r0lZ View Post
I don't use the tune... Perhaps some of them are really useful in specific circumstances.
--tune film
Equivalent to --deblock -1:-1 --psy-rd 1.0:0.15
Can improve the quality with a little more bitrate needed.
Recommended for dark movies or with flat colours.

Quote:
The presets... globally, choosing a slower preset compresses more for a quality approximately equivalent.
That is true. Here is a table with the more important parameters changed by presets:
Code:
                defect
Param./Preset   medium     slow       slower     veryslow  placebo
--------------  --------   --------   --------   --------  -------
bframes         3          -          -          8         16
ref             3          5          8          16        16
b-adapt         1 (fast)   -          2 (optim)  2         2
direct          spatial    auto       auto       auto      auto
me              hex        -          umh        umh       tesa
merange         16         -          -          24        24
subme           7          8          9          10        10
trellis         1 (on MB)  2 (on all) 2          2         2
rc-lookahead    40         50         60         60        60
partitions      def.(113)  -          all (133)  all       all
no-fast-pskip   -          -          -          -         yes
slow-firstpass  no         -          -          -         yes
The two first (B-frames and Ref-frames) are important in order to player compatibility. See the Level after.

The rest improve the source analysis and reduce bitrate (not much) for the same quality CRF selected. The cost is increasing the encoder time.

Quote:
But with the slower, very slow or placebo presets, I have noticed that my TV has some trouble when it decodes some sequences, ... My TV doesn't support a level greater than 4.2
Even some TV's or cheap standalone players are only certified for DivX Plus with Level 4.0 and max B-frames 3 like big limitations.

In order to understand the problem read the Levels and Decoded picture buffering parts in https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

You can see than in 4.0, 4.1 or 4.2 the max Ref-frames for a full 1920x1080 image is 4. For a cropped image 1920x800 you can use maybe 5 Ref-frames but not more.

Then the Slow Preset is in the limit about this, and is recommended the parameter --level 4.1 (or 4.0 or 4.2 at your choice) to limit x264 about vbv_bufsize (also limit vbv_maxrate but is not a problem normally with CRF 20).

If you want use a *slow* preset don't forget limit B and Ref frames or use the --level parameter.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 11th April 2017 at 12:32.
tebasuna51 is offline