I want to produce constant-bitrate mp3 with bitrate 8.00kbps. I use this:
ffmpeg -i q.wav -b:a 8k q.mp3
But,instead of creating 8.00 kbps mp3, it creates 8.40 kbps file (or 8.41 or like that), as soxi informs:
Channels : 1 Sample Rate : 8000 Precision : 16-bit Duration : 00:00:05.11 = 40896 samples ~ 383.4 CDDA sectors File Size : 5.37k Bit Rate : 8.41k Sample Encoding: MPEG audio (layer I, II or III)
But I need 8.00 bitrate! I can easily produce it with sox q.wav -C 8 q.sox.mp3
Bit Rate : 8.41k
How can I force ffmpeg produce mp3s with 8.00 k bitrate exactly?
should change sample rate to lower than 32000(availables: 22050 24000 16000 11025 12000 8000), sample format to
s16(libmp3lame supported sample formats: s32p fltp s16p), and usingCBR(with bothminrateandmaxratethe same) mode to compress, command is blow should do the trick: