ffmpeg 可以将音频转换为原始 PCM 吗?如果是这样,如何? [英] Can ffmpeg convert audio to raw PCM? If so, how?

查看:34
本文介绍了ffmpeg 可以将音频转换为原始 PCM 吗?如果是这样,如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 ffmpegFLV/Speex 成功转换为 WAV/pcm_s16le.但是,我现在需要输出格式为 RAW,即 PCM 签名的 16 位小端,没有 WAV 标头.我尝试了以下方法:

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

但 ffmpeg 回应:

But ffmpeg responds with:

Unable to find a suitable output format for 'output.raw'

我也尝试使用 output.pcmoutput 作为输出文件名,结果相同.

I also tried using output.pcm and output as output file names, with the same result.

我也尝试了 -f 标志来指定原始格式,但这给出了:

I also tried the -f flag to specify raw format, but that gives:

Unknown input or output format: raw

这可以用 FFmpeg 实现吗?如果是,怎么办?

Is this possible with FFmpeg? If so, how?

推荐答案

试试这个:

ffmpeg -i input.flv -f s16le -acodec pcm_s16le output.raw

您可以通过运行获得这些选项:

You can get these options by running:

ffmpeg -formats

参见 https://trac.ffmpeg.org/wiki/audio%20types详情

这篇关于ffmpeg 可以将音频转换为原始 PCM 吗?如果是这样,如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆