MergeChannels: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs)
formatting, links, phrasing
Raffriff42 (talk | contribs)
m one more touch-up
Line 1: Line 1:
<div style="max-width:62em" >
<div style="max-width:62em" >
Merge the audio channels of two or more clips.
Merge the audio channels of two or more clips.
 
There is no ''mixing'' of channels &ndash; [[MixAudio]] and [[ConvertToMono]] do this. The channels are added to the new clip unchanged.




Line 7: Line 9:
}}
}}


Output audio is [[ConvertAudio|converted]] to the sample type of {{FuncArg|clip1}}.
Output video, framerate and running time are taken from {{FuncArg|clip1}}.
 
Don't confuse this with ''mixing'' of channels ([[MixAudio]] and [[ConvertToMono]] do this). The channels are added to the new clip unchanged.


All audio is [[ConvertAudio|converted]] to the sample type of {{FuncArg|clip1}}.




Line 20: Line 21:
  MergeChannels(A, B)
  MergeChannels(A, B)
</div>
</div>
...results in the following audio channel layout:
Results in a clip with the following [[Clip_properties|properties]]:
:channel 1 = ''A'' channel 1
:video = ''A''
:channel 2 = ''B'' channel 1
:audio channel 1 = ''A''
:audio channel 2 = ''B''
This is equivalent to using [[MonoToStereo]].
This is equivalent to using [[MonoToStereo]].


Line 33: Line 35:
  MergeChannels(A, B, C, D)
  MergeChannels(A, B, C, D)
</div>
</div>
...results in the following audio channel layout:
Results in a clip with the following [[Clip_properties|properties]]:
:channel 1 = ''A'' channel 1
:video = ''A''
:channel 2 = ''A'' channel 2
:audio channel 1 = ''A'' channel 1
:channel 5 = ''B'' channel 1
:audio channel 2 = ''A'' channel 2
:channel 6 = ''B'' channel 2
:audio channel 5 = ''B'' channel 1
:channel 3 = ''C'' channel 1
:audio channel 6 = ''B'' channel 2
:channel 4 = ''D'' channel 1
:audio channel 3 = ''C''
:audio channel 4 = ''D''





Revision as of 16:51, 8 March 2016

Merge the audio channels of two or more clips.

There is no mixing of channels – MixAudio and ConvertToMono do this. The channels are added to the new clip unchanged.


MergeChannels(clip clip1, clip clip2 [, clip clip3, ...] )

Output video, framerate and running time are taken from clip1.

All audio is converted to the sample type of clip1.


For example, given the following source clips:

A (mono)
B (mono)

...and merging them:

MergeChannels(A, B)

Results in a clip with the following properties:

video = A
audio channel 1 = A
audio channel 2 = B

This is equivalent to using MonoToStereo.


For a more complex example, given the following source clips:

A and B (stereo)
C and D (mono)

...and merging them:

MergeChannels(A, B, C, D)

Results in a clip with the following properties:

video = A
audio channel 1 = A channel 1
audio channel 2 = A channel 2
audio channel 5 = B channel 1
audio channel 6 = B channel 2
audio channel 3 = C
audio channel 4 = D