且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ffmpeg从视频中提取音频

更新时间:2022-04-13 01:33:39

如果您只想提取音频流没有重新编码只是做:

If you just want to extract the audio stream without re-encoding just do:

ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac




  • -vn 没有视频

  • -acodec copy 说使用与之相同的音频流。

    • -vn is no video.
    • -acodec copy says use the same audio stream that's already in there.
    • 读取输出以查看它是什么编解码器,设置正确的文件扩展名。

      Read the output to see what codec it is, to set the right filename extension.