filtering bad recordings

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

filtering bad recordings

Marty Huntzberry
I have a lecture recording (no music, just voice) that was recorded with a digital recorder about 1 foot from the speaker at 22 kHz and 16 bit mono.  It sounds like the speaker is in a well.  Can I clean the recording up a bit with a filter in lame?

Marty

_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

tech list
Marty, unfortunately, there's not much you can do since the recording itself
was low quality. 22KHz should have been OK for voice, but looks like the mic
was placed badly
or the acoustics of your room/hall was not the best.
Your best bet would be to forget about lame for the moment and try out with
some audio
tools like audacity. Keep a copy of the original recording and play around
with some noise
cancellation, filtering etc. to see what sounds best.


On 1/24/07, [hidden email] <[hidden email]> wrote:

>
> I have a lecture recording (no music, just voice) that was recorded with a
> digital recorder about 1 foot from the speaker at 22 kHz and 16 bit
> mono.  It sounds like the speaker is in a well.  Can I clean the recording
> up a bit with a filter in lame?
>
> Marty
>
> _______________________________________________
> mp3encoder mailing list
> [hidden email]
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

xiphmont
On 3/15/07, tech list <[hidden email]> wrote:
> Marty, unfortunately, there's not much you can do since the recording itself
> was low quality. 22KHz should have been OK for voice, but looks like the mic
> was placed badly
> or the acoustics of your room/hall was not the best.
> Your best bet would be to forget about lame for the moment and try out with
> some audio
> tools like audacity. Keep a copy of the original recording and play around
> with some noise
> cancellation, filtering etc. to see what sounds best.

The Postfish tool (linux only) has a filter called 'deverb' that can
remove some amount of excess reverberation, so long as there's a
reasonably strong direct signal in the midst of the echo/reverb.

Monty
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Marty Huntzberry
In reply to this post by tech list
The only effect in audacity and lame that seems to work is reducing the audio.  Why does it sound good in it's original mp3 format of 192 kbps and 44
khz but sounds bad at 24 kbps and 22 khz?  It's mainly a voice lecture.

On Thu, 15 Mar 2007 16:12:53 +0530
"tech list" <[hidden email]> wrote:

Marty, unfortunately, there's not much you can do since the recording itself
was low quality. 22KHz should have been OK for voice, but looks like the mic
was placed badly
or the acoustics of your room/hall was not the best.
Your best bet would be to forget about lame for the moment and try out with
some audio
tools like audacity. Keep a copy of the original recording and play around
with some noise
cancellation, filtering etc. to see what sounds best.


On 1/24/07, [hidden email] <[hidden email]> wrote:
>
> I have a lecture recording (no music, just voice) that was recorded with a
> digital recorder about 1 foot from the speaker at 22 kHz and 16 bit
> mono.  It sounds like the speaker is in a well.  Can I clean the recording
> up a bit with a filter in lame?
>
> Marty
>
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Ishaan Dalal
Marty,

Unfortunately, Lame is known to be not really optimized for low-bitrate
encoding. The closest option would be to the Fraunhofer codec at 22 KHz/32
kbps (the ACM codec bundled with Windows can encode at that rate). If it is
voice, you should try speech codecs - they will get you much better quality
at the kind of bitrates you want. I'd suggest Speex.

Are you transcoding? (i.e. you don't have the original 22 KHz/16-bit PCM
(WAV) audio, but are using the 192 kbps MP3 as the "source")?

Cheers,
-Ishaan

On 3/15/07, Marty Huntzberry <[hidden email]> wrote:

>
> The only effect in audacity and lame that seems to work is reducing the
> audio.  Why does it sound good in it's original mp3 format of 192 kbps and
> 44
> khz but sounds bad at 24 kbps and 22 khz?  It's mainly a voice lecture.
>
> On Thu, 15 Mar 2007 16:12:53 +0530
> "tech list" <[hidden email]> wrote:
>
> Marty, unfortunately, there's not much you can do since the recording
> itself
> was low quality. 22KHz should have been OK for voice, but looks like the
> mic
> was placed badly
> or the acoustics of your room/hall was not the best.
> Your best bet would be to forget about lame for the moment and try out
> with
> some audio
> tools like audacity. Keep a copy of the original recording and play around
> with some noise
> cancellation, filtering etc. to see what sounds best.
>
>
> On 1/24/07, [hidden email] <[hidden email]> wrote:
> >
> > I have a lecture recording (no music, just voice) that was recorded with
> a
> > digital recorder about 1 foot from the speaker at 22 kHz and 16 bit
> > mono.  It sounds like the speaker is in a well.  Can I clean the
> recording
> > up a bit with a filter in lame?
> >
> > Marty
> >
> _______________________________________________
> mp3encoder mailing list
> [hidden email]
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

xiphmont
In reply to this post by Marty Huntzberry
On 3/15/07, Marty Huntzberry <[hidden email]> wrote:
> The only effect in audacity and lame that seems to work is reducing the audio.  Why does it sound good in it's original mp3 format of 192 kbps and 44
> khz but sounds bad at 24 kbps and 22 khz?  It's mainly a voice lecture.

...maybe becasue you've eliminated 87% of the data?  Just a hunch.

(That would sound good in a voice-specific codec at 8kHz.  I don't
know why you think mp3 at 24kHz would sound good).

Oh, also, if you're going from stereo->mono, that's going to make an
echoey environment way less intelligible.  You've collapsed a 360
degree circular soundfield right into the center along with the voice.
 You don't get to use any of the brain's spiffy localization hardware
to pick out voice from the ambient anymore, now the voice and all the
noise localize to the same place.

Monty
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Marty Huntzberry
In reply to this post by Ishaan Dalal
I will look into these codecs.  Are these lame codecs or audacity?  I'm running Fedora Core and Slackware Linux.

Some are wondering why I want such a low bit rate.  Here's why-I run an mp3 server that streams and sounds best at low bitrates (it's not choppy on
low bandwith connections).  I have ~ 5000 mp3s and most are speeches.  Some were pre-compressed at 24 kbps and 22 khz and sound great.  The ones I'm
trying to compress with lame are recorded at 192 kbps and 44 khz.  So, it's been done and it should work for me.  Here are links to 2 speeches:

A 24 kpbs 22 khz speech download that sounds fine:

http://media.ccphilly.org:81/Teaching/Audio/B02_Exodus/WED54924.mp3

The 192 kpbs 44 khz speech I want to compress:

http://www.ccbellmawr.com/radioprogram/Week20070312/SH20070313%20Nehem4_5b.mp3



Marty

On Thu, 15 Mar 2007 23:03:47 -0400
"Ishaan Dalal" <[hidden email]> wrote:

Marty,

Unfortunately, Lame is known to be not really optimized for low-bitrate
encoding. The closest option would be to the Fraunhofer codec at 22 KHz/32
kbps (the ACM codec bundled with Windows can encode at that rate). If it is
voice, you should try speech codecs - they will get you much better quality
at the kind of bitrates you want. I'd suggest Speex.

Are you transcoding? (i.e. you don't have the original 22 KHz/16-bit PCM
(WAV) audio, but are using the 192 kbps MP3 as the "source")?

Cheers,
-Ishaan

On 3/15/07, Marty Huntzberry <[hidden email]> wrote:

>
> The only effect in audacity and lame that seems to work is reducing the
> audio.  Why does it sound good in it's original mp3 format of 192 kbps and
> 44
> khz but sounds bad at 24 kbps and 22 khz?  It's mainly a voice lecture.
>
> On Thu, 15 Mar 2007 16:12:53 +0530
> "tech list" <[hidden email]> wrote:
>
> Marty, unfortunately, there's not much you can do since the recording
> itself
> was low quality. 22KHz should have been OK for voice, but looks like the
> mic
> was placed badly
> or the acoustics of your room/hall was not the best.
> Your best bet would be to forget about lame for the moment and try out
> with
> some audio
> tools like audacity. Keep a copy of the original recording and play around
> with some noise
> cancellation, filtering etc. to see what sounds best.
>
>
> On 1/24/07, [hidden email] <[hidden email]> wrote:
> >
> > I have a lecture recording (no music, just voice) that was recorded with
> a
> > digital recorder about 1 foot from the speaker at 22 kHz and 16 bit
> > mono.  It sounds like the speaker is in a well.  Can I clean the
> recording
> > up a bit with a filter in lame?
> >
> > Marty
> >
> _______________________________________________
> mp3encoder mailing list
> [hidden email]
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder


_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

xiphmont
Having listened to your sample, aside from *alot* of clipping, that
audio should reduce to 22kHz mono very nicely.  It's a nice clear
recording.

I did a quick declip/channel merge with postfish, downsample with sox
and encoded it with lame and it came out sounding fine-- at least as
good as the 'good' sample you referenced.

So... what are you actually doing?  Don't spare the details.  Are you
encoding as a stereo 24kbpbs file by accident?

Monty
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Marty Huntzberry
Would you post the commands that you used with postfish, sox, and lame?

I cannot get postfish to compile on my Athlon 64 running Fedora Core Linux 64 bit edition.  I'll try compiling in Slackware 11 (32 bit i86 edition)
and see if it works there.  

What I'm trying to do is reduce it to a 22 kHz mono mp3 file like you did.  I loaded the original file into Audacity so I
could see it...it seems to have been recorded too loud and the peak sounds go off the chart.  In lame I've been reducing the sound, encoding in mono
at 22 kHz and 24 kbps with this:

lame -m m -b 24 --resample 22.05 -f --scale-r -2 --mp3input original.mp3 compressed .mp3

Marty

On Fri, 16 Mar 2
On Fri, 16 Mar 2007 18:48:00 -0400
[hidden email] wrote:

Having listened to your sample, aside from *alot* of clipping, that
audio should reduce to 22kHz mono very nicely.  It's a nice clear
recording.

I did a quick declip/channel merge with postfish, downsample with sox
and encoded it with lame and it came out sounding fine-- at least as
good as the 'good' sample you referenced.

So... what are you actually doing?  Don't spare the details.  Are you
encoding as a stereo 24kbpbs file by accident?

Monty
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder


_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

xiphmont
On 3/17/07, Marty Huntzberry <[hidden email]> wrote:
> Would you post the commands that you used with postfish, sox, and lame?

Postfish is UI-based; but you can skip the Postfish step as the
declipping was the only interesting bit.

> I cannot get postfish to compile on my Athlon 64 running Fedora Core Linux 64 bit edition.  I'll try compiling in Slackware 11 (32 bit i86 edition)
> and see if it works there.

I'll have a look at that.  Last time I tried building on FC x86_64 was
rawhide between FC5 and FC6 (and it did build then).  I haven't put
any time into it lately.

> What I'm trying to do is reduce it to a 22 kHz mono mp3 file like you did.  I loaded the original file into Audacity so I
> could see it...it seems to have been recorded too loud and the peak sounds go off the chart.

Yeah. Even worse it looks like it ran through a 'soft clipper'
(whoever produced this did it on purpose, whether or not he realized
it) so the declipper on Postfish is of limited usefulness.  Clipping
would have been reversable, but a 'soft clipper' thoroughly screws the
signal... it makes clipping look like not clipping, but tends not to
actually improve the sound quality at all.

The declipper might still make an improvement, but only at the expense
of real processor time... I'm talking about cranking the trigger down
to -6dB and letting it crunch for days :-(

> In lame I've been reducing the sound, encoding in mono
> at 22 kHz and 24 kbps with this:
>
> lame -m m -b 24 --resample 22.05 -f --scale-r -2 --mp3input original.mp3 compressed .mp3

Thanks for this.

--scale-r -2 is increasing the volume, not decreasing it.  You want
--scale-r .5 or the like.

-f is telling the encoder 'quality doesn't matter; be as fast as
possible'.  This could be the source of your problems.  You want -h
for low bitrate ('quality matters more than speed').

With those changes, eg:

lame -h -m m -b 24 --resample 22.05 --scale-r .5  --mp3input
SH20070313\ Nehem4_5b.mp3 nehem-h.mp3

The output sounds pretty good.  Still clipped, but the lowpass takes
the edge off it.

Monty

>
> Marty
>
> On Fri, 16 Mar 2
> On Fri, 16 Mar 2007 18:48:00 -0400
> [hidden email] wrote:
>
> Having listened to your sample, aside from *alot* of clipping, that
> audio should reduce to 22kHz mono very nicely.  It's a nice clear
> recording.
>
> I did a quick declip/channel merge with postfish, downsample with sox
> and encoded it with lame and it came out sounding fine-- at least as
> good as the 'good' sample you referenced.
>
> So... what are you actually doing?  Don't spare the details.  Are you
> encoding as a stereo 24kbpbs file by accident?
>
> Monty
> _______________________________________________
> mp3encoder mailing list
> [hidden email]
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
>
> _______________________________________________
> mp3encoder mailing list
> [hidden email]
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Marty Huntzberry
The version of postfish I found is a pre-release that's pretty old from here:

http://svn.xiph.org/trunk/postfish/

It won't compile in Slackware either.....where are you getting postfish?

I tried the -h switch and thought the speaker sounded bad at times.

That r -2 switch makes it sound softer.  Other values did increase (r -1, r-3)....maybe it's a glitch in lame.  Looking at the output in audacity you
can see it decreaes.

Marty
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

bouvigne
Marty Huntzberry a écrit :

> That r -2 switch makes it sound softer.  Other values did increase (r -1, r-3)....maybe it's a glitch in lame.  Looking at the output in audacity you
> can see it decreaes.

To be honest we are expecting --scale to be used with a float number
(ex: 0.5 or 1.1), but not with a negative number, so there might be a
parsing problem regarding this in Lame (I'll try to check it).

Regarding your situation, I'd suggest you to try first an encoding
without specifying the output sampling rate. This will let Lame choose
it based on the target bitrate and its own knowledge of its compression
abilities.
As an example, in mono and targetting 24kbps, current Lame version would
choose to use a sampling rate of 16kHz, which will probably sound better
than 22kHz.

Regards,

--
Gabriel Bouvigne
www.mp3-tech.org
personal page: http://gabriel.mp3-tech.org
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
Reply | Threaded
Open this post in threaded view
|

Re: filtering bad recordings

Marty Huntzberry
wow-that worked!  I tried that in the past with another speech and didn't like 16 kHz sampling but with this mp3 it works fine.  I dropped the
re-sampling spec and the r switch and kept it mono:

lame -m m -b 24 --mp3input original.mp3 compressed.mp3


Thanks for all the help!

Marty

Visit my media server: http://linuxhippy.servemp3.com:8001

On Mon, 19 Mar 2007 20:10:47 +0100
Gabriel Bouvigne <[hidden email]> wrote:

Marty Huntzberry a écrit :

> That r -2 switch makes it sound softer.  Other values did increase (r -1, r-3)....maybe it's a glitch in lame.  Looking at the output in audacity you
> can see it decreaes.

To be honest we are expecting --scale to be used with a float number
(ex: 0.5 or 1.1), but not with a negative number, so there might be a
parsing problem regarding this in Lame (I'll try to check it).

Regarding your situation, I'd suggest you to try first an encoding
without specifying the output sampling rate. This will let Lame choose
it based on the target bitrate and its own knowledge of its compression
abilities.
As an example, in mono and targetting 24kbps, current Lame version would
choose to use a sampling rate of 16kHz, which will probably sound better
than 22kHz.

Regards,

--
Gabriel Bouvigne
www.mp3-tech.org
personal page: http://gabriel.mp3-tech.org
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder
_______________________________________________
mp3encoder mailing list
[hidden email]
https://minnie.tuhs.org/mailman/listinfo/mp3encoder