digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Multiple Clips to one mpeg file? (http://www.digitalfaq.com/archives/avisynth/13157-avisynth-multiple-clips.html)

the viking 01-06-2005 10:10 AM

Avisynth: Multiple Clips to one mpeg file?
 
Just a question I didnt find a answer to on the avisynth pages:

Is it possible to add more than one movie clip in the
same script?The point is to get one mpeg file out of the clips.
And if yes,will it be something like this:
a=AviSource("C:\Movie 1.avi")
b=AviSource("C:\Movie 2.avi") and so on??

What about Trim()?
Let say I want the video in the first clip to go from frame 24 to 3452
and from 5678 to 12345

Is it possible?
and will the line be something like this:
a=trim(24,3452),(5678,12345)
b=trim(3333,8888),(9999,9999) ??

--------------------
viking

Latexxx 01-06-2005 10:35 AM

You can do
a=avisource(...)
b=avisource(...)
or
avisource(...)+avisource(...)

and you can do

c=trim(a,100,200)+trim(a,500,700)+trim(b,500,1000)

I have a feeling that you can do
c=a.trim(100,200)+a.trim(500,700)+b.trim(500,1000)
but I'm not sure. But you can definately do

a = AVISource("d:\capture.00.avi")
b = AVISource("d:\capture.01.avi")
c = AVISource("d:\capture.02.avi")
sound_track = WAVSource("d:\audio.wav")
AudioDub(a+b+c, sound_track)

incredible 01-06-2005 10:36 AM

Nope! Trim() will do refer to the "last" video stream where ist applied and in your case it would be the ready merged streams so your cut point would be screwed up!

This is the way to go ...:

a=AviSource("C:\Movie 1.avi").trim(24,3452)++trim(5678,12345)
b=AviSource("C:\Movie 2.avi").trim(3333,8888)++trim(8889,9999)
return a+b

EDIT: aaaah Latexx was first :)

Dialhot 01-06-2005 10:42 AM

Re: Multiple Clips to one mpeg file
 
Quote:

Originally Posted by the viking
Is it possible to add more than one movie clip in the
same script?The point is to get one mpeg file out of the clips.
And if yes,will it be something like this:
a=AviSource("C:\Movie 1.avi")
b=AviSource("C:\Movie 2.avi") and so on??

Yes it is.
You just have to generete a merged clip after all the "avisource" by using the "++" operator.
Code:

a=AviSource("C:\Movie 1.avi")
b=AviSource("C:\Movie 2.avi")
c=AviSource("C:\Movie 3.avi")
a++b++c

All movie must have the same resolution (else you can use a=avisource().Bicubicresize()... to have a, b and c having the same reso before to reach the ++ line).

Quote:

Is it possible?
Yes it is but it's not exactly like this.

Quote:

and will the line be something like this:
a=trim(24,3452),(5678,12345)
b=trim(3333,8888),(9999,9999) ??
a=AviSource("C:\Movie 1.avi")
b=AviSource("C:\Movie 2.avi")
trim(a,24,3524)++trim(a,5678,12345)++trim(b,3333,8 888))...

Read the manual, you will see that all commands have a first optional parameter called "clip" where you can give the name of the clip that will be affected by the command. By default it's the last one produced.

EDIT: inc, no need to use "return" if not in a function. and it's better to use ++ than + if the clip has sound (see AlignedSplice and UnalignSplice in the doc)

the viking 01-06-2005 10:58 AM

Damned! Thats what we call fast replies! :lol:

Thanks a lot for the info.Im already making a script.
And its possible to have clips from a to z I guess?
Yes,all my clips have the same resolution.

---------------
viking

Dialhot 01-06-2005 12:08 PM

Quote:

Originally Posted by the viking
Thanks a lot for the info.Im already making a script.
And its possible to have clips from a to z I guess?

You can call them "MyMovie" "MyOtherMovie" "MyThirdMovie"... and so on.

Note : if they you have a lot of them, perhaps it's faster to name them correctly and to use SegmentedAVISource


All times are GMT -5. The time now is 09:45 PM  —  vBulletin Jelsoft Enterprises Ltd

Site design, images and content © 2002-2020 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2020 Jelsoft Enterprises Ltd.