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.

  • How do you want to combine them? In a vertical/horizontal split or something else? .... clip30 = AviSource("0326.avi").ChangeFPS(120) works fine for me, ie. it outputs video at 120 FPS which runs for exactly the same time as the original 30fps clip. – Peter.O Mar 30 '12 at 12:31
  • 1
    I have both a script for stacking and one for layers/blending; but it shouldn't matter, the problem was that I couldn't even get the two clips to play at different framerates. What I got out was always a 30fps video that had either one of the two problems I outlined in the question. I have now found out what I did wrong though, I'm just quickly writing out the answer. – Daniel Saner Mar 30 '12 at 13:07

I have resolved my problem by using the first snippet from my question (changing the 30fps clip's framerate to 120fps), but then also setting AssumeFPS(30) for the final, combined video by appending that function to the end of the last filter I used. So, for example:

clip30 = AviSource("0326.avi").ChangeFPS(120)
clip120 = AviSource("0326-120fps.avi")
StackHorizontal(clip30, clip120).AssumeFPS(30)

works fine. I now have a video that has the duration of the 120fps clip at 30fps (four times the original recording duration) with every frame of the 30fps quadrupled, just as I wanted.

I don't really know why the final AssumeFPS(30) was necessary though, since the clip I get without it is also at 30fps. I have checked the output frame-by-frame in AviDemux, and without that final call to AssumeFPS, the frames of clip30 are not quadrupled as they should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.