I am trying to create a silent / empty mp3 of (x) seconds using the command line. Quite a simple task I thought!
It seems lame is able to do somethign like this but I am unable to find anything that leads to achieving this.
Has anyone been able to do something like this?
Disclaimer: This is a unix-oriented approach (although sox is cross-platform and should get it done on windows only as well).
You'll need sox - "the [cross-platform] Swiss Army knife of sound processing programs".
This wrapper perl script, helps you generate any seconds of silence: http://www.boutell.com/scripts/silence.html
silence.pl
is quite short, so I include it here, since it's public domains:Then just
lame
it:You can use this command.
Change
<seconds>
to a number indicating the number of seconds of silence you require (for example,60
will create a minute).Avoid the nuisance of creating a wav header, and let lame handle a raw file:
setting ?=2 gives a 11 second file (@ standard 44KhZ, etc... parameters).
Note: this was tested on Unix; I understand there are dd and lame for windows, too.