I'm on Centos 5.5, and would like to use sox to strip out
any periods of silence > 5 seconds from a batch mp3 audio
files.
Googling I found sox, but it does not seem to support mp3
files by default.
The man page says:
.mp3 MP3 Compressed Audio
MP3 audio files come from the MPEG standards for audio and video
compression. They are a lossy compression format that achieves
good compression rates with a mini- mum amount of quality loss.
Also see Ogg Vorbis for a similar format.
MP3 support in SoX is optional and requires access to either
or both the external libmad and libmp3lame libraries. To see if
there is support for Mp3 run sox -h and look for it under the
list of supported file formats as "mp3".
libmad is installed:
Installed Packages
Name : libmad
Arch : i386
Version : 0.15.1b
Release : 4.el5.rf
Size : 138 k
Repo : installed
Summary : MPEG audio decoding library
URL : http://www.underbit.com/products/mad/
License : GPL
Description: MAD (libmad) is a high-quality MPEG audio decoder. It currently
: supports MPEG-1 and the MPEG-2 extension to Lower Sampling
: Frequencies, as well as the so-called MPEG 2.5 format. All three
: audio layers (Layer I, Layer II, and Layer III a.k.a. MP3) are
fully
: implemented.
:
: MAD does not yet support MPEG-2 multichannel audio (although it
: should be backward compatible with such streams) nor does it
: currently support AAC.
SoX is installed:
Name : sox
Arch : i386
Version : 12.18.1
Release : 1.el5_5.1
Size : 659 k
Repo : installed
Summary : A general purpose sound file conversion tool.
URL : http://sox.sourceforge.net/
License : GPL
Description: SoX (Sound eXchange) is a sound file format converter SoX can
convert
: between many different digitized sound formats and perform simple
: sound manipulation functions, including sound effects.
[root at karsites ~]# sox -h
sox: Version 12.18.1
Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]
gopts: -e -h -p -q -S -V
fopts: -r rate -c channels -s/-u/-U/-A/-a/-i/-g/-f -b/-w/-l/-d -v volume -x
effect: avg band bandpass bandreject chorus compand copy dcshift
deemph earwax echo echos fade filter flanger highp highpass lowp
lowpass mask mcompand noiseprof noisered pan phaser pick pitch
polyphase rate repeat resample reverb reverse silence speed stat
stretch swap synth trim vibro vol
effopts: depends on effect
Supported file formats: aiff al alsa au auto avr cdr cvs dat vms gsm
hcom la lu maud nul ossdsp prc raw sb sf sl smp sndt sph 8svx sw txw
ub ul uw voc vorbis vox wav wve
Yet the mp3 support is not showing up for SoX in the above
list of supported file formats.
Any suggestions how to tell SoX to use the mp3 format I
need please?
Or are there any other programs that can be used to strip
silent periods from MP3's?
Using Audacity to manually edit each sound file is
definately NOT and option.
Kind Regards,
Keith Roberts
--
In theory, theory and practice are the same;
in practice they are not.
This email was sent from my laptop with Centos 5.5
On Sun, Dec 12, 2010 at 05:48:36PM +0000, Keith Roberts wrote:> I'm on Centos 5.5, and would like to use sox to strip out > any periods of silence > 5 seconds from a batch mp3 audio > files.ffmpeg can do this. Assuming it's the first 5 seconds (as an example), syntax would be ffmpeg -i longerfile.mp3 -ss 5 -t 300 newfile.mp3 on a 300 second mp3. In other words, the -ss is the start time and the -t is the duration of time you want to keep. So, that will give you all but the first 5 seconds of the file. You would have to know the duration of each file. You might also want to use the -sameq argument as well, which will keep the new file at the same quality as the old one. ffmpeg -i longerfile.mp3 -ss 5 -t 300 -sameq newfile.mp3 -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 Cordelia: We were just discussing whether or not we should offer to pay Gunn. Angel: No you weren't. Wesley: Well, our discussions tend to go about 3 minutes, then it's strictly name calling and hair pulling.
From: Keith Roberts <keith at karsites.net>> I'm on Centos 5.5, and would like to use sox to strip out > any periods of silence > 5 seconds from a batch mp3 audio > files. > Googling I found sox, but it does not seem to support mp3 > files by default.I don't think it is autodetected at runtime. You might have to recompile the src.rpm... JD
On Sunday, December 12, 2010 12:48:36 pm Keith Roberts wrote:> Or are there any other programs that can be used to strip > silent periods from MP3's?Please see the mp3splt and mp3join programs referenced by http://stream-recorder.com/forum/mp3-splitting-based-silence-detection-command-line-t5510.html The most difficult thing you'll have to do is define what you mean by silence; even with 16-bit source material referenced to K14 (-14dBFS = 0dBr; good radio quality headroom) you have a low end limit at -84.08dBr (16 bits * 6.02dB + 1.76dB gives 98.08dB of dynamic range; with -14dBFS as the 0 dB relative reference, that gives a minimum audio level (noise floor) of -84.08dBr). Even with 24 bit audio you never reach absolute silence (- infinity dBr; at best, using a K20 reference (-20dBFS = 0dBr; cinematic headroom standard) you get to -126.46dBr; 146.46dB of dynamic range at 24 bits, which exceeds the human ear's dynamic range of 140dB). But the mp3splt tool allows you to tell it what you mean by silence; you set a dB threshold and set a time the signal must be below that threshold; then you re-join the split files and you have your silence-removed audio. For more info on the 'K system' for digital audio to reference level setup, see Bob Katz's 'Mastering Audio' (has nothing to do with the common meaning of mastering, as in learning about audio; this book is about taking a mixed track and then mastering it for duplication) or his website, specifically the pages at: http://www.digido.com/level-practices-part-2-includes-the-k-system.html
On Monday, December 13, 2010 11:26:12 am Lamar Owen wrote:> On Sunday, December 12, 2010 12:48:36 pm Keith Roberts wrote: > > Or are there any other programs that can be used to strip > > silent periods from MP3's? > > Please see the mp3splt and mp3join programs referenced by > http://stream-recorder.com/forum/mp3-splitting-based-silence-detection-command-line-t5510.htmlAnother note: ATRPM's has packages for CentOS. Judicious use of priorities might make it possible for you to install from there, or rebuilt from the source RPM and see if the dependencies are satisfied with CentOS + EPEL, or just use Axel Thimm's repo as is, depending upon your own preference. And it's 'mpgjoin' not 'mp3join', sorry.
On Mon, 13 Dec 2010, Lamar Owen wrote:> To: Keith Roberts <keith at karsites.net> > From: Lamar Owen <lowen at pari.edu> > Subject: Re: [CentOS] Stripping silent periods from MP3s > > On Monday, December 13, 2010 12:01:38 pm you wrote: >> PS The list is quiet today. Hope I'm not loosing anything from it :) > > Did you get my pointer to mp3splt+mpgjoin, both available from ATRPMs?I'm having serious problems with my email Lamar. This became apparent when I did not get a mail I posted to the list. Please see here how my emails were posted blank. http://fossplanet.com/f11/%5Bcentos%5D-stripping-silent-periods-mp3s-85190/ Did they appear empty to others on the list? I'm trying to figure out the problem with my hosting provider right now. Since turning SpamAssasin off, I seem to be geting my mail again. To soon to say whether SA was at fault. I doubt it. Kind Regards, Keith Roberts -- In theory, theory and practice are the same; in practice they are not. This email was sent from my laptop with Centos 5.5