My goal is to decode an ac3 from avi to multiple wavs - one for each channel, using ffmpeg.
我的目标是使用ffmpeg将ac3从avi解码为多个wavs - 每个通道一个。
Using
ffmpeg.exe -i the.avi -c:a copy the.ac3 the.wav
would decode it to a single wav, and typing the.wavs
won't help...
I know it can be done with other tools, but I want to know how it's achievable with ffmpeg.
将它解码为单个wav,输入.wavs将无济于事......我知道它可以用其他工具完成,但我想知道它是如何用ffmpeg实现的。
1 个解决方案
#1
4
From the docs:
来自文档:
You can also extract each channel of an input to specific outputs; the following command extracts two channels of the INPUT audio stream (file 0, stream 0) to the respective OUTPUT_CH0 and OUTPUT_CH1 outputs:
您还可以将输入的每个通道提取到特定输出;以下命令将INPUT音频流(文件0,流0)的两个通道提取到相应的OUTPUT_CH0和OUTPUT_CH1输出:
ffmpeg -i INPUT -map_channel 0.0.0 OUTPUT_CH0 -map_channel 0.0.1 OUTPUT_CH1
In your case it'll look something like:
在你的情况下,它看起来像:
ffmpeg.exe -i teh.avi -c:a copy -map_channel 0.0.0 0.wav -map_channel 0.0.1 1.wav
Assuming that the ac3 is stream 0 in the avi.
假设ac3是avi中的流0。
#1
4
From the docs:
来自文档:
You can also extract each channel of an input to specific outputs; the following command extracts two channels of the INPUT audio stream (file 0, stream 0) to the respective OUTPUT_CH0 and OUTPUT_CH1 outputs:
您还可以将输入的每个通道提取到特定输出;以下命令将INPUT音频流(文件0,流0)的两个通道提取到相应的OUTPUT_CH0和OUTPUT_CH1输出:
ffmpeg -i INPUT -map_channel 0.0.0 OUTPUT_CH0 -map_channel 0.0.1 OUTPUT_CH1
In your case it'll look something like:
在你的情况下,它看起来像:
ffmpeg.exe -i teh.avi -c:a copy -map_channel 0.0.0 0.wav -map_channel 0.0.1 1.wav
Assuming that the ac3 is stream 0 in the avi.
假设ac3是avi中的流0。