damianociarla / node-ffmpeg

ffmpeg module for nodejs
MIT License
600 stars 140 forks source link

Audio bitrate parameter set in kbits/s while ffmpeg wants it in bits/s, causing result MP3 file to have poor quality #79

Open vandrieu opened 4 years ago

vandrieu commented 4 years ago

When using fnExtractSoundToMP3(), the command that is run behind the scenes is:

ffmpeg -i <input file> -vn -ar 44100 -ac 2 -ab 192 -f mp3 <output file>

When running this command manually in the terminal, here is what ffmpeg outputs:

[libmp3lame @ 0x7f9f8481ee00] Bitrate 192 is extremely low, maybe you mean 192k
The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s

And the final file is generated with a default 128 kbits/s, which is very poor quality