Frame +1 (or -1)

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Quu
Joined: Tue Dec 26, 2000 1:20 pm
Location: Atlanta, GA
Contact:
Org Profile

Frame +1 (or -1)

Post by Quu » Thu Aug 26, 2010 5:53 pm

I am lazy, so posting a question here...

In AVS i want to do the following
Take two AVI files... and display them on top of each other... then display the next frame from each to the right of them (or the previous frame on the left would be the same effect)

I could imagine something like this?

Code: Select all

v1 = AVISource( "test1.avi")
v2 = AVISource( "test2.avi")
v3 = AVISource( "test1.avi").Trim(1,0)
v4 = AVISource( "test2.avi").Trim(1,0)

baseVids = StackVertical(v1, v2)
nextFrame = StackVertical(v3, v4)

return StackHorizontal( baseVids, nextFrame)
would that work? (I am at work, so can't test)
[/code]
Lead me not to temptation, for I have deadlines

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Frame +1 (or -1)

Post by mirkosp » Thu Aug 26, 2010 6:42 pm

Remember to make sure that both videos match in resolution and framerate. Also, you might have to add a dummy frame at the end of the v3 and v4, I'm not sure if stacking requires for the framecount to match. If it does, though, you'll also have to make sure that both vids match in length too, or one should be lengthened (or alternatively the other shortened).
You might also want to resize in the end because depending on the input resolution, you might be getting some decidedly huge thing.
Aside from these notes, it should work, though.
Image

User avatar
Cannonaire
Joined: Wed May 05, 2010 5:59 pm
Status: OVERLOAD
Location: Oregon
Org Profile

Re: Frame +1 (or -1)

Post by Cannonaire » Tue Aug 31, 2010 7:07 am

You don't need to pad with extra frames. When one source runs out, it just displays the last frame while the other source keeps going.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

User avatar
Quu
Joined: Tue Dec 26, 2000 1:20 pm
Location: Atlanta, GA
Contact:
Org Profile

Re: Frame +1 (or -1)

Post by Quu » Tue Aug 31, 2010 1:01 pm

I actually plan on limiting this mega video to a single frame, then exporting that to a png for my report

the idea is I want to compare the sync of the original (v1) with the sync of the rendered (v2) and show also the next frames for each, so that you can easily see if the encoding then decoding added or deleted any frames to the process.

for each of my reference video there is a specific frame # that I have chosen which highlights this potential sync issue very well
Lead me not to temptation, for I have deadlines

Locked

Return to “AviSynth Help”