AviSynth ChangeFPS: combining videos with different framerates

Posted by Daniel Saner on Super User See other posts from Super User or by Daniel Saner
Published on 2012-03-29T09:42:36Z Indexed on 2012/03/29 11:34 UTC
Read the original article Hit count: 287

Filed under:

I have two video recordings of the same scene, but with different framerates, that I would like to combine using an AviSynth script. One video is recorded at 30fps, the other at 120fps. What I would like to do is to keep them temporally synchronised, meaning that for each frame of the 30fps video, the output should display 4 frames from the 120fps video. I would like the final output video to play at 30fps so that the duration is 4 times the original recordings.

From AviSynth's documentation, it seems ChangeFPS is the function I'll need, since it removes and duplicates frames, while 'AssumeFPS' just changes the playback speed (and my plan is basically to quadruple every frame of the 30fps clip). However, the filter does not seem to do what it says.

If I try:

clip30 = AviSource("0326.avi").ChangeFPS(120)
clip120 = AviSource("0326-120fps.avi")

it doesn't affect the playback speed or frame count of the 30fps clip at all, but removes every fourth frame from the 120fps clip, which is not at all what I want. Unfortunately, appending .ChangeFPS(7.5) to the clip120 instead does not have the same inverse effect—in that case, it does exactly what's to be expected. Alternatively, if I try:

clip30 = AviSource("0326.avi").AssumeFPS(7.5)
clip120 = AviSource("0326-120fps.avi")

there is no effect at all, both clips are played back at 30fps, meaning that only a quarter of the 120fps clip has been shown by the time the 30fps clip is over.

So how can I combine these two clips in the manner I want? I was unable to find any other internal or external filters that would help me do that. It seems to me that if ChangeFPS did what the manual says, it would be the right one for the job.

© Super User or respective owner

Related posts about avisynth