View Single Post
Old 1st February 2016, 15:24   #8  |  Link
thecoreyburton
Guest
 
Posts: n/a
I figured that the only reason the mode 6 script above didn't work is because the TFM sections weren't perfect duplicates and I was thinking about it for a bit. I came to the conclusion that if perhaps I did TFM and mode 5, then loaded the VFR clip back up the frames would have to duplicate, then I could do mode 6. I attempted a four pass shot at this:

Pass #1: Ran this as an analysis pass in Virtual Dub.
Quote:
Movie=DGDecode_MPEG2Source("video.d2v", cpu=4, info=3)
Audio=FFAudioSource("audio.ac3")
AudioDub(Movie,Audio)
TFM(PP=0, Mode=4, output="TFM-Pass1.txt")
TDecimate(mode=4, output="TDecimate-Pass1.txt")
Pass #2: Saved this as a lossless AVI.
Quote:
Movie=DGDecode_MPEG2Source("video.d2v", cpu=4, info=3)
Audio=FFAudioSource("audio.ac3")
AudioDub(Movie,Audio)
TFM(PP=0, Mode=4, input="TFM-Pass1.txt")
TDecimate(mode=5, hybrid=2, vfrDec=1, input="TDecimate-Pass1.txt", tfmIn="TFM-Pass1.txt", mkvOut="Timecodes-Pass2.txt")
I converted the timecodes file from v1 to v2 to make it compatible with the next script. I named the file "Timecodes-Pass3.txt" for reference.

Pass #3: Ran this as an analysis pass in Virtual Dub.
Quote:
AVISource("intermediate.avi")
Source=VFRToCFR(times="Timecodes-Pass3.txt",numfps=30000,denfps=1001)
IVTC=Source.QTGMC()
EvenFrames=Source.TFM(PP=2, clip2=IVTC.SelectEven, output="TFM-Pass3-Even.txt")
OddFrames=Source.TFM(PP=2, clip2=IVTC.SelectOdd, output="TFM-Pass3-Odd.txt")
Interleave(EvenFrames, OddFrames).ChangeFPS(Source.Framerate*4)
TDecimate(mode=4, output="TDecimate-Pass3.txt")
Pass #4: Simply had a scrub through the frames in Virtual Dub and saw the problem here, otherwise this would have been the final output.
Quote:
AVISource("intermediate.avi")
Source=VFRToCFR(times="Timecodes-Pass3.txt",numfps=30000,denfps=1001)
IVTC=Source.QTGMC()
EvenFrames=Source.TFM(PP=2, clip2=IVTC.SelectEven, output="TFM-Pass3-Even.txt")
OddFrames=Source.TFM(PP=2, clip2=IVTC.SelectOdd, output="TFM-Pass3-Odd.txt")
Interleave(EvenFrames, OddFrames).ChangeFPS(Source.Framerate*4)
TDecimate(mode=6, hybrid=2, vfrDec=1, input="TDecimate-Pass3.txt", mkvOut="Timecodes-Final.txt")
The results of this weren't what I hoped though. It worked a little worse than mode 6 on it's own. Without the TFM in the now-identical frames of the film section still weren't decimated. Four passes felt a bit tedious AND because I had decimated and loaded up the file again, the frame timing and placement varied slightly. This caused stuttering back and forth in that parts which used QTGMC like what you'd see if you had the field order wrong. Because of the nature of the VFR clip though, the stuttering wasn't consistent. In some cases it'd stutter whereas in others it'd deinterlace properly.

After typing all this up it's obvious to me why it didn't work, but hopefully it gives someone an idea on potential solutions, perhaps. Experimenting with TDecimate's advanced options in the hopes one of them may help.

Last edited by thecoreyburton; 1st February 2016 at 17:31.
  Reply With Quote