Log in

View Full Version : Avisynth: How joining two clips with overlay audio clip1 over clip2?


marclli
25th October 2021, 20:05
I have a several clips, with audio. Some videos I just want to join with AlignedSpliced (++), but i have one problem with other one.
I try to explain:
Audio from clip1 continues after scene plane change. So, I want to join the two videos (only video) at the scene change, but the audio of clip1 remains 3-4 frames, and then fade with the next audio.
Graphically: +++++ is video1 %%%% is audio1 -------video2 &&&&& audio2 ----> then i want

+++++++++------------- (video1+2)
%%%%%%%&&&&&& (audio1+2)
there is a little difference of time in the moment of fadeout

I already tried
#Dissolve(Trim(0,1255), Trim(2600,7300),25)
#V1++W2++V2++V22++V3++V4a++V5++V6a++V7++V8++V9++V1 0++V11++V12++V13++V14++V15++V16++V17(AlignedSplice )
#++TxPlus_Slide(V3, V4, 0.25, 7, true)++TxPlus_Slide(V41, V5, 0.25, 7, true)++V55++V6 (plugin transition Txplus)

Thanks in advance. Good Job!!

Richard1485
25th October 2021, 21:23
+++++++++------------- (video1+2)
%%%%%%%&&&&&& (audio1+2)


One approach is to emulate the tracks of an NLE by editing the videos twice – once to get the video the way you want it, and once to get the audio the way you want it – and then stack them to see the result and ensure sync.


video1=AudioDub(whatever,whatever)
video2=AudioDub(whatever,whatever)

video_edit =
\Trim(video1,A,B) ++
\Trim(video2,C,D)
#Use Trim() with values that get you: +++++++++------------- (video1+2)

audio_edit =
\Dissolve(
\Trim(video1,U,V),
\Trim(video2,X,Y),
\Z)#set "Z" to get your crossfade
#Use Trim() with values that get you: %%%%%%%&&&&&& (audio1+2)

StackVertical(audio_edit,video_edit)
#audio_edit comes first, so you can hear the crossfade


When the result is satisfactory, replace StackVertical() with AudioDubEx(), to take the video from the first clip and the audio from the second.

AudioDubEx(video_edit,audio_edit)

qyot27
26th October 2021, 00:39
http://avisynth.nl/index.php/Trim#AudioTrim

coolgit
26th October 2021, 16:07
Trim video.

Trim audio. (AviSynth v2.60 onwards)

Mux video and audio.