Changes between Version 9 and Version 10 of AudioChannelManipulation


Ignore:
Timestamp:
Jun 7, 2014, 2:55:13 AM (5 years ago)
Author:
llogan
Comment:

provide more explicit mappings; add standards link; note-ize

Legend:

Unmodified
Added
Removed
Modified
  • AudioChannelManipulation

    v9 v10  
    2323}}}
    2424
     25{{{
     26#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     27'''Note:''' Your player will likely play the first stream by default unless your player allows you to select the desired stream.
     28}}}
     29
    2530== stereo → 2 × mono files ==
    2631
     
    5257
    5358{{{
    54 ffmpeg -i input.mp3 -filter_complex "[0:a][0:a]amerge[aud]" -map "[aud]" output.m4a
    55 }}}
    56 
    57 '''Note:''' These examples will not magically create a "true" stereo output from the mono input, but simply place the same audio into both the `FL` and `FR` channels of the output (both channels will be identical).
     59ffmpeg -i input.mp3 -filter_complex "[0:a][0:a]amerge[aout]" -map "[aout]" output.m4a
     60}}}
     61
     62{{{
     63#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     64'''Note:''' These examples will not magically create a "true" stereo output from the mono input, but simply place the same audio into both the left and right channels of the output (both channels will be identical).
     65}}}
    5866
    5967== 2 × mono → stereo ==
     
    7078
    7179{{{
    72 ffmpeg -i left.mp3 -i right.mp3 -filter_complex amerge output.mka
     80ffmpeg -i left.mp3 -i right.mp3 -filter_complex "[0:a][1:a]amerge[aout]" -map "[aout]" output.mka
    7381}}}
    7482
     
    8189{{{
    8290ffmpeg -i front_left.wav -i front_right.wav -i front_center.wav -i lfe.wav -i back_left.wav -i back_right.wav \
    83 -filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a] amerge=inputs=6" output.wav
     91-filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[aout]" -map "[aout]" output.wav
    8492}}}
    8593
     
    96104}}}
    97105
    98 * By default when using `-ac 2` the LFE channel is omitted.
    99 * `ffmpeg` integrates a default down-mix (and up-mix) system that should be preferred (the `-ac` option) unless you have very specific needs.
     106{{{
     107#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     108'''Notes:'''
     109* By default when using `-ac 2` the LFE channel is omitted. See "[http://www.atsc.org/cms/standards/a_52-2010.pdf Digital Audio Compression Standard (Document A/52:2010)]" for more downmixing info involving LFE.
     110* `ffmpeg` integrates a default down-mix (and up-mix) system that should be preferred (the `-ac` option) over the pan filter unless you have very specific needs.
     111}}}
    100112
    101113If you want to map specific channels and drop the rest you can use the [https://ffmpeg.org/ffmpeg-filters.html#pan pan audio filter]. This will map the `FL` (Front Left) of the input to the  `FL` of the output, and the `FR` (Front Right) of the input to the `FR` of the output:
     
    120132
    121133{{{
    122 ffmpeg -i input1.wav -i input2.wav -filter_complex "amerge,pan=stereo:c0<c0+c2:c1<c1+c3" output.mp3
     134ffmpeg -i input1.wav -i input2.wav -filter_complex "[0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[aout]" -map "[aout]" output.mp3
    123135}}}
    124136