VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Hi, I'm trying to encode a VFR clip. I have the timecodes and I'm trying to pass them through x264 but it keeps forcing it to CFR 25 fps and I'm not sure why

    Code:
    y4m [info]: 720x480p 0:0 @ 25/1 fps (cfr)
    timecode [info]: automatic timebase generation 1/143195981
    My settings
    Code:
    vspipe -c y4m "A:\VideoStuff\DVDs\TS\ep1.vpy" - | A:\x264\x264-r3204-373697b.exe --tcfile-in "A:\VideoStuff\DVDs\TS\timecodes.txt" --output-depth 10 --preset placebo --crf 8 --input-res 720x480 --keyint 240 --min-keyint 24 --psy-rd 0.70:0.0 --aq-mode 3 --aq-strength 0.68 --qcomp 0.70 --b-adapt 2 --ref 16 --bframes 12 --deblock -1:-1 --no-dct-decimate --no-mbtree --rc-lookahead 250 --ipratio 1.32 --pbratio 1.26 --me umh --merange 32 --trellis 2 --colorprim smpte170m --transfer smpte170m --colormatrix smpte170m --demuxer y4m - --output "E:\output.264"
    If I pass timecodes through vapoursynth with
    Code:
    --timecodes "A:\VideoStuff\DVDs\TS\timecodes.txt"
    , it only shows

    Code:
    y4m [info]: 720x480p 0:0 @ 25/1 fps (cfr)
    , instead of the timecode info. Am I doing something wrong?
    Quote Quote  
  2. Your output is an elementary stream .264 - the end result will not keep VFR timestamp information
    Quote Quote  
  3. What should I change so it can keep VFR timestamps and y4m to not force it 25 fps? I thought x264 simply handles VFR by passing timecodes
    Quote Quote  
  4. Okay researching more it seems x264 can only encode CFR content, and to make it VFR you need to mux the timecodes in mkvtoolnix instead. I am surprised after all these years no one made a way to embed the timecodes into the bitstream and output a pure VFR video
    Quote Quote  
  5. x264 can encode VFR with the --tcfile-in argument.

    Try telling x264 to write an MKV instead of an elementary stream. --output "E:\output.mkv"

    It should be written as VFR so there won't be a need to mux the timecodes.

    It's probably encoded as VFR either way, but when muxing an elementary stream, maybe MKVToolnix needs the timecodes as well. I'm not sure as I pretty much always tell x264 to output an MKV.

    Edit: I should add, you can encode without the timecodes file and add them when muxing with MKVToolNix later. The resulting MKV should playback as VFR even though its encoded as CFR. Giving x264 the timecodes file should allow it to encode as VFR as well. I think the main difference is x264 is frame rate aware, so for a VFR encode it'll adjust the quality according to how long the frames will be displaying.
    For CFR encoding, if you encode the same video twice at different frame rates, even if all else is equal the final bit rates won't be the same.
    Last edited by hello_hello; 10th Mar 2025 at 13:23.
    Quote Quote  



Similar Threads

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