I'm trying to export a file as mp3 in pydub, but I get this error:
Automatic encoder selection failed for output stream #0:0. Default encoder for format mp3 is probably disabled. Please choose an encoder manually
How do I select an encoder manually, what is the default encoder, and how could I enable it?
PS: My Pydub opens mp3 files without any problem. I'm using Windows and Libav.
The other solution did not work for me. The problem for me was that the ffmpeg
version that came installed with Anaconda did not seem to be compiled with an encoder. So instead of:
DEA.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float mp3_at ) (encoders: libmp3lame )
I saw:
DEA.L. mp3 MP3 (MPEG audio layer 3) (decoders: mp3 mp3float mp3_at )
Without the (encoders: ...)
part.
My solution was to do this:
ffmpeg -codecs | grep mp3
, to check if there is any encoder (there isn't!).conda uninstall ffmpeg
brew install ffmpeg --with-libmp3lame
ffmpeg -codecs | grep mp3
, to check if there is any encoder (now there is!).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With