3

I'm looking for a software program that will take an MP3 or MP4 as input and produce as output a text file with peak or average volume for each second (or some interval of seconds or sub-seconds).

Essentially, I want to produce a volume graph, but need the raw volume numbers so I can align the sound volumes to other data.

Ideally, I would like a 'headless' script so I can automate the extraction from multiple, very long sound files.

Thanks very much for your help.

2
  • what have you already tried? what is the purpose besides measuring volume on mp3/4 files? do you have a budget? Commented Jun 24, 2015 at 9:33
  • @ArnoudTraa I'm trying to validate actigraph data on sleep/wake time by overlaying sound recordings of snoring and movement (and luminosity). I haven't tried anything yet, although I've done a fair amount of googling to find something with this functionality. This is just for me, but I could spend a few hundred dollars if need be.
    – L. Blanc
    Commented Jun 24, 2015 at 11:42

2 Answers 2

4

As you don't mention which platform/OS you're running, I would suggest loudness-scanner.

Something like :

loudness dump -m 0.1 *.mp3 > data.txt

should provide you with a text file containing raw data (momentary loudness every 0.1 second).

3
  • I'm so amazed someone actually already wrote a program to do this. Is nothing left undone in the world? Commented Jun 24, 2015 at 11:58
  • @audionuma This sounds like exactly what i want, but i'm having trouble getting it to build on OS X, which is my primary platform. I could run it on Windows or get a Linux box on Amazon if it comes to that. if i can get that sorted and run a successful test, I'll accept this as the answer
    – L. Blanc
    Commented Jun 24, 2015 at 15:40
  • @audionuma I have not been able to get a build on OS X, but will accept this answer anyway since it appears to be sound. Like your r128x library, btw. :)
    – L. Blanc
    Commented Jun 25, 2015 at 12:01
0

I'm suprised you didn't find this earlier...

http://projects.sappharad.com/mp3gain/

If you read through the webpage it seems obvious that there is a scriptable option available as well. Can't test it as I don't have a Mac OS X test machine available currently though.

http://projects.sappharad.com/mp3gain/aacgain_19_mac_cmdline.zip

1
  • It is a nice program, but it doesn't provide the momentary gain data as an output, it only adjusts the gain on the file or files as a whole.
    – L. Blanc
    Commented Jun 27, 2015 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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