Frame rate issue

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
honorhammer
Joined: Mon Aug 25, 2008 8:19 pm
Org Profile

Frame rate issue

Post by honorhammer » Thu Jun 17, 2010 5:26 pm

source: H264 mkv 23.976fps
loading source with DirectShowSource(): 29.970 fps

I can't seem to figure out why the frame rate would just change like that from simply using avisynth to load the file. What's going on here?

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Frame rate issue

Post by mirkosp » Thu Jun 17, 2010 5:44 pm

Use ffvideosource instead of directshowsource.
Get the "ffms2-mt-r312.7z," unpack it, copypaste the .dll, the .avsi, and the .exe in your avisynth's plugins folder (generally "C:\Program Files\Avisynth 2.5\plugins") and then call it like:

Code: Select all

ffvideosource("your file.mkv")
If you still experience the fps issue, then you can call it like so to specify the fps:

Code: Select all

ffvideosource("your file.mkv", fpsnum = 24000, fpsden = 1001)
which tells it that the framerate is 23.976.
Image

honorhammer
Joined: Mon Aug 25, 2008 8:19 pm
Org Profile

Re: Frame rate issue

Post by honorhammer » Thu Jun 17, 2010 6:28 pm

Thank you so much mirkosp. That last method was not necessary.
I do notice a filename.mkv.ffindex file created after loading into VirtualDub. How important is this file?

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Frame rate issue

Post by mirkosp » Thu Jun 17, 2010 6:31 pm

When ffvideosource loads the video for the first time, it creates the index file. You might have noticed the loading took a bit of time, that was because of that. From the next time, loading will be immediate, and as you'll notice, seeking is very fast and accurate, thanks to the index file that ffms2 uses. If you delete it, it'll just have to recreate it.
Image

honorhammer
Joined: Mon Aug 25, 2008 8:19 pm
Org Profile

Re: Frame rate issue

Post by honorhammer » Thu Jun 17, 2010 7:15 pm

Very nice to know, thanks for the great info. You know your stuff :p

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Frame rate issue

Post by Mister Hatt » Fri Jun 18, 2010 1:47 am

If mirko wasn't clear, the ffindex file is pretty much a binary version of a d2v file. Without it, you can't seek or get any proper frame information.

The reason you had this problem is because DirectShowSource cannot demux MKV properly and uses stream info. Your stream must have had a higher framerate for some reason, although the default is 25fps. For anyone who thinks DSS2 might fix this: DSS2 is a proof of concept filter. It might be useful for some things but it really isn't designed for usage on most things. It breaks on seeking some things, can get incorrect framerate or even framecount, and can be hijacked by whatever system dshow filters you have. Stop using it.

Locked

Return to “AviSynth Help”