Why do online audiobook shops always split everything into tiny MP3 files? I honestly don’t get it. I bought this audiobook for my daughter and what do I end up with? Not one nice file, but fifteen pieces for a 30-minute story. Each one is named something like 001.mp3 – 015.mp3. Whoever thought splitting books like this is helpful probably never tried to use an actual MP3 player.
To make things worse, my daughter uses this basic MP3 player I gave her. It’s not some touchscreen thing, just old-school with a plain list for everything. She uses that file list to pick what to play “cover flow”, if you can call it that. Problem now: instead of seeing one book, there’s a heap of tracks for every story. She’s supposed to go and pick the next one every two or three minutes? Fat chance. She can barely figure out the first file. Good luck explaining “go pick track 8” to a kid who’s just starting to read.
So after getting annoyed at both the audiobook store and the MP3 player, I did what any stubborn IT-Parent does—I wrote my own fix. No, I’m not going to open up Audacity and manually join fifteen files, thanks very much. That would be the definition of pointless.
The script I wrote is pretty simple but does exactly what I need. First thing: check if ffmpeg and ffprobe are installed. Once that’s out the way, it goes through the folder and finds all the mp3 files (skips the output so it won’t try to merge itself). It sorts them natuarally by number, pulls out mp3tag of Title, artist, year from the first file, then makes a temp list for ffmpeg to use.
It then throws together a command that tells ffmpeg to merge them all in order, stick the cover art from the first one on there, keeps that meta info (title/artist/year/cover), and merges it into one big file called merged_audio.mp3. Before anything happens it shows me the command it’ll run – so if I made a typo or something’s weird, I can bail out. If I’m good with it, I just type ‘y’ and go. When it’s done, the script prints out file size, duration and metadata with ffprobe, tidies up its temp files and that’s it.
All I need to do now: rename the new merged file to something my daughter recognizes, copy it to her MP3 player and hand it over. Done. She gets an audiobook she can actually listen to start-to-finish without dad playing tech support every three minutes.
I don’t know if every audiobook shop does this, but honestly this splitting files thing has to stop. If you’re selling audio, at least give us the option for one simple track! Until then, scripts save the day again. If anyone else got stuck with a pile of mini-MP3s, I linked a gist to the merge python script below. Maybe next time they’ll just send a cassette tape; would probably be less trouble at this point.