[FFmpeg-user] x264 level option

Elliott Balsley elliottbalsley at gmail.com
Sun Jan 10 23:55:14 CET 2016


I expected the x264 -level option to limit all parameters within the Level
specification, but that is not happening.  I'm encoding 1080p video using
-preset veryslow and -level41.  The veryslow preset uses ref=16, but Level
4.1 only allows 4.  Is the level supposed to take precedence here?  FFmpeg
shows a warning, and the resulting file uses 16 ref frames.

$ ffmpeg -i A011C001_160111_R6QT.mov -an -vf
scale=hd1080,format=pix_fmts=yuv420p -vcodec libx264 -preset veryslow -tune
film -crf 22 -level 41 -profile:v high -g 8 -maxrate 4M -bufsize 10M
A011C001_160111_R6QT.mp4

ffmpeg version 2.7.git Copyright (c) 2000-2015 the FFmpeg developers

  built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM
3.6.0svn)

  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus
--enable-libtheora --enable-libschroedinger --enable-libopenjpeg
--enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass
--enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig
--enable-libfreetype --enable-libfribidi --disable-indev=jack
--disable-outdev=xv --mandir=/opt/local/share/man --enable-shared
--enable-pthreads --cc=/usr/bin/cc --enable-vda --arch=x86_64 --enable-yasm
--enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
--enable-nonfree --enable-libfdk-aac --enable-libfaac

  libavutil      54. 28.100 / 54. 28.100

  libavcodec     56. 49.101 / 56. 49.101

  libavformat    56. 40.101 / 56. 40.101

  libavdevice    56.  4.100 / 56.  4.100

  libavfilter     5. 25.100 /  5. 25.100

  libavresample   2.  1.  0 /  2.  1.  0

  libswscale      3.  1.101 /  3.  1.101

  libswresample   1.  2.101 /  1.  2.101

  libpostproc    53.  3.100 / 53.  3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'A011C001_160111_R6QT.mov':

  Metadata:

    major_brand     : qt

    minor_version   : 0

    compatible_brands: qt

    creation_time   : 2016-01-10 22:17:41

  Duration: 00:01:16.41, start: 0.000000, bitrate: 80147 kb/s

    Stream #0:0(und): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 78994 kb/s, SAR 1:1 DAR 16:9, 23.98 fps,
23.98 tbr, 24k tbn, 24k tbc (default)

    Metadata:

      creation_time   : 2016-01-10 22:17:41

      handler_name    : Core Media Data Handler

      encoder         : Apple ProRes 422 LT

      timecode        : 10:12:25:10

    Stream #0:1(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)

    Metadata:

      creation_time   : 2016-01-10 22:17:41

      handler_name    : Core Media Data Handler

    Stream #0:2(und): Data: none (tmcd / 0x64636D74) (default)

    Metadata:

      creation_time   : 2016-01-10 22:17:41

      handler_name    : Core Media Data Handler

      reel_name       : A011R6QT

      timecode        : 10:12:25:10

[libx264 @ 0x7fc8b2810c00] using SAR=1/1

[libx264 @ 0x7fc8b2810c00] DPB size (16 frames, 130560 mbs) > level limit
(4 frames, 32768 mbs)

[libx264 @ 0x7fc8b2810c00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2

[libx264 @ 0x7fc8b2810c00] profile High, level 4.1

[libx264 @ 0x7fc8b2810c00] 264 - core 142 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1
ref=16 deblock=1:-1:-1 analyse=0x3:0x133 me=umh subme=10 psy=1
psy_rd=1.00:0.15 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 threads=36
lookahead_threads=6 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=59 rc=crf mbtree=1 crf=22.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=4000 vbv_bufsize=10000
crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00

Output #0, mp4, to 'A011C001_160111_R6QT.mp4':

  Metadata:

    major_brand     : qt

    minor_version   : 0

    compatible_brands: qt

    encoder         : Lavf56.40.101

    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, max. 4000 kb/s, 23.98 fps,
24k tbn, 23.98 tbc (default)

    Metadata:

      creation_time   : 2016-01-10 22:17:41

      handler_name    : Core Media Data Handler

      timecode        : 10:12:25:10

      encoder         : Lavc56.49.101 libx264

Stream mapping:

  Stream #0:0 -> #0:0 (prores (native) -> h264 (libx264))

Press [q] to stop, [?] for help

frame= 1832 fps= 26 q=-1.0 Lsize=   26656kB time=00:01:16.32
bitrate=2860.9kbits/s

video:26636kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.072721%

[libx264 @ 0x7fc8b2810c00] frame I:230   Avg QP:19.08  size: 89888

[libx264 @ 0x7fc8b2810c00] frame P:381   Avg QP:26.40  size:  6312

[libx264 @ 0x7fc8b2810c00] frame B:1221  Avg QP:25.28  size:  3436

[libx264 @ 0x7fc8b2810c00] consecutive B-frames: 16.9%  6.6%  2.5%  2.8%
15.0% 24.9% 31.3%  0.0%

[libx264 @ 0x7fc8b2810c00] mb I  I16..4: 37.8% 50.8% 11.4%

[libx264 @ 0x7fc8b2810c00] mb P  I16..4:  0.9%  1.4%  0.2%  P16..4: 22.4%
 1.9%  2.3%  0.1%  0.0%    skip:70.8%

[libx264 @ 0x7fc8b2810c00] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 31.4%
 1.0%  0.1%  direct: 0.2%  skip:67.1%  L0:54.6% L1:43.8% BI: 1.6%

[libx264 @ 0x7fc8b2810c00] 8x8 transform intra:51.1% inter:82.0%

[libx264 @ 0x7fc8b2810c00] direct mvs  spatial:98.5% temporal:1.5%

[libx264 @ 0x7fc8b2810c00] coded y,uvDC,uvAC intra: 60.4% 31.1% 17.4%
inter: 0.9% 0.5% 0.0%

[libx264 @ 0x7fc8b2810c00] i16 v,h,dc,p: 15% 45% 25% 15%

[libx264 @ 0x7fc8b2810c00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 11% 11%  9%
11% 11% 10% 10% 10%

[libx264 @ 0x7fc8b2810c00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 13%  4%  8%
11% 12% 10%  9%  8%

[libx264 @ 0x7fc8b2810c00] i8c dc,h,v,p: 12% 60% 22%  6%

[libx264 @ 0x7fc8b2810c00] Weighted P-Frames: Y:0.3% UV:0.0%

[libx264 @ 0x7fc8b2810c00] ref P L0: 82.6%  6.3%  8.8%  2.3%  0.0%  0.0%

[libx264 @ 0x7fc8b2810c00] ref B L0: 94.3%  5.4%  0.4%  0.0%

[libx264 @ 0x7fc8b2810c00] ref B L1: 94.6%  5.4%

[libx264 @ 0x7fc8b2810c00] kb/s:2855.64

macpro-yosemite:~ dit$


More information about the ffmpeg-user mailing list