I have some hybrid interlaced/progressive VOB running at 29.97 fps (actually I'm not sure how this works, the footage is interlaced but some portions are not.) I would like to try to encode it as a VFR video. The tutorial I found on http://avisynth.nl/index.php/VFR only talks about hybrid 24/30, but because I'm looking at 30/60 I cannot use TFM here. I thought I could make it work by running
And finally encoding my video usingCode:QTGMC(preset="Slower", SourceMatch=3) TDecimate(mode=4, output="stats.txt")
But... while the timecodes generated are absolutely correct, I cannot seem to be able to encode this video using VFR. I'm feeding the above script to ffmpeg. I've tried using '-vsync vfr' with and without '-r 60' but the output video is always running at 29.97 fps (even if it declares a different framerate), and muxing with the timecodes does nothing. What am I missing here?Code:QTGMC(preset="Slower", SourceMatch=3) TDecimate(mode=5, hybrid=2, cycle=2, input="stats.txt", mkvout="timecodes.txt")
Code:# timecode format v1 Assume 59.940060 # TDecimate v126.96.36.199 by tritical # Mode 5 - Auto-generated mkv timecodes file 0,824,29.970030
+ Reply to Thread
Results 1 to 9 of 9
I forgot there is a problem that method using tdecimate - it will decimate 59.94 sections down.
One workaround for this is dedup (unfortunately only x86 version available ; but x64 can be run through mp_pipeline)
There is another tdecimate workaround, but it involves multiple passes and intermediates. There is a thread detailing it on doom9 somewhere
Someone was attempting to re-write tdecimate to allow for this to work properly , but it never panned out
I see... I wonder if it would be possible to simply encode the 30 fps and 60 fps parts independently and concatenate them at the end and using the timecodes...
but x64 can be run through mp_pipeline
I used to do this a long time ago using avisynth x86 , but I just tested it , and it works ok x64 through mp_pipeline too, timecodes and decimation look ok
If you have only a few known sections , it's easy to do manually using 1 script and just specifying the timecodes. If those were your actual timecodes that you got (from the wrong mode 5) , you can do that manually. You have 2 sections. Use Trim() and you just decimate that 1st section, and assume the common frame rate to join the two (or more , if you had more sections). To decimate it's just SelectEven() or SelectOdd() applied on the 1st section.. I'm sure you get the jist of it...You have to reference the decimated (new) framenumbers in the timecodes. It's just when you have 100's of sections, it's a pain to do manually. Dedup is the answer
Last edited by poisondeathray; 23rd Jul 2020 at 16:58.
Okay I've managed to make it work manually. I first encoded the 30 fps segment without filters, but passing -vsync vfr -r 60 tu ffmpeg. I then encoded the 60 fps segment with the same parameters, but QTGMC. Finally concatenated both in mkvmerge with a manual timecode file.
Now I still need to decide if VFR is something desirable or not. The 30 fps segment only represents 5% of the video, I could simply use CFR 60 fps, but duplicating frames is not something I like. My only concern would be poor compatibility of VFR.
Is it possible to use tfm and tdecimate to produce a 24/60 vfr video from a 29.97 fps hybrid video? I've read about the 24/30 vfr output, but that discards one of the fields in the interlaced sections. I'd really like to be able to have it IVTC the telecined sections, but deinterlace each field of the interlaced sections to make them 60 fps.
You're going to face the same problem I did with TFM not being able to handle it by itself. I have not tried dedup, you could investigate that, or do it manually like I did.