#3947: Inconsistent and confusing setting of refs with libx264 -------------------------------------+------------------------------------- Reporter: | Owner: francois.visagie@… | Status: open Type: defect | Component: Priority: minor | documentation Version: git-master | Resolution: Keywords: libx264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by francois.visagie@…): Unfortunately I can confirm that there is also a software bug, in addition to a documentation error. Let's restate the information from [https://trac.ffmpeg.org/ticket/3947#comment:2 comment 2]: 1. When '-x264opts level=x.y' is used, ffmpeg does not correctly set reference frames for the specified level (shown in original report above). 2. However, when --level is used with x264, it DOES correctly set reference frames for the specified level: {{{ C:\Users\fvisagie\Videos\Home Videos\Testing\x264>h264levl 720 576 25 1500000 h264levl v1.1 (c) F. Visagie 2014/10/31 level=3 maxref=5 x264maxref=5 }}} {{{ C:\Users\fvisagie\Videos\Home Videos\Testing\x264>x264 --preset veryslow --bitrate 1500 --level 3 -o zzz.m4v inprogressive.mpg [mpeg @ 003e29c0] max_analyze_duration 5000000 reached lavf [info]: 720x576p 64:45 @ 25/1 fps (vfr) x264 [info]: using SAR=64/45 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x264 [info]: profile High, level 3.0 x264 [info]: frame I:15 Avg QP:25.41 size: 45805 x264 [info]: frame P:473 Avg QP:30.64 size: 12431 x264 [info]: frame B:1012 Avg QP:34.26 size: 4176 x264 [info]: consecutive B-frames: 3.9% 4.1% 64.0% 4.5% 5.0% 18.4% 0.0% 0.0% 0.0% x264 [info]: mb I I16..4: 3.6% 87.1% 9.3% x264 [info]: mb P I16..4: 3.2% 19.9% 1.6% P16..4: 41.2% 15.1% 8.9% 0.2% 0.0% skip: 9.9% x264 [info]: mb B I16..4: 0.6% 3.0% 0.2% B16..8: 42.4% 10.0% 2.0% direct: 3.1% skip:38.8% L0:38.0% L1:51.3% BI:10.7% x264 [info]: final ratefactor: 25.75 x264 [info]: 8x8 transform intra:81.2% inter:82.2% x264 [info]: direct mvs spatial:99.6% temporal:0.4% x264 [info]: coded y,uvDC,uvAC intra: 69.5% 64.3% 22.2% inter: 19.9% 13.5% 1.2% x264 [info]: i16 v,h,dc,p: 29% 26% 8% 36% x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 10% 5% 7% 11% 15% 12% 12% 12% x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 10% 4% 7% 12% 16% 11% 10% 9% x264 [info]: i8c dc,h,v,p: 34% 24% 23% 19% x264 [info]: Weighted P-Frames: Y:1.1% UV:0.4% x264 [info]: ref P L0: 58.5% 20.4% 12.8% 3.2% 3.0% 2.0% 0.1% x264 [info]: ref B L0: 90.1% 6.9% 2.2% 0.8% x264 [info]: ref B L1: 96.2% 3.8% x264 [info]: kb/s:1441.07 encoded 1500 frames, 11.38 fps, 1441.07 kb/s }}} Unfortunately I do not know how to show encoder settings or number of reference frames in the output file with ffprobe. MediaInfo output: {{{ General Complete name : C:\Users\fvisagie\Videos\Home Videos\Testing\x264\zzz.m4v Format : AVC Format/Info : Advanced Video Codec File size : 10.3 MiB Video Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.0 Format settings, CABAC : Yes Format settings, ReFrames : 5 frames Bit rate : 1 500 Kbps Width : 720 pixels Height : 576 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Writing library : x264 core 142 r2479 dd79a61 Encoding settings : cabac=1 / ref=5 / 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=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=abr / mbtree=1 / bitrate=1500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3947#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker