Changes between Version 8 and Version 9 of AudioChannelManipulation
- Timestamp:
- Jun 6, 2014, 10:58:58 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AudioChannelManipulation
v8 v9 1 = Manipulating audio channels with ffmpeg=1 = Manipulating audio channels with `ffmpeg` = 2 2 3 3 [[PageOutline(2, Contents)]] … … 5 5 == stereo → mono stream == 6 6 7 Mix a single stereo stream down to a mono stream. Both channels of the stereo stream will be downmixed into the stream.8 9 7 [[Image(stereo_mono.png)]] 8 9 Mix a single stereo stream down to a mono stream. Both channels of the stereo stream will be downmixed into the stream: 10 10 11 11 {{{ … … 15 15 == stereo → 2 × mono streams == 16 16 17 Output 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.18 19 17 [[Image(stereo_2mono_streams.png)]] 20 18 19 Output 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: 20 21 21 {{{ 22 22 ffmpeg -i in.mp3 -filter_complex channelsplit out.mp3 … … 25 25 == stereo → 2 × mono files == 26 26 27 [[Image(stereo_2mono_outputs.png)]] 28 27 29 Output each channel in stereo input to individual mono files: 28 30 29 [[Image(stereo_2mono_outputs.png)]]30 31 31 {{{ 32 32 ffmpeg -i stereo.wav -map_channel 0.0.0 left.wav -map_channel 0.0.1 right.wav … … 40 40 41 41 == mono → stereo == 42 43 [[Image(mono_stereo.png)]] 44 42 45 Create a stereo output from one mono input: 43 46 … … 52 55 }}} 53 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). 54 58 55 59 == 2 × mono → stereo == 60 61 [[Image(2mono_stereo.png)]] 62 56 63 Create a stereo output from two mono inputs: 57 64 … … 67 74 68 75 == 6 × mono → 5.1 == 76 77 [[Image(6mono_5point1.png)]] 78 69 79 Combine 6 mono inputs into one 5.1 (6 channel) output with the [https://ffmpeg.org/ffmpeg-filters.html#amerge amerge] audio filter: 70 80 … … 78 88 == 5.1 → stereo == 79 89 80 Note that `ffmpeg` integrates a default down-mix (and up-mix) system that should be preferred (the `-ac` option) unless you have very specific needs. 90 [[Image(5point1_stereo.png)]] 81 91 82 92 To downmix you can simply use `-ac 2`: … … 86 96 }}} 87 97 88 If 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: 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. 100 101 If 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: 89 102 90 103 {{{ … … 98 111 }}} 99 112 100 If 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. 101 102 See the [https://ffmpeg.org/ffmpeg-filters.html#pan pan audio filter documentation] for additional information and examples. 113 If 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. See the [https://ffmpeg.org/ffmpeg-filters.html#pan pan audio filter documentation] for additional information and examples. 103 114 104 115 == 2 × stereo → stereo == 105 Combine 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: 116 117 [[Image(2stereo_stereo.png)]] 118 119 Combine two stereo inputs into one stereo output with the [https://ffmpeg.org/ffmpeg-filters.html#amerge amerge] and [https://ffmpeg.org/ffmpeg-filters.html#pan pan] audio filters: 106 120 107 121 {{{ … … 111 125 == Mix both stereo channels to stereo == 112 126 113 The left channel and right channel will each contain both the left and right channels (like "mono as stereo"). 127 [[Image(stereo_stereo_mix.png)]] 128 129 The left channel and right channel will each contain both the left and right channels (like "mono as stereo"): 114 130 115 131 {{{ … … 118 134 119 135 == Switch stereo channels == 136 137 [[Image(switch_stereo_channels.png)]] 138 120 139 Switch left channel to right and right channel to left: 121 140 … … 131 150 132 151 == Mute a channel == 152 153 [[Image(mute_stereo_channel.png)]] 154 133 155 This example will mute the first channel (the left channel) but keep the second channel as is: 134 156
