ffmpeg -i -c:a libopus -b:a bitrate The bitrate can be given like -b:a 96K for 96 kBit/s. The ffmpeg documentation has a list of options and descriptions for libopus. Here you can set -vbr options or a different -compression_level. Make sure you compiled ffmpeg with --enable-libopus! One caveat: it uses ffmpeg to handle audio format conversions (except for wav files, which python handles natively). note: you probably shouldn't do this conversion on GAE :/ even if it did support ffmpeg.
MP3 is a lossy codec. If you want to minimize quality loss, use a high bit rate. For example ffmpeg -i audio.ogg -c:a libmp3lame -q:a 0 newfile.mp3 will use the highest quality VBR (variable bit rate) preset from the Lame MP3 encoder, which will usually give you a file with an average bit rate between 220 and 260 kb/s. If your input file has a
Mono 8000Hz. effective bitrate of 13.6. I need to convert these to MP3. Current I am forced to send the file first through sox: sox input.wav -s input-pcm.wav. Then through lame: lame input-pcm.wav output.mp3. There are a couple of problems with this a 1MB file takes 5s and the MP3 sounds like crap.
FAQ:Installing the FFmpeg Import/Export Library. The optional FFmpeg library allows Audacity to import and export a much larger range of audio formats including M4A (AAC), AC3 and WMA and also to import audio from most video files. Because of software patents, Audacity cannot include the FFmpeg software or distribute it from its own websites.
ffmpeg -i audio.xxx -c:a flac audio.flac Share. Can't convert FLAC to MP3 with FFmpeg. 9. Problems with frame rate on video conversion using ffmpeg with libx264. 11. . 179 0 226 82 289 123 41 230 198

convert wav to mp3 ffmpeg