Frame rate issue

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Frame rate issue

Postby 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?
honorhammer
 
Joined: 25 Aug 2008

Re: Frame rate issue

Postby 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
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Frame rate issue

Postby 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?
honorhammer
 
Joined: 25 Aug 2008

Re: Frame rate issue

Postby 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
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: Frame rate issue

Postby honorhammer » Thu Jun 17, 2010 7:15 pm

Very nice to know, thanks for the great info. You know your stuff :p
honorhammer
 
Joined: 25 Aug 2008

Re: Frame rate issue

Postby 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.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest