VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hi >&& respect for cats thanks

    please consider this source that have only 1 audio track (with 2 stereo channels) correctly loaded (with video) in avisynth:

    https://www.dropbox.com/s/uzuqgmlykcor2o0/input1_2.mov?dl=0

    Image
    [Attachment 49899 - Click to enlarge]

    Code:
    vid=LWLibavVideoSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2.mov")
    aud=LWLibavAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2.mov")
    left=GetChannel(aud, 1)
    right=GetChannel(aud, 2)
    both=mergechannels(left, right)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    and all is ok

    ------------------------------------------------------------------------------------------------------------------------------------------

    But now I have another source: is the same but with another audio track (in total are 2 audio tracks, and each one have 2 audio channels)

    https://www.dropbox.com/s/h2x204v9csf7io2/input1_2_3_4.mov?dl=0

    Image
    [Attachment 49900 - Click to enlarge]


    How to load the second audio track in avisynth?!?

    How can I do the script so avisynth expose the 2 audio tracks?

    thanks
    Quote Quote  
  2. Why don't you just read the LSmash docs? Hint: stream_index.
    Quote Quote  
  3. Image
    [Attachment 49901 - Click to enlarge]


    because I'm a cat

    low level intellingent cat
    Quote Quote  
  4. Code:
    vid=LWLibavVideoSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov")
    aud=LWLibavAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov", stream_index=0)
    aud2=LWLibavAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov", stream_index=1)
    left=GetChannel(aud, 1)
    right=GetChannel(aud, 2)
    
    ch3=GetChannel(aud2, 1)
    ch4=GetChannel(aud2, 2)
    both2=mergechannels(ch3, ch4)
    
    both=mergechannels(left, right)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    I can try lo load internally to the .avs the second audio track but with audiodub how have to do?

    this script expose only 1 audio track, how I have modify the script to have the 2 audio ?
    Quote Quote  
  5. You want to mix the two audio tracks? Use MixAudio():

    Code:
    vid=LWLibavVideoSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov")
    aud=LWLibavAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov", stream_index=0)
    aud2=LWLibavAudioSource("C:\Users\Administrator\Desktop\Nuova cartella (7)\input1_2_3_4.mov", stream_index=1)
    AudioDub(vid, MixAudio(aud, aud2))
    What's the point of splitting a stereo track into two mono tracks them merging them back into a stereo track? That puts you right back where you started. Are you trying to accomplish something else?
    Quote Quote  
  6. no sorry I don't need to mix the audio tracks, simply I need to expose the 2 audio track where each track have the 2 audio stereo channels. All audio channels have to be separated
    Quote Quote  
  7. Originally Posted by marcorocchini View Post
    How can I do the script so avisynth expose the 2 audio tracks?
    AviSynth doesn't support multiple audio track output. You could only mix 2 stereo inputs into a 4 channel track, then separate them again in the software you are using to access AviSynth's output (e.g. ffmpeg). Or simply use 2 different scripts.
    Quote Quote  
  8. You could merge the four channels into a single quad track:
    Code:
    MergeChannels(GetChannel(aud, 1), GetChannel(aud, 2), GetChannel(aud2, 1), GetChannel(aud2, 2))
    But it will be up to you to keep track of them in later processing.
    Quote Quote  
  9. Image
    [Attachment 49903 - Click to enlarge]


    Code:
    audPair1=LWLibavAudioSource("spaceForInputFileNameAudio", stream_index=0)
    audPair2=LWLibavAudioSource("spaceForInputFileNameAudio", stream_index=1)
    leftPair1=GetChannel(audPair1, 1)
    rightPair1=GetChannel(audPair1, 2)
    leftPair2=GetChannel(audPair2, 1)
    rightPair2=GetChannel(audPair2, 2)
    both=mergechannels(leftPair1, rightPair1, leftPair2, rightPair2)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    slightly modified but seems works


    Originally Posted by sneaker View Post
    AviSynth doesn't support multiple audio track output.
    yes it's true, if I don't mistake output 1 track but in this case with 4 audio channels. However Mainconcept totalcode recognize as well this audio configuration

    Image
    [Attachment 49904 - Click to enlarge]
    Quote Quote  



Similar Threads