I have a fairly large music collection, which is 9.9 GB in size. It’s mainly made up of MP3 files, with some OGG Vorbis files and a handful of WAV and WMA files. I would like to convert the entire library to AAC (or a better format, if there is one) in order to reduce the size of my collection by a considerable amount.
My library is organised using this folder structure:
~/Music/{Artist}/{Album}/{Track}
Can anyone recommend a GUI tool or shellscript which would recursively convert the files, map across the metadata, and dump the files into a different folder with the same directory structure?
EDIT: I have used a script to convert everything to Opus. Problem solved, just working out the kinks now.
Edit: I agree with other commenters, that it’s a bad idea to convert from one lossy codec to another one! If you want to do it anyway (and your files are at least encoded with high bitrates >192k), I’d recommend this:
The best lossy audio codec by far is opus (best perceived quality vs. small file size), which also has the benefit that it’s free and has got a great open source reference implementation that is also integrated in ffmpeg. So the conversion can be done with ffmpeg. I would personally use fd-find for multithreaded batch processing (using the -x option).
Converting from one lossy codec another isn’t generally recommended, plus you aren’t likely to save that much disk space by converting to AAC.
10 GB is actually pretty small for a local music collection, quite honestly. If I were you, I would try to expand your storage capacity instead of wasting time, and potentially audio quality, by transcoding.
I have an iPhone. The storage I have is all I’ve got.
-
Don’t buy iPhone
-
You need ffmpeg
-
Read this for the exact command
-
You can use the find command (in console) to list all mp3 files, these you can pipe into ffmpeg.
Just ask ChatGPT to write the shell script for you
Already did that. Thanks though.
By the way, owning an iPhone is not my choice. I’m 17 and still living with my parents, and my dad is a huge Apple fanboy. Ideally, I’d have either a Pixel with DivestOS, an Xperia with SailfishOS, a PinePhone with PostMarketOS, or an old Nokia 3210; but for now I’m stuck with my second hand iPhone SE.
-
That would be a pretty basic bash script, but as others have said, really not recommended.
You can use ffmpeg command line with some loop (for) tricks. If you want to save some space without re converting them, use .flac or .mka container with -copy flags
Don’t do it, but if you decide to do it anyway, use DbPoweramp