[svlug] making a silent ogg or mp3

Florin Andrei florin at andrei.myip.org
Wed Jul 9 11:18:44 PDT 2003

Quoting George Georgalis <georgw at galis.org>:

> Hi all, how can I create n seconds of silent ogg or mp3, eg not
> recording the preamp with the level set to zero but something akin
> to
> cat /dev/zero > silence.ogg

You know, if you set your audio channels to mute (not zero, but _mute_)
in your volume control app, that's pretty much guaranteed to give you
perfect silence. We're living in a digital world nowadays... ;-)

However, if that doesn't appeal to you, then...
You may try to create a silent WAV file first, and then convert that
with lame or some other encoder. Like:

sox -t nul /dev/zero test.wav

Watch out though, this command will fill up your drive pretty fast.

If you specifically want N seconds of silence, you have to trim the WAV
file afterwards. If you know the bitrate, the number of channels, the
word size and the size of the WAV header, you could then simply cut the
file with dd or whatever. If you're not sure about those numbers, use
XMMS to verify your assumptions (it shows the file duration).
For the lazy :-) use Rezound or another audio editor instead of dd/xmms.

Another idea is to record whatever sound you like, and flatten it with
Rezound (reduce the volume to 0).

There's more than one way to do it. <shrug>

Florin Andrei


This mail sent through IMP: http://horde.org/imp/

More information about the svlug mailing list