Changes between Version 6 and Version 7 of AudioChannelManipulation


Ignore:
Timestamp:
Mar 14, 2014, 6:10:55 AM (6 years ago)
Author:
llogan
Comment:

add 5.1 to stereo examples

Legend:

Unmodified
Added
Removed
Modified
  • AudioChannelManipulation

    v6 v7  
    1111
    1212== stereo → 2 × mono streams ==
    13 Output each channel in stereo input to individual mono streams in one output file with the [http://ffmpeg.org/ffmpeg-filters.html#channelsplit channelsplit] audio filter.
     13Output each channel in stereo input to individual mono streams in one output file with the [https://ffmpeg.org/ffmpeg-filters.html#channelsplit channelsplit] audio filter.
    1414       
    1515{{{
     
    2424}}}
    2525
    26 or with the [http://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filer:
     26or with the [https://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filer:
    2727
    2828{{{
     
    3737}}}
    3838
    39 or with the [http://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
     39or with the [https://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
    4040
    4141{{{
     
    5151}}}
    5252
    53 or with the [http://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
     53or with the [https://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
    5454
    5555{{{
     
    5858
    5959== 6 × mono → 5.1 ==
    60 Combine 6 mono inputs into one 5.1 (6 channel) output with the [http://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
     60Combine 6 mono inputs into one 5.1 (6 channel) output with the [https://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter:
    6161
    6262{{{
     
    6767All inputs must have the same sample rate and format. If inputs do not have the same duration the output will stop with the shortest.
    6868
     69== 5.1 → stereo ==
     70
     71Note that `ffmpeg` integrates a default down-mix (and up-mix) system that should be preferred (the `-ac` option) unless you have very specific needs.
     72
     73To downmix you can simply use `-ac 2`:
     74
     75{{{
     76ffmpeg -i 6channels.wav -ac 2 stereo.wav
     77}}}
     78
     79If 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 Front Left of the input to the Front Left of the output, and the Front Right of the input to the Front Right of the output:
     80
     81{{{
     82ffmpeg -i 6channels.wav -af "pan=stereo:c0=FL:c1=FR" stereo.wav
     83}}}
     84
     85You can also map specific channels by number. This example will map the first and third channels of the input to the first and second channels of the output.
     86
     87{{{
     88ffmpeg -i 6channels.wav -af "pan=stereo:c0=c0:c1=c2" output.wav
     89}}}
     90
     91If the `=` in a channel specification is replaced by `<`, then the gains for that specification will be renormalized so that the total is 1, thus avoiding clipping noise.
     92
     93See the [https://ffmpeg.org/ffmpeg-filters.html#pan pan audio filter documentation] for additional information and examples.
     94
    6995== 2 × stereo → stereo ==
    70 Combine two stereo inputs into one stereo output with the [http://ffmpeg.org/ffmpeg-filters.html#amerge amerge] and [http://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filters:
     96Combine two stereo inputs into one stereo output with the [htts://ffmpeg.org/ffmpeg-filters.html#amerge amerge] and [https://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filters:
    7197
    7298{{{
     
    89115}}}
    90116
    91 or with the [http://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filer:
     117or with the [https://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filer:
    92118
    93119{{{