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
My settingsCode:y4m [info]: 720x480p 0:0 @ 25/1 fps (cfr) timecode [info]: automatic timebase generation 1/143195981
If I pass timecodes through vapoursynth withCode: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", it only showsCode:--timecodes "A:\VideoStuff\DVDs\TS\timecodes.txt"
, instead of the timecode info. Am I doing something wrong?Code:y4m [info]: 720x480p 0:0 @ 25/1 fps (cfr)
+ Reply to Thread
Results 1 to 5 of 5
-
-
Your output is an elementary stream .264 - the end result will not keep VFR timestamp information
-
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
-
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
-
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.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview)
Similar Threads
-
Help converting jpeg2000 dcp mxf files to y4m
By sophisticles in forum Video ConversionReplies: 1Last Post: 28th Dec 2022, 15:24 -
Improve video from nokia vfr 10 fps 640x480 with glitch comp error mp4
By mammo1789 in forum RestorationReplies: 0Last Post: 17th Jul 2021, 09:06 -
Convert VFR to Image Sequence (Keeping VFR)
By Vaengence in forum EditingReplies: 11Last Post: 29th Dec 2020, 16:02 -
Need help converting RAW YUV to Y4M
By sophisticles in forum Video ConversionReplies: 1Last Post: 22nd Oct 2020, 09:27 -
Encoding VFR (30 + 60 fps)
By ZetaStax in forum Video ConversionReplies: 8Last Post: 31st Jul 2020, 06:01