View Full Version : Specific scenes in one avs
SnakeSnoke
20th July 2008, 01:02
Hi,
I'm currently working on a simple trailer and want to use specific scenes out of some different episodes. At the moment I make for each clip its own avs file, even though it has the same settings - except of the start and end time.
LoadPlugin("C:\DGDecode.dll")
MPEG2Source("E:\ep1.d2v")
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
Trim (4028, 4440)
FadeIn(30)
FadeOut(10)
Is there any way I can make one avs file with scenes from different sources?
Something like:
LoadPlugin("C:\DGDecode.dll")
LoadPlugin("C:\VSFilter.dll")
MPEG2Source("E:\ep1.d2v")
Trim (4028, 4440)
MPEG2Source("E:\ep2.d2v")
Trim (21, 2876)
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
FadeIn(30)
FadeOut(10)
Dreassica
20th July 2008, 01:50
Hi,
I'm currently working on a simple trailer and want to use specific scenes out of some different episodes. At the moment I make for each clip its own avs file, even though it has the same settings - except of the start and end time.
LoadPlugin("C:\DGDecode.dll")
MPEG2Source("E:\ep1.d2v")
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
Trim (4028, 4440)
FadeIn(30)
FadeOut(10)
Is there any way I can make one avs file with scenes from different sources?
Something like:
LoadPlugin("C:\DGDecode.dll")
LoadPlugin("C:\VSFilter.dll")
MPEG2Source("E:\ep1.d2v")
Trim (4028, 4440)
MPEG2Source("E:\ep2.d2v")
Trim (21, 2876)
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
FadeIn(30)
FadeOut(10)
LoadPlugin("C:\DGDecode.dll")
LoadPlugin("C:\VSFilter.dll")
ep1 = MPEG2Source("E:\ep1.d2v").Trim (4028, 4440).Crop(2,60,-2,-60).Lanczos4Resize(640,352).FadeIn(30).FadeOut(10)
ep2 = MPEG2Source("E:\ep2.d2v").Trim (21, 2876).Crop(2,60,-2,-60).Lanczos4Resize(640,352).FadeIn(30).FadeOut(10)
Return ep1 + ep2
Assuming u want a fadein/out after each section, if you only want a fadein at the beginning and a fadeout at the end of the combined clip, then just delete fadeout line from ep1 part and fadein from ep2 part.
Gavino
20th July 2008, 02:34
I would say better to keep the common parts together at the end and just splice the relevant parts of the sources together.
LoadPlugin("C:\DGDecode.dll")
LoadPlugin("C:\VSFilter.dll")
ep1 = MPEG2Source("E:\ep1.d2v").Trim (4028, 4440)
ep2 = MPEG2Source("E:\ep2.d2v").Trim (21, 2876)
ep3 = ... # repeat as often as required
ep1+ep2+ep3+... # as many as you need
# or you could use Dissolve(ep1, ep2, ..., 16)
# where 16 (frames) is overlap between scenes
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
FadeIn(30)
FadeOut(10)
Alex_ander
20th July 2008, 05:35
Before joining with '+' don't forget to make sources matched by resolution and framerate (e.g. in case some clips show smth. like 25.002 fps as captured framerate). Otherwise you'll get error message. If your cuts come from the same source, it's not necessary.
SnakeSnoke
20th July 2008, 12:25
Thanks, works fine. :)
"Dissolve" is also a nice feature. (more examples like this?)
Is there a way to slow down just one part of the video 50%?
"AssumeFPS(15)" only works with the entire video, not with just a part. (Framerate of the video is 30fps)
LoadPlugin("C:\DGDecode.dll")
scene01 = MPEG2Source("E:\ep1.d2v").Trim(4028,4440).FadeIn(30).FadeOut(10) # coming ship # 412 frames
scene02 = MPEG2Source("E:\ep2.d2v").Trim(780,1175).FadeIn(10).FadeOut(10) # flying hair # 395 frames
# ...
scene01+scene02 # ...
Crop(2,60,-2,-60) # left, top, right, bottom
Lanczos4Resize(640,352) # higher than source :/
Is it possible to combine the scenes something like this, so you don't have to copy/paste every new scene?
scene1+...scene23
Gavino
20th July 2008, 15:31
"Dissolve" is also a nice feature. (more examples like this?)
Is there a way to slow down just one part of the video 50%?
If you want more jazzy transitions, you could take a look at vcmohan's Transall (http://avisynth.org/vcmohan/TransAll/docs/index.html) plugin.
Slowing down a clip by 50% actually means, if you think about it, doubling the number of frames, then showing them at the original rate. So you can do this for each scene you want to slow down:
scenexx = scenexx.ChangeFPS(60).AssumeFPS(30)
Is it possible to combine the scenes something like this, so you don't have to copy/paste every new scene?scene1+...scene23
I'm not sure what you mean here. Yes, you can add more than two clips together on the same line, see the example I gave earlier. If you want to write it literally with '...', then I'm afraid not - the Avisynth language is pretty powerful but it doesn't stretch to this.
One other minor point: Trim(4028,4440) actually gives 413 frames, not 412, as the numbers are inclusive.
Dreassica
21st July 2008, 00:20
Hmm, odd, any filtering i did after combining the inputs never worked for me, they just seem to be ignored.
Gavino
21st July 2008, 01:34
Hmm, odd, any filtering i did after combining the inputs never worked for me, they just seem to be ignored.
You probably wrote it in some slightly different way. Look at the example:
scene01+scene02+scene03
Crop(2,60,-2,-60)
Lanczos4Resize(640,352)
The thing to realize is that the last two lines work implicitly on the clip that Avisynth has assigned to the variable called last. This variable is set when you write a line without explicitly assigning to a variable. So the first line is equivalent to last = scene01+scene02+scene03
If instead you wrote something like video = scene01+scene02+scene03 then last would not get set correctly. And of course if you write return scene01+scene02+scene03 then the last two lines will never be executed.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.