Batch process mp3 files

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
somenick
Posts: 19
Joined: Thu Feb 17, 2011 8:21 am
Operating System: Please select

Batch process mp3 files

Post by somenick » Thu Feb 17, 2011 4:38 pm

Hi,

Have a bunch of mp3 files. For each, I'd want to add silence at the end, same time as length of track, and loop the playback for a number of times. The resulting audio file should be like this ::

(Track + silence)*(loop number)

Or sometimes, a different pattern.

(Track + Track + silence)*(loop number)

I read about Chains in Audacity, but the silence command is not available on the Chain menu. If this can't be automated with audacity, any other suggestions?

Any ideas? Thanks.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Batch process mp3 files

Post by steve » Thu Feb 17, 2011 6:39 pm

You could do this using SoX http://sox.sourceforge.net/
It's a command line program so you would need to write a script to run it.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

somenick
Posts: 19
Joined: Thu Feb 17, 2011 8:21 am
Operating System: Please select

Re: Batch process mp3 files

Post by somenick » Fri Feb 18, 2011 9:46 am

Thanks, my problem is that the Windows SOX binaries do not support mp3 format. Makes things a bit more difficult now that I have to convert to wav or ogg first.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Batch process mp3 files

Post by steve » Fri Feb 18, 2011 12:36 pm

If you're writing a script, you could use LAME as a command line program to convert the MP3s, then use SoX for the other operations (in the same script).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

somenick
Posts: 19
Joined: Thu Feb 17, 2011 8:21 am
Operating System: Please select

Re: Batch process mp3 files

Post by somenick » Thu Feb 24, 2011 3:51 am

the link for compiled lame.exe executable is wrong in the documentation here >> http://wiki.audacityteam.org/index.php? ... mmand_line

From the lame homepage, i got this:: http://www.rarewares.org/index.php

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Batch process mp3 files

Post by steve » Thu Feb 24, 2011 11:55 am

Thanks for the report somenick. I'll pass that on to the maintainer of that page.

For standalone Lame, the rarewares always has good up to date builds as well as experimental alpha versions. However the rarewares builds are not recommended for use in Audacity for compatibility reasons.
Rarewares also hosts one of my favourite graphical MP3 batch encoders "LameDropXPd"
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

bgravato
Posts: 2080
Joined: Wed Jan 13, 2010 8:56 pm
Operating System: Please select

Re: Batch process mp3 files

Post by bgravato » Thu Feb 24, 2011 12:03 pm

If you have the original files in wav format then you could use sox to batch process the files and add the silence and output to wav too.

Then you could use other app to batch convert the wav's to mp3. I'm not a windows user, but I'd be surprised if there wasn't some free graphical wav to mp3 encoder that works in batch mode...
Include as much details as you can in your post (Audacity version, Operating System, Equipment used, etc).
Please post your question in the appropriate forum (regarding audacity version and operating system).

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Batch process mp3 files

Post by Gale Andrews » Thu Feb 24, 2011 8:09 pm

somenick wrote:the link for compiled lame.exe executable is wrong in the documentation here >> http://wiki.audacityteam.org/index.php? ... mmand_line
Thanks. I've updated the link to provide a package for LAME 3.98.3.

The "Lame v3.98.3 for Audacity on Windows.exe" installer from http://lame.buanzo.com.ar/ does already include the command-line executable (lame.exe). You can use it in Audacity 1.3 if you export using (external program).

Next time we update the LAME installer we may as well include the USAGE.txt documentation for LAME then there will be no need for this separate package.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Batch process mp3 files

Post by steve » Thu Feb 24, 2011 8:42 pm

Thanks Gale.
Gale Andrews wrote:Next time we update the LAME installer we may as well include the USAGE.txt documentation for LAME then there will be no need for this separate package.
That would be a good idea.
bgravato wrote: I'd be surprised if there wasn't some free graphical wav to mp3 encoder that works in batch mode...
As in my previous post, one of my favourites (free) is LameDropXPd
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply