Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ffmpeg

flv

pcm

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?

like image 461
David van Geest Avatar asked Jan 31 '11 18:01

David van Geest


People also ask

Can FFmpeg convert audio?

FFmpeg is a great tool for quickly changing an AV file's format or quality, extracting audio, creating GIFs, and more.

How do I use FFmpeg without losing quality?

Instead of -sameq (removed by FFMpeg), use -qscale 0 : the file size will increase but it will preserve the quality.

Does FFmpeg support WAV?

FFmpeg can read various raw audio types (sample formats) and demux or mux them into different containers (formats). For example, you can read and write raw PCM audio into a WAV container.


1 Answers

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

like image 175
Chris Haas Avatar answered Sep 22 '22 02:09

Chris Haas