"Incompatible Sample Format 'S16' for Codec 'Pcm_S24Le', Auto-Selecting Format 'S32'" Error in Audio Conversion Using Avconv

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?

1 Answer

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest