VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Member
    Join Date
    Oct 2013
    Location
    United States
    Search Comp PM
    I have two video files in which I just can not seem to be able to mix audio, here is the code:
    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
    It returns a black screen (expected) with no audio whatsoever (unexpected). Why is this so, and what can I do to fix it?
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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:
    Code:
    bricks = ...
    laundry = ...
    aud = MixAudio(bricks, laundry)
    return AudioDub(BlankClip(bricks), aud)
    Quote Quote  



Similar Threads