I need to convert mp3s from 5 folders to the lower bitrate (192) ones without changing their names. How can I do it? (what command)


ffmpeg cannot convert a file in-place. It must create a new file. If the five folders of mp3 files are all in a single parent folder, run this command from the parent folder.

Depending on how many files you have, this could take forever.

find . -iname "*.mp3" -execdir ffmpeg -i "{}" -ab 192k -map_meta_data 0:0 "{}_new.mp3" \; -execdir mv "{}" "{}.old" \; -execdir mv "{}_new.mp3" "{}" \;

This will find all mp3 files in the current directory and subdirectories, and for each mp3 file it finds:

  1. convert the file to the new bitrate (in a file named file_new.mp3)
  2. rename the original file to file.mp3.old
  3. rename the new file to the original name

In my testing, not all tags were preserved during the conversion. Please test this before you run it on your entire library.

  • However, I am getting this notice: "This program is only provided for compatibility and will be removed in a future release. Please use avconv instead." For future, we should work with avconv. – Mukesh Chapagain Oct 24 '13 at 8:02
  • @chapagain That sounds like you are on Ubuntu, where avconv is replacing ffmpeg. ffmpeg may still be appropriate on other Linux distributions. – William Jackson Oct 24 '13 at 14:58
  • Oh. Yes, I am on Ubuntu. Thanks for the info. – Mukesh Chapagain Oct 25 '13 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.