jiaaro / pydub

Manipulate audio with a simple and easy high level interface
http://pydub.com
MIT License
8.94k stars 1.05k forks source link

Export to AAC from any audio codec #363

Open ancientPrinter opened 5 years ago

ancientPrinter commented 5 years ago

Steps to reproduce

  1. Write this program to export audio files to AAC: from pydub import AudioSegment sound = AudioSegment.from_file("input-file.mp3") sound.export("output-file.aac", format="aac", bitrate="128k")
  2. Put audio file (mp3, m4a, wav, etc) in the same folder that the program.
  3. Run the program.

Expected behavior

Succesful conversion like previous cases (aac to mp3, mp3 to wav, wav to mp3, m4a to mp3, etc).

Actual behavior

The converted file size is 0kb and the format is like the input file (in this case, mp3).

Your System configuration

wells1013 commented 5 years ago

+1

chess92 commented 4 years ago

The only workaround that I have found so far is using format="mp4" but leaving the file path as output/file.m4a.

I have noticed on my macOS that Chrome has starting downloading m4a files as mp4 so maybe my environment is messed up.

Does anyone else experience this?

AlexiWolf commented 4 years ago

I've found that exporting with format="adts" works for .aac and .m4a files. Not being able to export with format="aac" feels like a bug, though.