I have two video files in which I just can not seem to be able to mix audio, here is the code:
It returns a black screen (expected) with no audio whatsoever (unexpected). Why is this so, and what can I do to fix it?Code:#InvonativePercushion bricks=AVISource("C:\Users\Owner\Videos\Music with Everyday Objects\Bricks.avi").Trim(1080,1080+1116) laundry=AVISource("C:\Users\Owner\Videos\Music with Everyday Objects\Laundry.avi").Trim(1215,1215+1116) b_audio = BlankClip(bricks, audio_rate=48000) AudioDub(bricks, b_audio) l_audio = BlankClip(laundry, audio_rate=48000) AudioDub(laundry, l_audio) KillVideo(b_audio) KillVideo(l_audio) aud=mixaudio(b_audio,l_audio) return aud
+ Reply to Thread
Results 1 to 2 of 2
Thread: Avisynth MixAudio Failure
b_audio and l_audio both contain only silence, so mixing them gives silence too.
Note that variables are only changed via assignment.
A statement such as KillVideo(b_audio) does not change b_audio, it assigns its result to the special variable last.
Assuming bricks and laundry have the same sample rate, all you need is:
bricks = ... laundry = ... aud = MixAudio(bricks, laundry) return AudioDub(BlankClip(bricks), aud)