PDA

View Full Version : (solved) A way to make audio overlap next clip?


StifflerStealth
9th December 2007, 19:36
I have a bunch of clips that I want to combine into one. This is an original project where I want take some audio from one clip and play it while another clip is playing, like in the movies where there is a person talking and there is a flashback, we still here the guy talking but the audio from the flash back is there ... well that's kinda what I want to do. I want to have the video to straight cut to new clip, but keep the audio going for a bit while the new audio is playing. I tried this in Premiere Pro where I need to use two audio tracks and overlap them.

Is there neat trick in AviSynth that would allow me to do this?

Also, while I am asking questions, do the built in Fade ins and outs just fade the beginning/end of a clip to/from black, or do they do a little cross-fading as well, especially with the audio? What can cross-fade audio/video?

Thanks. Sorry for asking this, but I come from the sheltered world of graphical NLEs. I am just getting frustrated at their increasing slowness and CPU hogness. I'd figure I would branch out. :P

Cheers.

EDIT: By "neat way" I mean a way that is easy and understandable for a newbie at AviSynth. Oh, and I heard that using Trim can cause sync issues with audio, so is there a way to ensure that things stay in sync?

Ebobtron
9th December 2007, 20:01
from the docs http://avisynth.org/mediawiki/FadeOutFadeOut(clip, n) is just a shorthand for Dissolve(clip, Blackness(clip, n+1,color=color), n) (or n+2 instead of n+1 for FadeOut2 and n for FadeOut0).
off the top
some use of overlay with MixAudio for the clip's sound delayed for sync

good luck, there are lots of ways to skin this goose

StifflerStealth
9th December 2007, 20:18
If there are multiple ways, then could I do something like have clip 1 cut right before clip two is begin, then take the audio only from clip 1 from the point where it was cut and line it up on the "timeline" where clip 2 begins and also then apply effects to that part of the audio to clip 1, like fades and stuff? How would this be done in AVS syntax? and have the audio line up like that?

Clip 1 Clip 2
|:::::::||::::::::::::|
|:::....|
Audio Clip 1

Something like that drawing. :P

IanB
9th December 2007, 21:35
Clip1=...Source(...)
Clip2=...Source(...)
V=Clip1.Trim(0, 567) + Clip2
A=Clip1 + Clip2.Trim(1234, 0)
AudioDub(V, A)

StifflerStealth
9th December 2007, 22:05
IanB, won't that start the audio of clip 2 after clip 1 finishes instead of playing them together? I need the last part of the audio of clip 1 to play at the same time as the beginning of clip 2.

Sagekilla
9th December 2007, 22:10
You could also edit the audio clips in a program like Audacity to have one fade out with another fading in at the same time using multiple tracks.. I find this to be much easier then using Avisynth.

IanB
9th December 2007, 22:56
Clip1=...Source(...)
Clip2=...Source(...)
P1=Clip1.Trim(0, 567)
P2=Clip1.Trim(568, 0)
Fc=FrameCount(P2)
P3=Clip2.Trim(0, Fc-1)
P4=Clip2.Trim(Fc, 0)
V=P1 + P3 + P4
A=P1 + MixAudio(P2, P3, 0.75, 0.666) + P4
AudioDub(V, A)

StifflerStealth
10th December 2007, 01:33
Thanks Ian. :) That works perfectly as needed. I never thought of using the FrameCount function for this. It's a little complicated to follow what is going on, but I get it mostly. I tried it and I was able to recreate the scene transitions that I had in Adobe. So far so good. This takes a bit more manual work at finding the cut points, but ah well. This is fun to learn. :)

Thanks again for all your help.