Log in

View Full Version : Subtitles drift out of sync when using FFVideoSource in encode


enchant1
4th February 2015, 14:05
In another thread, I reported problems I had with directshowsource(). I was never able to resolve them, but using FFVideoSource, I was able to do the encode.

Problem is that it appears that the subtitles drift slightly out of sync as the video progresses. When comparing the original .mp4 file and the encoded one, the keyframes are perfectly in sync at the start, but by the end of the 50 minute video, the encoded is 0.1 second earlier than the original. This makes the subtitles (especially signs) out of sync.

Is this a known issue? Any workarounds?

My avs script:

LoadPlugin("E:\Program Files (x86)\megui\tools\ffms\ffms2.dll")
FFVideoSource("F:\videos\test.mp4")

TextSub("test.ass")

sneaker_ger
4th February 2015, 16:28
Either ffvideosource does a small misdetection in the framerate, then use AssumeFPS() (between ffvideosource() and textsub()) to fix it. Or the file is variable framerate, use the parameters "fpsnum" and fpsden" in that case (see docs).

enchant1
4th February 2015, 18:03
<font size=1000pt>THANK YOU!!!</font>

AssumeFPS() did the trick perfectly.