View Full Version : trim and splice, newbie
EricBall
15th August 2004, 03:06
I have two AVIs (HuffYUV compressed) which I want to splice together and frameserve to TMPGEnc. But the two clips overlap, so I want to trim them first. Is the following the correct AVS script?
UnalignedSplice( Trim( OpenDMLSource( "D:\VirtualVCR.avi", pixel_type="RGB24"), start1, end1 ), Trim( OpenDMLSource( "D:\VirtualVCR2.avi", pixel_type="RGB24" ), start2, end2 ))
Also, are the start & end values frames or fields (e.g. field 0 & 1 = frame 0)?
stickboy
15th August 2004, 03:45
Looks fine. Why don't you just try it? :)
Note that the + and ++ operators are shorthand for UnalignedSplice and AlignedSplice, so you could say:
Trim(OpenDMLSource("D:\VirtualVCR.avi", pixel_type="RGB24"), start1, end1)
\ + Trim(OpenDMLSource("D:\VirtualVCR2.avi", pixel_type="RGB24"), start2, end2))
Originally posted by EricBall:
Also, are the start & end values frames or fields (e.g. field 0 & 1 = frame 0)?Regardless of whether the clip is frame-based or field-based, Trim always operates on frames.
(Field-based really means field-separated; it's the result of calling SeparateFields. SeparateFields creates separate frames for each field and doubles the framecount.)
EricBall
15th August 2004, 15:31
Originally posted by stickboy
Looks fine. Why don't you just try it? :)
'Cause this will be the first time I've used Avisynth directly (versus as part of a DVD2VCD toolchain) and I'd like to get it right the first time. Plus, as a newbie, there may have been a better way to do what I need to do.
stickboy
15th August 2004, 19:06
Still, it's easy to test (open your script in VirtualDub and examine the frames). Don't be afraid to experiment!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.