Can ffmpeg convert audio to raw PCM? If so, how?

前端 未结 2 995
情歌与酒
情歌与酒 2020-12-07 08:30

I\'m currently using ffmpeg to convert FLV/Speex to WAV/pcm_s16le, successfully. However, I now need the output format to be RAW, tha

相关标签:
2条回答
  • 2020-12-07 09:10

    convert mp4 file to pcm

    ffmpeg -y  -i input.mp4  -acodec pcm_s16le -f s16le -ac 1 -ar 16000 output.pcm
    

    you can also use it to convert mp3 to pcm

    ffmpeg -y  -i input.mp3  -acodec pcm_s16le -f s16le -ac 1 -ar 16000 output.pcm
    

    key params means:

    -f s16le … PCM signed 16-bit little-endian samples
    
    -ac 1 … 1 channel (mono)
    
    -ar 16000 … sample rate 16000Hz
    
    0 讨论(0)
  • 2020-12-07 09:15

    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

    0 讨论(0)
提交回复
热议问题