Log in

View Full Version : AssumeFPS and Decimate


WarpEnterprises
8th June 2002, 22:05
I had to decimate a 25fps-video to 24fps because there where doubled frames inserted. But to encode to a SVCD I need 25fps. With the function AssumeFPS the video plays at 25fps (a little faster than the original but it would be OK for me) but the sound gets out of sync and the "sync_audio" - option didn't change anything (I made a avi with VirtualDub). Whats wrong?
What excatly should sync_audio do?
I solved the problem only by squeezing the WAV with a sound-editor, but thats not the elegant way.


I have found the solution
in the other forum (http://forum.doom9.org/showthread.php?s=&threadid=26651) - Avisynth does it all but there seems to be a mistake in the doc.
With AssumeFPS (fps , audio_stretching_factor=1, sync_audio false/true) it works !!

dividee
8th June 2002, 23:51
For making things clear, AssumeFPS has two possible syntaxes:

AssumeFPS(clip c,float fps, bool sync_audio=false)
AssumeFPS(clip c,int fps_numerator, int fps_denominator=1, bool sync_audio=false)

So, the '1' you mention is not "audio_stretching_factor" but the fps denominator. (example: AssumeFPS(24000,1001) )

Are you saying that AssumeFPS(25,true) doesn't work but AssumeFPS(25,1,true) does work ? If this is the case, there is probably a bug in the parameter parsing in avisynth.
Could you also try AssumeFPS(25.0,true) ?

[EDIT:]
Indeed, I found a bug in the float version, which cause the sync_audio parameter to be ignored. So, you have to use AssumeFPS(25,1,true) to work around it.
It also means the syntax AssumeFPS(25,true) actually calls the float version (25 being converted to a float) and the default fps_denominator of 1 is not useful.