Prepping MP3s for Micro BR -- I made an app!

Started by Ted, September 24, 2023, 07:00:41 AM

Ted

As one of the folks still committed to our Lord and Savior, the Boss Micro BR, I bump into it's idiosyncrasies all the time.

Three of those idiosyncrasies have to do with how it handles imported MP3 files:

  • In the MP3/Trainer mode, it only can read MP3s with a sample rate of 44.1 kHz (I often get MP3s with a sample rate of 48 kHz - such as when I download a song from YouTube)
  • Sometimes the MBR gets confused about the length of a song because the length metadata in the MP3 is wrong (which effects the ability do do A/B looping in the MBR MP3 mode, which I use when practicing songs)
  • The MBR seems not to like MP3s with embedded artwork such as album covers (in MP3 mode, it will error near the end of the song)

So I made an app that will convert any problematic MP3s into versions that the MBR can use with no problems:

OLDFILE_mp3_Info_and_NEWFILE_mp3_Info_and_00New_and_00New_—_-zsh_—_80×24.png

You'll have to trust me that this fixes the "Length" metadata. I couldn't figure out how to show that in a screenshot.


Notes:

  • You have to have ffmpeg installed on your computer.
  • There is no UI; it's drag-and-drop: You drag your MP3s onto the app and after a few seconds it replaces the file(s) with the new modified versions. (Before I do this I make dedicated copies of the MP3s to use on the MBR. I don't necessarily want my MP3 collection to have these changes done to them.)
  • This is provided as-is. It works for me. It might not work for you.

Let me break it down.

There are three ffmpeg commands in one:

Convert to 44.1 kbps
ffmpeg -i OLDFILE.mp3 -ar 44100 NEWFILE.mp3
Fix Length Metadata
ffmpeg -i OLDFILE.mp3 -acodec copy NEWFILE.mp3
Remove Embedded Album Cover:
ffmpeg -i OLDFILE.mp3 -vn NEWFILE.mp3
Do all three of the above in a single command:
ffmpeg -i OLDFILE.mp3 -ar 44100 -b:a 44.1k -map_metadata 0 -id3v2_version 3 -vn -acodec libmp3lame NEWFILE.mp3
I packaged this into a shell script inside of a MacOS app.

If someone wants to do the same for a Windows computer (a BAT file maybe), here is the shell script.

#!/bin/bash

# Set the path to the ffmpeg executable
ffmpeg_path="/usr/local/bin/ffmpeg"

for input_file in "$@"
do
    # Set the output file name by removing the ".mp3" extension and adding "_new.mp3"
    output_file="${input_file%.mp3}_new.mp3"

    # Run the ffmpeg command to convert and adjust metadata
    "$ffmpeg_path" -i "$input_file" -ar 44100 -b:a 44.1k -strict -2 -map_metadata 0 -id3v2_version 3 -vn -acodec libmp3lame "$output_file"

    # Replace the original file with the new one
    mv "$output_file" "$input_file"
done

recorder
Boss Micro BR
recorder
Audacity
recorder
GarageBand for Mac