I need to convert my input audio file to the lowest possible size to transfer it over a radio transmitter.
Now with the AAC codec and MP3 format I used 8kbps for bit rate, 16 kHz for sampling rate and 1 channel, and my output data is about 3kb per second.
But when I change the sample rate to 8 kHz or a lower bit rate, I get an error saying that the codec does not support this setting.
Is there a setting to get lower rate for the output file?
P.S: Because I'm working on Android, it's hard to install codecs, so I must use the ffmpeg default codecs.
Update:
i used opus command line now this is my command:
ffmpeg -i a.mp3 -vn -c:a libopus -ac 1 -ar 8000 -b:a 500 -vbr constrained -compression_level 0 -application lowdelay output22.mkv
and the result is
Input #0, mp3, from 'a.mp3':
Metadata:
title : Salam (myahangha.ir)
artist : Sogand
album : Javooni
comment : ..:: myahangha.ir ::..
genre : 2019
date : 2019
Duration: 00:03:15.24, start: 0.000000, bitrate: 324 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 500x500 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
Metadata:
title : Radio Javan - Javooni.jpg
comment : Other
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> opus (libopus))
Press [q] to stop, [?] for help
[libopus @ 0000028b84d9e200] Bitrate 500 is extremely low, maybe you mean 500k
The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, matroska, to 'output24.mkv':
Metadata:
title : Salam (myahangha.ir)
artist : Sogand
album : Javooni
comment : ..:: myahangha.ir ::..
genre : 2019
date : 2019
encoder : Lavf58.27.102
Stream #0:0: Audio: opus (libopus) ([255][255][255][255] / 0xFFFFFFFF), 8000 Hz, mono, flt, 0 kb/s
Metadata:
encoder : Lavc58.51.100 libopus
size= 116kB time=00:03:15.25 bitrate= 4.9kbits/s speed= 396x
video:0kB audio:57kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 103.282921%
it seems opus dont accept bit rates lower then 4.9kbps :(