Page 2 of 2

Re: Channel mapping problem

Posted: Tue Nov 05, 2019 3:00 pm
by momocampo
Ok let me explain me :
My source file has 8 channels. Speak are on channel 3 and 4, and audio comments are on 7 and 8. I want to create a file which keep only channels 3,4,7 and 8. I want this file with stereo channels so I want to downmix channels 3,4,7,8 to 1 and 2 (3 and 7(source) on 1(output) for example and 4-8 on 2).
I will have a stereo file with 1 track with 2 channels stereo.
Overall I want to catch 4 audio channels and deliver them in 2 stereo (and exclude others channels).

Hope it clear now ;).

Re: Channel mapping problem

Posted: Tue Nov 05, 2019 4:13 pm
by emcodem
OK, unfortunately still a little bit confusion but what i got was that you want to mix
input 3+7 -> output 1
input 4+8 -> output 2

If you take a look at this fil, you see what avisynth functions are used underneath the mixing ability.
ffastrans\Processors\avs_plugins\mixdown.avs

The functions of interest are GetChannel and MixAudio and in the end MergeChannels, you can read the documentation on avisynth wiki, e.g.
http://avisynth.nl/index.php/MixAudio

an example custom avisynth script (untested) for the above described configuration:

Code: Select all

#m_clip is passed by ffastrans. it contains at start of your avs script all your input audio and video channels
#get each audio channel into separate variable
three = GetChannel(m_clip, 3)
four = GetChannel(m_clip, 4)
seven = GetChannel(m_clip, 7)
eight = GetChannel(m_clip, 8)

#mix audios
output_left = MixAudio(three , seven, 1, 1)
output_right = MixAudio(four , eight, 1, 1)

#modify m_clip with the newly created channels
m_clip = MergeChannels(output_left,output_right)

#In the end we always need to return m_clip back to ffastrans
return m_clip

Re: Channel mapping problem

Posted: Tue Nov 05, 2019 4:32 pm
by momocampo
Thanks Encodem, it works :)
I have only the channels that I wanted, great!!

Just a question to well understand your avisynth code, what means the (,1,1) in the variable "output_left = MixAudio(three , seven, 1, 1)" ?

Thanks again ;)

Re: Channel mapping problem

Posted: Tue Nov 05, 2019 4:48 pm
by emcodem
Thats a number between 0 an 1, specify the volume lvl

Re: Channel mapping problem

Posted: Tue Nov 05, 2019 5:02 pm
by momocampo
Ok understood !!
Thanks ;)