How can I convert a regular WAV file to a 4bit WAV file using ffmpeg?

I have tried something along the lines of

C:\ffmpeg\ffmpeg -i "Blip_Select2.wav" -c:a wav -sample_fmt u8 "Blip_Select2_8bit.wav"

but I cannot figure out how to access a 4bit conversion.

I am using the audio for a c# project, 4 bit is sufficient and I prefer wav so I won't have to distribute a possibly restricted usage decoder with my files.

1 answer

  • answered 2020-02-14 09:08 Florin Mircea

    Ok, so I did manage to find a solution for this. It's a great command line utility similar to ffmpeg, called (Sound eXchange) SoX. It can be found here:

    The command line that achieves converting to 4 bit wav is this:

    sox "sound.wav" -b 4 "sound_4bit.wav"

    It works perfectly and I did not notice any quality drop as the sampling rate is still 44100, while the size drops to 1/4.

    An important note. This works well only if your audio is clean and not recorded too loud, such as correctly recorded voice speech (this is what I am using it for), but also works for music as long as it's not too loud.