Is there some way to configure ffmpeg to include support for signed 24-bit WAV output?
Asked Answered
L

1

8

24-bit sample sizes are not at all uncommon for PCM/WAV data, so I was surprised to see this:

Invalid sample format 's24'

... when I ran this:

ffmpeg -i input.oga -y -f wav -ar 44100 -sample_fmt s24 -ac 2 output.wav

When I look at the ffmpeg FAQ page it says that it doesn't support signed 24-bit sample sizes.

Fair enough, but I'm having a hard time accepting that this very powerful tool which supports an impressively large number of formats is somehow missing support for this really common sample width.

All I can think of is that maybe it's a build configuration issue.

So this question is...

Is there some way to configure ffmpeg to include support for signed 24-bit WAV output?

Lecturer answered 10/3, 2020 at 19:36 Comment(0)
S
8

There is no sample format to compactly store 24-bit samples, but they can be stored in 32-bits with padding. For that, select a 24-bit PCM encoder

ffmpeg -i input.oga -y -f wav -ar 44100 -c:a pcm_s24le -ac 2 output.wav

Run ffmpeg -encoders | grep 24 to get a list of all 24-bit encoders.

Scales answered 10/3, 2020 at 19:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.