VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Here is my script:

    clip1 = DirectShowSource("c:\22.avi")
    clip2 = DirectShowSource("c:\33.avi")

    StackHorizontal(clip1,clip2)
    ConvertToYV12()
    Problem is the 22 clip is 1 second longer then the 33 clip. I do not want to cut any frames. If I change the fps of either clip it wont work (because the final clip will only have one framerate). Anyway I can fix?
    Quote Quote  
  2. The script as you have it will make the two clips the same length by repeating the last frame of the shorter clip until the longer clips is finished. If you want to stretch the short clip by duplicating occasional frames:

    Code:
    clip1 = DirectShowSource("c:\22.avi")
    clip2 = DirectShowSource("c:\33.avi").ChangeFPS(x).AssumeFPS(original)
    x is whatever value makes the number of frames come out right (something higher than the original frame rate, current_rate * desired_frames / current_frames). You could do the opposite, squish the longer clip (by discarding occasional frames) to match the length of the shorter clip. If you prefer blended frames use ConvertFPS() instead. Or you can try some of the motion compensated interpolaters like SmoothFPS().
    Quote Quote  
  3. thats a good trick, but I can tell there are dupe frames, so its not the idea solution.

    Is there a way to increase the overall framerate without effecting framerates of each video?

    For example: Assume you set a "global FPS" of 60 FPS, have one clip run at "20 fps" while the other at "30 fps". It would mean the first clip would keep showing the same shot for three frames while the second clip would show each shot 2 times. Depending on the variables, the end result could be smoother then the example above.

    So as long as clip 1 and clip 2 have an evenly divisible number of the "global FPS" then this method in theory should produce the absolute best possible playback. The only cost would be a bigger file.

    Is this possible?
    Quote Quote  
  4. The only way to do that is to use a very high frame rate -- the least common multiple of the two individual frame rates. In your example, the least common multiple of 20 and 30 is 60.

    I gave you another possibility that will give smooth playback, SmoothFPS(). But that has to create in-between frames which sometimes have odd artifacts. It works well for simple motions, like panning shots, not so well for complex motions.

    https://forum.videohelp.com/threads/345774-How-to-convert-from-60fps-to-25fps-to-get-co...=1#post2159173
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!