I'm trying to reencode a short video clip. It will be joined with others that all have 4 reference frames. My source file has 4 reference frames. No matter what I do, ffmpeg always spits out a file with 3 reference frames. Is there a bug in the software or some reason I'm unaware that this is not working?
This is the command I used:
ffmpeg -i input.mkv -c:v libx264 -preset medium -tune film -crf 13 -max_muxing_queue_size 1000 -x264-params keyint=24:bluray-compat=1lices=4:level=4.1:ref=4:fps=24000/1001 -bsf:v dump_extra=freq=k output.mkv
This is the source mediainfo:
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 3 min 51 s
Bit rate mode : Variable
Bit rate : 25.1 Mb/s
Maximum bit rate : 33.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.506
Stream size : 694 MiB (100%)
Language : English
Default : No
Forced : No
This is the resulting mediainfo:
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 3 min 51 s
Bit rate : 25.1 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.506
Stream size : 694 MiB (93%)
Writing library : x264 core 164 r3075 66a5bc1
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=24 / lookahead_threads=4 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=24 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=24 / rc=crf / mbtree=1 / crf=13.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : No
Forced : No
You can see in the "Encoding settings" section in the resulting mediainfo that it picked up the command to use 4 reference frames. But for some reason it insists on 3. Any ideas?
+ Reply to Thread
Results 1 to 4 of 4
-
-
Worked for me without the bluray compat flag. Must be something there. Thanks for the tip!
Similar Threads
-
Ref Frames,Timescale, sharpen and Short Audio questions
By Budman1 in forum Video ConversionReplies: 3Last Post: 2nd Oct 2021, 15:44 -
Number of reference frames x264
By Surlias in forum Newbie / General discussionsReplies: 17Last Post: 17th Mar 2019, 13:32 -
x264 with manually setted "ref" parameter and MediaInfo report not the same
By aleaksunder in forum Video ConversionReplies: 2Last Post: 21st Feb 2019, 03:53 -
FFMPEG x264 parameters
By marcorocchini in forum Newbie / General discussionsReplies: 6Last Post: 4th Aug 2018, 11:21 -
Can I force ffmpeg to transcode 59.94 frames to display at 25 frames per se
By oduodui in forum EditingReplies: 4Last Post: 28th Apr 2018, 09:24