ffmpeg可以将音频转换为原始PCM吗?如果是这样,怎么样? [英] Can ffmpeg convert audio to raw PCM? If so, how?
问题描述
我目前正在使用ffmpeg将FLV / Speex转换成WAV / pcm_s16le,成功。不过,现在我需要输出格式为RAW,也就是PCM签名的16位小端,没有WAV头。我尝试了以下内容:
ffmpeg -y -i input.flv -vn -acodec pcm_s16le output.raw
但是ffmpeg回应:
无法为'output.raw'找到合适的输出格式
我也尝试使用' output.pcm'和'output'作为输出文件名,结果相同。
我还尝试了 -f
标志来指定原始格式,但是这表示:
未知输入或输出格式:raw
这是否可以用FFmpeg?如果是这样,那么如何?
给这个镜头:
ffmpeg -i input.flv -f s16le -acodec pcm_s16le output.raw
您可以通过运行以下方式获取这些选项:
ffmpeg -formats
/ pre>
请参阅 https:// trac .ffmpeg.org / wiki / audio%20types 了解详情
I'm currently using ffmpeg to convert FLV/Speex to WAV/pcm_s16le, successfully. However, I now need the output format to be RAW, that is, PCM signed 16-bit little endian, without the WAV header. I tried the following:
ffmpeg -y -i input.flv -vn -acodec pcm_s16le output.raw
But ffmpeg responds with:
Unable to find a suitable output format for 'output.raw'
I also tried using 'output.pcm' and 'output' as output file names, with the same result.
I also tried the
-f
flag to specify raw format, but that gives:Unknown input or output format: raw
Is this possible with FFmpeg? If so, how?
解决方案Give this a shot:
ffmpeg -i input.flv -f s16le -acodec pcm_s16le output.raw
You can get these options by running:
ffmpeg -formats
See https://trac.ffmpeg.org/wiki/audio%20types for details
这篇关于ffmpeg可以将音频转换为原始PCM吗?如果是这样,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!