I've been looking for this for 2 days, and found a few command line tools to retrieve the level of an mp3, but nothing I can easily return a value from. I'm starting to think I need to invoke sox, have it write to a temp.txt, and then read the data back in.... but that's really ugly.
So here's the scenario, I have a few thousand mp3 files and I want to sort them, put ones that are at a lower RMS volume level in a different directory.
Anybody know of a library that can do that?
Those are both excellent places to start! I'll look intompg123.h and.... I "think" ffmpeg might have something similar, I'm pretty sure it was ffmpeg I used years ago to get file length for an mp3 player I wrote that "mixed" tracks.
Thank you both
Just to follow up, this ended ugly but it's being used infrequently and for personal use so whatever works I guess:
system("ffmpeg -i SampleBytes/44.mp3 -filter:a volumedetect -f null - 2>test.txt");
then I used:
getline() to pull it in from test.txt
erase() to remove unwanted characters from the string
stod() to convert it to a double
FWIW, I'm not a pro developer, or a student, just a green self taught homebody.
Thank you guys again for the help!