PDA

View Full Version : FFMS2 + VFR video + hardsubbing. Is it possible?


SledgeHammer_999
12th February 2010, 15:02
Is it possible to hardsub subtitles to a vfr video using avisynth(via ffms2)?

I tried both vsfilter and libass but the subs end up showing in the wrong place(timewise). Or is it impossible because ffms reports the average fps and thus influences the time?

thetoof
12th February 2010, 15:56
What seems logical is that you apply the subtitles on a CFR clip, on which you shall use VFR decimation afterwards.
load source converted to CFR using duplicates
further processing
textsub
2 pass tdecimate for vfr decimation
Oh, and to be 200% sure that you have frame accuracy (if you notice any problem), you could do a rendering pass of the source call only...

SledgeHammer_999
12th February 2010, 17:22
"load source converted to CFR using duplicates"
"2 pass tdecimate for vfr decimation"

Can you give an avs example?
Is it done using ffms2 as source?

thetoof
12th February 2010, 21:32
From the docs: fpsnum & fpsden: For VFR -> CFR conversion. Setting fpsnum <= 0 means a 1:1 relation with the encoded frames.

As for tdecimate, run an analysis pass with the first line and encode with the second
TDecimate(4, output="stats.txt",denoise=true)
TDecimate(5,hybrid=2,input="stats.txt",mkvout="timecodes.txt")

You can tweak vidthresh if some frames that should be decimated are not or if frames that shouldn't be are.

For anything more specific, you'll need someone else's input, as I'm about to join my new friend codein after a wonderful teeth extraction :)

SledgeHammer_999
12th February 2010, 22:07
Thanks for your effort and explanation. But I found a far easier approach on the internet. To be brief:
1.Download aegisub
2.load the avs file(which uses ffms as source)
3.load the ass/ssa file
4.load the timecode file(generated by ffms)
5.export the ass/ssa file and enable the "Transform framerate" filter.
6.use the exported ass/ssa with vsfilter/assrender

Exact information here -->http://aegisub.cellosoft.com/docs/Video#VFR_and_hardsubbing

Thank god for fansubbers :D