Does AviSynth allow editing multiple clips? I am adding two audios to a video and I want to merge after audio trimming each of them. Also, I want to delay each audio. I tried doing it, but it seems like it's not working. Only one audio had a sound and the second audio was mute.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
-
-
[Attachment 49667 - Click to enlarge]. Here. I'm trying to have each of them trimmed and delayed separately. -
Copy/paste the text of the script. I'm not going to retype the whole thing from an image.
But from just a quick look, what are you trying to do with this line?
Code:Video = DelayAudio(Video, 13.8) + DelayAUdio(Video, 342)
Last edited by jagabo; 28th Jul 2019 at 13:16.
-
Video = LSMASHVideoSource("C:\AviSynth Videos\Tekken 4 - Tekken Force - Kazuya - Ultra Hard.mp4")
Audio = LWLibavAudioSource("C:\AviSynth Videos\Tekken 4 Laboratory Theme.mp3") + LWLibavAudioSource("C:\AviSynth Videos\Tekken 2 Kuma Theme.mp3")
Audio = UnalignedSplice(AudioTrim(Audio, 0.5, 322.720), AudioTrim(Audio, 1040, 1574.5))
Video = AudioDub(Video, Audio)
Video = DelayAudio(Video, 13.8) + DelayAudio(Video, 342)
Video = ConvertToYV12(Video)
Video = Crop(Video, 42, 24, -70, -30)
Video = EdgeFixer_ContinuityFixer(Video, left=10, top=0, right=0, bottom=0, radius=0)
Video = FineDehalo(Video, rx=2, ry=2)
Video = ChromaShiftSP(Video, x=0.5, y=0.5)
Video = Rainbow_Smooth(video, radius=3)
Return video
No. I'm not displaying the video twice, just once. What I mean is that I want to delay each audio. For instance, I would like my first audio to play at 13.8 seconds and my second audio to play at 342 seconds of the video. Also, I want to make sure each audio is trimmed as I've tried and I'm not sure if I even did that correctly. I want to put two short audios together in one video. -
You know, you can return any intermediate clip to verify that it contains what you want? The script does what I would expect it to do, and what the documentation says the functions do. You may also find it easier to deal with multiple named clips where you can check each clip individually. Logically, something like:
Code:# Get source video and audio Video = LSMASHVideoSource("C:\AviSynth Videos\Tekken 4 - Tekken Force - Kazuya - Ultra Hard.mp4") Audio = LWLibavAudioSource("C:\AviSynth Videos\Tekken 4 Laboratory Theme.mp3") + LWLibavAudioSource("C:\AviSynth Videos\Tekken 2 Kuma Theme.mp3") # build first clip's video and audio V1 = Video.Trim(0,???) A1 = AudioTrim(Audio, 0.5, 322.720) V1 = AudioDub(V1, A1).AudioDelay(???) # return(V1) # if you need to check it # build second clip's video and audio V2 = Video.Trim(???, ???) A2 = AudioTrim(Audio, 1040, 1574.5) V2 = AudioDub(V2, A2).AudioDelay(???) # return(V2) # if you need to check it # join the two clips together, keeping A/V sync return(V1 ++ V2)
Last edited by jagabo; 28th Jul 2019 at 21:15.
-
Video = LSMASHVideoSource("C:\AviSynth Videos\Tekken 4 - Tekken Force - Kazuya - Ultra Hard.mp4")
Audio = LWLibavAudioSource("C:\AviSynth Videos\Tekken 4 Laboratory Theme.mp3") + LWLibavAudioSource("C:\AviSynth Videos\Tekken 2 Kuma Theme.mp3")
Video = ConvertToYV12(Video)
Video = Crop(Video, 42, 24, -70, -30)
Video = EdgeFixer_ContinuityFixer(Video, left=10, top=0, right=0, bottom=0, radius=0)
Video = FineDehalo(Video, rx=2, ry=2)
Video = ChromaShiftSP(Video, x=0.5, y=0.5)
Video = Rainbow_Smooth(video, radius=3)
V1 = Trim(Video, 346, 8389)
A1 = AudioTrim(Audio, 0.5, 322.720)
V1 = AudioDub(V1, A1)
V1 = DelayAudio(Video, 13.8)
V2= Trim(Video, 8570, 21936)
A2 = AudioTrim(Audio, 1040, 1574.5)
V2 = AudioDub(V2, A2)
V2 = DelayAudio(Video, 342)
Return (V1 ++ V2)
I don't hear any sound -
Because
Code:V1 = DelayAudio(Video, 13.8)
-
I understand. I am supposed to make separate clips for each different audios I need to put in. That makes much more sense now. I was supposed to not put DelayAudio code into each clip. Thanks again for your help. I cannot thank you enough for so much help.
-
You don't have to do it that way. It's just easier to keep things straight.
Another thing that helps you keep track of what you're doing is to use whitespace to delineate different logical sections:
Code:Video = LSMASHVideoSource("C:\AviSynth Videos\Tekken 4 - Tekken Force - Kazuya - Ultra Hard.mp4") Audio = LWLibavAudioSource("C:\AviSynth Videos\Tekken 4 Laboratory Theme.mp3") + LWLibavAudioSource("C:\AviSynth Videos\Tekken 2 Kuma Theme.mp3") Video = ConvertToYV12(Video) Video = Crop(Video, 42, 24, -70, -30) Video = EdgeFixer_ContinuityFixer(Video, left=10, top=0, right=0, bottom=0, radius=0) Video = FineDehalo(Video, rx=2, ry=2) Video = ChromaShiftSP(Video, x=0.5, y=0.5) Video = Rainbow_Smooth(video, radius=3) V1 = Trim(Video, 346, 8389) A1 = AudioTrim(Audio, 0.5, 322.720) V1 = AudioDub(V1, A1) V1 = DelayAudio(V1, 13.8) V2= Trim(Video, 8570, 21936) A2 = AudioTrim(Audio, 1040, 1574.5) V2 = AudioDub(V2, A2) V2 = DelayAudio(V2, 342) Return (V1 ++ V2)
Last edited by jagabo; 30th Jul 2019 at 11:09.
-
You mean like the way an mkv file can have two separate stereo audio tracks that you switch between while playing? No. AviSynth can only output one audio track. But you can merge multiple channels into that track with MergeChannels(). So four channels from two stereo tracks can be merged into one quad track. Then when you encode you can merge the first pair into one stereo track, the second pair into another. If StereoA and StereoB are two stereo audio tracks:
Code:MergeChannels(StereoA.GetChannel(1), StereoA.GetChannel(2) ,StereoB.GetChannel(1), StereoB.GetChannel(2))
-
Or did you mean mix 2 audio tracks to combine into one ?
http://avisynth.nl/index.php/MixAudio
Similar Threads
-
Auto reposition multiple video clips
By Derbian in forum EditingReplies: 1Last Post: 3rd Jul 2018, 01:06 -
Averaging multiple audio clips?
By Aludin in forum AudioReplies: 26Last Post: 2nd Nov 2016, 22:24 -
Where should one store multiple video clips?
By shrdlu in forum Newbie / General discussionsReplies: 8Last Post: 20th Mar 2016, 20:27 -
BDMV with multiple clips
By evildedd in forum Authoring (Blu-ray)Replies: 2Last Post: 24th Feb 2015, 16:34 -
avisynth - alternate frames from 2 clips
By fabiano44 in forum EditingReplies: 3Last Post: 19th Sep 2014, 09:12