I've got a side project going that requires files which are just the samples from uncompressed PCM audio. My plan was to first convert everything to WAV, then use my own scripts to strip off all the segments other than the samples.

It occurs to me that converting directly to CDDA ("Red Book" audio) is the same as what I'm getting but with one less step involved, and better-tested code, as long as I'm fine with forcing everything to CD-quality audio (I am). However, looking through the documentation, it seems that ffmpeg can't actually output CDDA? Which is somewhat confusing, given how many less-common things it can output and the fact that the audio would be decoded through that form in any other audio-file conversion.

Am I missing some method of getting what I'm looking for, or is this an unexpected missing component in ffmpeg? Can some other common tool do it?

2 Answers 2


If you just need a raw bitstream, use

ffmpeg -i in.mp3 -ar 44100 -ac 2 -f s16le out.pcm

where the output has no headers or other metadata. It is a raw bitstream. The two channels are interleaved i.e. {sample-ch1 sample-ch2 sample-ch1...}


The CDDA format is raw signed little endian 16 bit PCM with 2 channels at 44.1 kHz. So what you need is something like

-acodec pcm_s16le -ar 44.1k -ac 2

(untested). BTW, you can see all codecs, including the PCM ones, with ffmpeg -codecs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .