I have created a PHP code which compresses mp3 while uploaded to 32kbps bit rate I have referred this thread
How to compress or convert to low quality Mp3 file from PHP
used this code
exec("ffmpeg -i inputfile.mp3 -ab 24000 outputfile.mp3")
but the problem is I can’t compress more than 32kbps .my code instruct to compress up to 24kbps but after execution, I can see the output file is 32kbps. can anyone tell what should I do so that I can compress more than 32kbps .or is there any limitation of ffmpeg ??
The reason you cant achieve lower then 32kbps is because of the sample rate most likely is still 44100-Hz meaning larger stream size, you have a few options
44100-Hz, 22050-Hz, and 11025-Hzas valid frequency’s.Try (very low quality):
ffmpeg -i inputfile.mp3 -acodec libmp3lame -b:a 8k -ac 1 -ar 11025 outputfile.mp3-b:a = audio bitrate
-ar = sample rate