VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Aug 2018
    Location
    Phoenix
    Search Comp PM
    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?
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Works OK for me, make sure you have an up to date build of ffmpeg

    EDIT it worked after I took out bluray-compat=1, possible conflict ?
    Last edited by davexnet; 4th Jun 2022 at 21:50.
    Quote Quote  
  3. Member
    Join Date
    Aug 2018
    Location
    Phoenix
    Search Comp PM
    Originally Posted by davexnet View Post

    EDIT it worked after I took out bluray-compat=1, possible conflict ?
    I'll try without that command. Thanks!
    Quote Quote  
  4. Member
    Join Date
    Aug 2018
    Location
    Phoenix
    Search Comp PM
    Worked for me without the bluray compat flag. Must be something there. Thanks for the tip!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!