In the past, when using Stack, I have been editing the videos so they start at the same frame. I'm finding this annoying and tedious!
So, what I thought I'd try to do is "trim" each clip, then apply the stack. Unfortunately, I have crashed and burned at every try. My code currently is:
This just returns a standard Stack ie starting at the first frame of each clip.Code:clip1=AVISource("I:\vid1.avi") clip2=AVISource("I:\vid2.avi") #trim(clip1, 255, 0) #trim(clip2, 236, 0) StackHorizontal(trim(clip1, 255, 0), trim(clip2, 236, 0))
I have tried with the two commented-out trim commands but didn't achieve what I want. I also added the "trim" to the AVISource lines but no joy.
I also tried using clip 3 and 4 from trimmed clips 1 and 2 in the script but no luck either:
Is what I am trying to do achievable in one script and if so, how?Code:clip3=trim(clip1, 255, 0) clip4=trim(clip2, 236, 0)
Thanks very much.
+ Reply to Thread
Results 1 to 14 of 14
-
-
But how did you add them ?
Easiest way for most people would be to add the Trim to the clip1 , clip2 lines
Code:clip1=AVISource("I:\vid1.avi").Trim(255, 0) clip2=AVISource("I:\vid2.avi").Trim(236, 0) StackHorizontal(clip1, clip2)
Code:clip1=AVISource("I:\vid1.avi") clip2=AVISource("I:\vid2.avi") StackHorizontal(clip1.Trim(255, 0), clip2.Trim(236, 0) )
-
Thanks muchly PDR! Just what the doctor ordered.
But how did you add them ? -
I'd probably do it similar to the way poisondeathray suggested, but what am I missing? Your original method should work.
SomeVideo
clip1 = last.Frame()
clip2 = last.greyscale().Frame()
StackHorizontal(trim(clip1, 255, 0), trim(clip2, 236, 0))
[Attachment 85740 - Click to enlarge]Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
Thanks HH. I think PDR's method is more "Logical", if I could put it that way.
My main struggle was the cursed subtitling and visualising all the brackets. I got there in the end but boy...
On the subject of code, at one stage I tried laying out the code so I could see more clearly what was going on, like this:
Code:StackVertical( StackHorizontal( clip1.subtitle("JVC HR-S5700 SVHS to USBLive2",size=24), clip2.subtitle("Panasonic NV-VP33 to USBLive2",size=24), clip3.subtitle("Panasonic NV-VP33 Composite to GV-USB2",size=24)), StackHorizontal( clip4.subtitle("JVC HR-S5700 SVHS to Pioneer DVR-645H to USBLive2",size=24), clip5.subtitle("Panasonic NV-VP33 Composite to Pioneer DVR-645H to USBLive2",size=24), clip6.subtitle("Panasonic NV-VP33 Composite to Pioneer DVR-645H to GV-USB2",size=24)) )
Is there any way of laying out code like that so that it will work in AVISynth? -
You would need to use the line break character , backslash "\" for avisynth , to format it that way
Code:StackVertical( \ StackHorizontal( \ clip1.subtitle("JVC HR-S5700 SVHS to USBLive2",size=24), \ clip2.subtitle("Panasonic NV-VP33 to USBLive2",size=24), \ clip3.subtitle("Panasonic NV-VP33 Composite to GV-USB2",size=24)), \ StackHorizontal( \ clip4.subtitle("JVC HR-S5700 SVHS to Pioneer DVR-645H to USBLive2",size=24), \ clip5.subtitle("Panasonic NV-VP33 Composite to Pioneer DVR-645H to USBLive2",size=24), \ clip6.subtitle("Panasonic NV-VP33 Composite to Pioneer DVR-645H to GV-USB2",size=24)))
-
Stacking images next to each other could play a tricks on you. One image is closer to the window and can look different, or other scenarios. To compare images I find the best just to use a tool that can switch images to a view while images are stacked on top of each other. AvsPmod can do that for avisynth scripts, I presume.
-
Or use Interleave() instead of stacking. With Interleave(), a screen magnifier (like the one built in to Windows), and stepping through the video frame by frame, you can easily see minute differences.
So instead of StackHorizontqal(A, B), use Interleave(A, B).
I use VirtualDub 2 to view my AVS scripts. But any program that lets you step through frame by frame (backward and forward) is ok.
Stacking is good for checking temporal alignment of two videos. Interleaving is good for checking for before/after filtering changes, before/after lossy encoding, etc. -
I've been fooled on occasion when stacking images due to my monitor's limited viewing angle. And if an image is darker on one edge than the other, or even when it's not, it can still mess with your brain.
https://en.wikipedia.org/wiki/Cornsweet_illusion
Stacking is useful if you're not comparing the quality though, otherwise assuming the videos are the same, interleaving works well for comparing clips.
clip1 = Subtitle("clip1")
clip2 = TemporalDegrain2(grainlevel=1).Subtitle("clip2")
clip3 = MCDegrainSharp.Subtitle("clip3")
Interleave(clip1, clip2, clip3)
Edit: I took too long to post and jagabo beat me to it.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
-
To change the subject for a second...
I was reading a pdf the wikipedia page I linked to earlier used as a reference and found an image that apparently even confuses my color-picker, because it's certain the flat area of both objects in the picture are the same color, yet obviously they're not the same, no matter what the color-picker says.
[Attachment 85769 - Click to enlarge]
Sorry about the tangent.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview)
Similar Threads
-
AVISynth- "Stack" Frame Rates
By Alwyn in forum Video ConversionReplies: 3Last Post: 31st Oct 2024, 20:42 -
"code":400,"error":true,"message" on http://getwvkeys.cc
By johnsonkiss in forum Video Streaming DownloadingReplies: 14Last Post: 25th Jul 2024, 21:45 -
AVISynth- "Requesting Info on "Clang"
By Alwyn in forum ProgrammingReplies: 5Last Post: 1st Dec 2023, 13:31 -
getwvkeys.cc code":400,"error":true,"message":"Failed to get license: 405
By Koldunas in forum Newbie / General discussionsReplies: 0Last Post: 27th Sep 2023, 02:44 -
{"code": 2048, "message": "Authentication failed"} when getting license
By warmachine in forum Video Streaming DownloadingReplies: 2Last Post: 26th May 2023, 16:34