PDA

View Full Version : AlienBBC - why use Lame ?



Andy F
2005-01-03, 02:29
Why does the AlienBBC transcoder pass the audio through Lame ?

On my system the use of Lame alone causes the CPU usage to more than
double when streaming BBC radio 1 live.

The transcoder gets mplayer to output PCM at 44.1KHz, so why can't
that be passed directly to the Squeezebox ?

I've tried the 'option' to disable the use of Lame in the transcoder,
but all I get then is loud pink/white noise.

(I'm using AlienBBC 0.12 on Mandrake 10.0)

Andy F

kdf
2005-01-03, 02:48
Quoting Andy F <andy.news0703 (AT) ntlworld (DOT) com>:

> Why does the AlienBBC transcoder pass the audio through Lame ?
>
> On my system the use of Lame alone causes the CPU usage to more than
> double when streaming BBC radio 1 live.
>
> The transcoder gets mplayer to output PCM at 44.1KHz, so why can't
> that be passed directly to the Squeezebox ?
>
> I've tried the 'option' to disable the use of Lame in the transcoder,
> but all I get then is loud pink/white noise.

you've answered your own question in a way. the noise is a symptom of
mismatched 'endian', or byte swapping. LAME not only converts to mp3, but also
removes any byte-swapping issues. I can't recall exactly why Alien BBC has not
been able to deal with the byte-swapping when using the PCM output, but if that
gets fixed, it should work just fine without lame.
-kdf

Jules Taplin
2005-01-03, 06:23
Right. This is kinda ugly now, and I have to confess that the reasons
have now passed me by.

You're quite right, kdf - byte swapping is the reason you get pink
noise. Although... I'm pretty sure that some behaviour somewhere has
changed recently - as this used to work.

It's simple to fix - in transcoder_proxy.pl, line 215, change 'x-wav' to
read 'x-aiff', and slimserver will do the byte-swapping for you. Just so
we're clear - what is Squeezebox PCM? Big, or Little-Endian?

To be honest... I've just been playing with it, and I'd heartily
recommend a couple of things:

1. Stop listening to Radio 1. It's not good for you ;)

2. I'm not sure that removing lame will get you what you want. The nice
thing about the Squeezebox's processing mp3's is that they can hold a
nice big buffer for audio. Reading PCM, they're highly dependant on
just-in-time delivery of their next lumps of sample data. The AlienBBC
transcoding pipeline is quite long (see below), and doesn't seem to do
that good a job of keeping up:

BBC (Internet) -> mplayer -> transcoder_proxy -> slimserver -> squeezebox.

Every Word there has some processing to do (or at least some manual
shovelling of data), and every arrow is a transmission step or so. It's
depressing... but those are the hoops that proprietary audio formats
make us jump.

Anyway... give it a go, if you're interested enough. I'm still hopeful
we'll remove the proxy for more modern versions of AlienBBC, so I won't
be releasing another AlienBBC release just for this.


-- Jules



kdf wrote:

>Quoting Andy F <andy.news0703 (AT) ntlworld (DOT) com>:
>
>
>
>>Why does the AlienBBC transcoder pass the audio through Lame ?
>>
>>On my system the use of Lame alone causes the CPU usage to more than
>>double when streaming BBC radio 1 live.
>>
>>The transcoder gets mplayer to output PCM at 44.1KHz, so why can't
>>that be passed directly to the Squeezebox ?
>>
>>I've tried the 'option' to disable the use of Lame in the transcoder,
>>but all I get then is loud pink/white noise.
>>
>>
>
>you've answered your own question in a way. the noise is a symptom of
>mismatched 'endian', or byte swapping. LAME not only converts to mp3, but also
>removes any byte-swapping issues. I can't recall exactly why Alien BBC has not
>been able to deal with the byte-swapping when using the PCM output, but if that
>gets fixed, it should work just fine without lame.
>-kdf
>