2

I want to greatly reduce the dynamic range of certain audio podcasts automatically. The effect needs to be applied to all episodes of some feeds, other feeds don't need this and can be ignored.

I'd like to have the compression applied to new episodes right after they are downloaded. Is this possible?

I currently accomplish this by using gPodder to grab episodes, then manually apply the compression with Audacity. These tools are fine but I'm open to trying something else, too.

1
  • Try sox - command line audio processor
    – daithib8
    Dec 26, 2011 at 17:10

1 Answer 1

2
+100

To do a Dynamic range compression you can run a command like this at terminal:

for file in ~/gpodder-downloads/*/*.mp3; do sox "$file" "$file-compresssed.mp3" compand 0.3,1 6:-70,-60,-20 -5 -90 0.2 ; rm "$file" ; done

You can limit the folder by changing it in the command above:

Let's say you want to compress only the files at "Linux Outlaws", then you change ~/gpodder-downloads/*/*.mp3 for ~/gpodder-downloads/Linux\ Outlaws/*.mp3.

You also can limit the name, trying to not compress your already compressed files. To do that you can change ~/gpodder-downloads/Linux Outlaws/*.mp3 for ~/gpodder-downloads/Linux\ Outlaws/linuxoutlaws24*.mp3 for example.

obs.: You will need sox and libsox.

-


If you prefer just to click at an icon, paste this at command-line and a "Program" called "Compress gPodder Podcasts" will be created for you and you just have to "Open" it whenever you want the compression.

cd ~/.local/share/applications/ && wget -c http://dl.dropbox.com/u/4098082/compress.desktop && cd ~/ && wget -c http://dl.dropbox.com/u/4098082/.compress && chmod +x ~/.compress

Have fun ;-)

6
  • This looks promising. I am interested in having this be automatic, though. I want some feeds to be compressed after downloading. The rest of them can be ignored. I listen to a lot of amateur podcasts and the sound quality is terrible. I've been manually compressing them for years and I want this to be automated. The key here will be watching certain folders for new files, and not re-compressing files a second time. Too complicated for me, sorry. Hoping someone else can teach me how. Jan 1, 2012 at 22:00
  • You can specify the folder you want and also limit the file names to catch the new ones. I've edited the answer explaining how to do that ;-)
    – desgua
    Jan 1, 2012 at 22:52
  • Sorry, I just tried this and realized this compresses the file itself, not the sound (or dynamic range). Many thanks for the reply but this won't do at all, it's a totally different thing. Here's a better explanation: en.wikipedia.org/wiki/Dynamic_range_compression Jan 2, 2012 at 13:13
  • Now I understand what you need. You should use sox then. I've updated the answer. Hope you enjoy.
    – desgua
    Jan 2, 2012 at 23:18
  • Muito Obrigado, I'll work on combining this answer with hpodder into one big script that does it all someday. So much to learn... Jan 3, 2012 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .