Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the command

avconv -y -i input_file -acodec pcm_s24le -r 24 -ar 48000 output_file

to extract audio from videos. With Ubuntu 10.04 the command run succesfully, but with Ubuntu 12.04 I receive the error

Incompatible sample format 's16' for codec 'pcm_s24le', auto-selecting format 's32'

How can I solve?

share|improve this question

pcm_s24le has a bit depth of 24; it appears that your input audio has a bit depth of 16. Use pcm_s16le instead.

That said, using raw pcm audio (presumably in a .wav container) is way overkill, in terms of file size, unless you're doing waveform editing. Using

avconv input.file -vn -c:a copy output.file

would probably get you the best results. You gain nothing (well, nothing relevant to a modern computer) from converting the audio to pcm.

share|improve this answer
Not sure I understand the "gain nothing by using pcm" statement- if the user needs pcm audio (as input to an application that requires pcm audio for example) then the user "gains everything" by converting it to the format they require. Furthermore, the poster may need 24 bit depth for a reason... if so, this doesn't seem to answer the question. – Matt Coubrough Jul 25 '14 at 4:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.