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.
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-12-2010, 05:46 PM
Scott Robbins
Stripping silent periods from MP3s
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.
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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-12-2010, 08:02 PM
Keith Roberts
Stripping silent periods from MP3s
On Sun, 12 Dec 2010, Scott Robbins wrote:
> To: CentOS mailing list <centos@centos.org>
> From: Scott Robbins <scottro@nyc.rr.com>
> Subject: Re: [CentOS] Stripping silent periods from MP3s
>
> 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
Hi Scott.
Thanks for the reply.
I need to remove (or shorten to 5 seconds) any silent
sections throughout the Mp3 file - not just the beginning or
the end.
So all I end up with in the output file is the original,
with those silent periods truncated down to ~ 5 secs.
Keith
--
In theory, theory and practice are the same;
in practice they are not.
This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-12-2010, 08:21 PM
Jorge Fábregas
Stripping silent periods from MP3s
On Sunday 12 December 2010 17:02:27 Keith Roberts wrote:
> I need to remove (or shorten to 5 seconds) any silent
> sections throughout the Mp3 file - not just the beginning or
> the end.
I usually do this in Audacity (graphical app) and the feature is called
"Truncate Silence". I'm not sure if you need to do this in a console app.
Also, Audacity will uncompress your mp3 file to perform the edit which then
you can export back to mp3 (transcode).
I don't know of any app that will trim silence on MP3s in a lossless way.
HTH,
Jorge
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 10:01 AM
John Doe
Stripping silent periods from MP3s
From: Keith Roberts <keith@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 02:39 PM
Keith Roberts
Stripping silent periods from MP3s
On Sun, 12 Dec 2010, Jorge Fábregas wrote:
To: centos@centos.org
From: Jorge Fábregas <jorge.fabregas@gmail.com>
Subject: Re: [CentOS] Stripping silent periods from MP3s
On Sunday 12 December 2010 17:02:27 Keith Roberts wrote:
I need to remove (or shorten to 5 seconds) any silent
sections throughout the Mp3 file - not just the beginning or
the end.
I usually do this in Audacity (graphical app) and the feature is called
"Truncate Silence". I'm not sure if you need to do this in a console app.
Also, Audacity will uncompress your mp3 file to perform the edit which then
you can export back to mp3 (transcode).
I don't know of any app that will trim silence on MP3s in a lossless way.
Hi Jorge. Thanks for the reply.
I know about audacity, but I want a command line tool that
will work overnight, on a batch of mp3 files, each about
15MB per hour.
It would be handy if audacity could do this from the
command-line as a batch job.
I just want to set the job up to run, and come back to it
when it's done.
Kind Regards,
Keith
PS The list is quiet today. Hope I'm not loosing anything
from it
--
In theory, theory and practice are the same;
in practice they are not.
This email was sent from my laptop with Centos 5.5_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 02:49 PM
John Hodrien
Stripping silent periods from MP3s
On Mon, 13 Dec 2010, Keith Roberts wrote:
> I know about audacity, but I want a command line tool that
> will work overnight, on a batch of mp3 files, each about
> 15MB per hour.
You've got a command line tool that does what you need, it just needs
rebuilding with mp3 support. I'm with John Doe's suggestion on this one.
Install lame-devel from rpmforge, download the src.rpm for sox, rpmbuild
--rebuild it, install it, mp3 support is now in.
jh
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 03:26 PM
Lamar Owen
Stripping silent periods from MP3s
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 03:47 PM
Lamar Owen
Stripping silent periods from MP3s
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.html
Another 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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
12-13-2010, 04:01 PM
Keith Roberts
Stripping silent periods from MP3s
On Sun, 12 Dec 2010, Jorge Fábregas wrote:
To: centos@centos.org
From: Jorge Fábregas <jorge.fabregas@gmail.com>
Subject: Re: [CentOS] Stripping silent periods from MP3s
On Sunday 12 December 2010 17:02:27 Keith Roberts wrote:
> I need to remove (or shorten to 5 seconds) any silent
> sections throughout the Mp3 file - not just the beginning or
> the end.
I usually do this in Audacity (graphical app) and the feature is called
"Truncate Silence". I'm not sure if you need to do this in a console app.
Also, Audacity will uncompress your mp3 file to perform the edit which
then
you can export back to mp3 (transcode).
I don't know of any app that will trim silence on MP3s in a lossless way.
Hi Jorge. Thanks for the reply.
I know about audacity, but I want a command line tool that will work
overnight, on a batch of mp3 files, each about 15MB per hour.
It would be handy if audacity could do this from the command-line as a batch
job.
I just want to set the job up to run, and come back to it when it's done.
Kind Regards,
Keith
PS The list is quiet today. Hope I'm not loosing anything from it
--
In theory, theory and practice are the same;
in practice they are not.
This email was sent from my laptop with Centos 5.5_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos