You are hereNormalizing your democracy / miro podcast volumes automatically

Normalizing your democracy / miro podcast volumes automatically


By dgtlmoon - Posted on 20 May 2008

Heres a handy script I use to normalize and compress the audio in podcasts downloaded by my Democracy / Miro player.

This is much nicer when im sitting at my desk working and listening, i dont need to fiddle with the volume-knob mid sub-routine when i'm coding, very handy for smoothing out audio in news feeds where they have a loud news banner/jingle/intro sound followed by various voices.

This just runs at cronjob using 'normalize-audio' audio package


apt-get install normalize-audio

My script keeps a list of jobs that were normalized so they dont get run again, and simply greps to see if they need doing or not


#!/bin/bash

find $HOME/.democracy|grep -i mp3$|while read fname
do
grep -q "$fname" $HOME/.democracy/normalized.db
if [ $? -eq 1 ]
then
normalize-audio -q "$fname" >> $HOME/.democracy/normalized-log.txt
echo "`date` $fname" >> $HOME/.democracy/normalized.db
fi
done

save this to scripts/normalize-audio and dont forget to chmod +x it


chmod +x scripts/normalize-audio

In my cronjob for this which you create by running the follow command as your user.


crontab -e

I simply have


17 * * * * scripts/normalize-democracy

:)

happy listening!

Your rating: None Average: 5 (1 vote)
AttachmentSize
normalize-democracy283 bytes

Nice one. Condier (if you get the time) having the script perhaps defaulting to democracy but allowing another argument. Would be a shame if deter some googlers with the hardware specific heading of this page.