[FFmpeg-user] x264 level option

Moritz Barsnick barsnick at gmx.net
Mon Jan 11 01:00:01 CET 2016


On Sun, Jan 10, 2016 at 14:33:23 -0900, Lou wrote:
> > I expected the x264 -level option to limit all parameters within the Level
> > specification, but that is not happening.
> Try -level 4.1, not -level 41.

Interesting behavior: preset veryslow, level unspecified vs. 41 vs 4.1:

$ ffmpeg -f lavfi -i testsrc=size=hd720,format=pix_fmts=yuv420p -vcodec libx264 -preset veryslow -g 8 -t 2 -f mp4 /dev/null -y
[...]
[libx264 @ 0xb129620] profile High, level 5.0
[libx264 @ 0xb129620] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=7 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=8 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=8 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00

$ ffmpeg -f lavfi -i testsrc=size=hd720,format=pix_fmts=yuv420p -vcodec libx264 -level:v 41 -preset veryslow -g 8 -t 2 -f mp4 /dev/null -y
[...]
[libx264 @ 0xb511400] profile High, level 4.1
[libx264 @ 0xb511400] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=7 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=8 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=8 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00


$ ffmpeg -f lavfi -i testsrc=size=hd720,format=pix_fmts=yuv420p -vcodec libx264 -level:v 4.1 -preset veryslow -g 8 -t 2 -f mp4 /dev/null -y
[...]
[libx264 @ 0x9d7b400] profile High, level 4.1
[libx264 @ 0x9d7b400] 264 - core 146 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=9 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=7 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=8 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=8 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00

Do observe the reported profiles and levels, and the ref=.

In other words: "-level 41" does change something, but not in the same
way "-level 4.1" does. :-/

Moritz


More information about the ffmpeg-user mailing list