PDA

View Full Version : How does lossless work?



Graham Ridgway at home
2004-07-20, 15:38
can someone tell me how playback of a lossless format works? Take an
example of WAVs.

The server reads a WAV file
The server streams the data to the squeezebox - what format? Still lossless
or changed to a common form?
The squeezebox does a D2A conversion to change the stream for output to the
RCA plugs - what format is the stream converted from?
OR the squeezebox streams the input to the digital out - is there any
conversion here?

Thanks
Graham

kdf
2004-07-21, 13:50
Quoting Graham Ridgway at home <graham (AT) ridgworld (DOT) com>:

> can someone tell me how playback of a lossless format works? Take an
> example of WAVs.
>
> The server reads a WAV file
> The server streams the data to the squeezebox - what format? Still lossless
> or changed to a common form?
> The squeezebox does a D2A conversion to change the stream for output to the
> RCA plugs - what format is the stream converted from?
> OR the squeezebox streams the input to the digital out - is there any
> conversion here?
>
> Thanks
> Graham

Lossless, currently, is sent as uncompressed PCM (WAV) format from the server.
In future, a lossless compression may be used to conserve bandwidth. By
default, wireless clients will be limited to 320kbps and converted to MP3. You
can change this in the player settings->additional if your bandwidth can handle it.

internal to the squeezebox, the data is either MP3 or PCM depending on the data
that was sent from the server. There is hardware to handle both. Digital
outputs are SPDIF. I dont know the specs on the DAC, but I'd expect it handles
PCM input that is either sent directly through from the input for lossless, and
directly from the MP3 decoder for mp3 data.

-kdf

Pat Farrell
2004-07-21, 13:54
At 06:38 PM 7/20/2004, Graham Ridgway at home wrote:
>The server reads a WAV file
>The server streams the data to the squeezebox - what format? Still lossless
>or changed to a common form?

First, this only makes sense with a SqueezeBox. The older SLimp3 needed
MP3 input.

Given that....
It depends on the settings specified in your Server-settings -> FileFomat
section.

If you have enables WAV to WAV (built-in) then the PCM data is streamed
as is using TCP/IP


>The squeezebox does a D2A conversion to change the stream for output to the
>RCA plugs - what format is the stream converted from?

The SqueezeBox takes the PCM stream and runs it thru its internal
Digital to Analog convertor. No conversion needed.

Or you can feed an external DAC with the digital outputs, either coax or
optical.


>OR the squeezebox streams the input to the digital out - is there any
>conversion here?

Nope, what you send is what you get. Assuming WAV to digital out.
The only processing is removing all the TCP/IP headers, etc.

Pat

jacobdp
2004-07-21, 14:43
On Wed, 21 Jul 2004 13:50:46 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
> internal to the squeezebox, the data is either MP3 or PCM depending on the data
> that was sent from the server. There is hardware to handle both.

Specifically, the data from SlimServer to the Squeezebox can be either
MP3, or PCM at any of 11/22/32/44.1/48 KHz, 8/16/24/32-bit, mono or
stereo, big or little endian. Any conversions for the DAC or S/PDIF
are done in the Squeezebox itself.

- Jacob

Peter Olufsen
2004-07-21, 15:20
Two problems in latest nightly and earlier versions on xp:

1) The "Squeezebox Home"-link removes/forgets the player-parameter
(?player=?.?.?.?)
2) After a search the links to the player is allways 127.0.0.1 and not the
player you have selected. The links without a search is ok.

Peter

kdf
2004-07-21, 15:25
Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:

> Two problems in latest nightly and earlier versions on xp:
>
> 1) The "Squeezebox Home"-link removes/forgets the player-parameter
> (?player=?.?.?.?)
> 2) After a search the links to the player is allways 127.0.0.1 and not the
> player you have selected. The links without a search is ok.
>
> Peter
thanks, I'll fix it.
-kdf

seanadams
2004-07-21, 16:51
On Jul 21, 2004, at 2:43 PM, Jacob Potter wrote:

> On Wed, 21 Jul 2004 13:50:46 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
> wrote:
>> internal to the squeezebox, the data is either MP3 or PCM depending
>> on the data
>> that was sent from the server. There is hardware to handle both.
>
> Specifically, the data from SlimServer to the Squeezebox can be either
> MP3, or PCM at any of 11/22/32/44.1/48 KHz, 8/16/24/32-bit, mono or
> stereo, big or little endian. Any conversions for the DAC or S/PDIF
> are done in the Squeezebox itself.
>

Close - actually mp3 is supported with 20 bits of resolution and at all
sample rates (32, 44.1, 48) and all mp3 bit rates (32..320Kbps). Most
s/pdif receivers will only look at 16 of those 20 bits. However, 20
bits d/a is always used in Squeezebox's DAC. Incidentally this might
for some be a reason to favor Squeezebox's internal DAC over a
particular s/pdif DAC.

PCM (whether FLAC, WAV, AIFF) is currently supported just for CD data
rates, ie 44.1KHz, 16 bits per sample. However, this is only because we
haven't had much interest in other formats. The hardware is capable of
PCM at arbitrary sample rates up to 48KHz, and 20 bits per sample, but
we haven't added support for that yet due to having higher priorities
for software. Additional bits (for 20 bits output) ** are used ** for
16-bit audio when the volume control is below max level (to increase
s/n ratio).

Peter Olufsen
2004-07-22, 10:22
Thanks, It's ok in the 2004-07-22 version.

But in this version the playlist is broken (not displayed below the
player-frame)

Peter
----- Original Message -----
From: "kdf" <slim-mail (AT) deane-freeman (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Thursday, July 22, 2004 12:25 AM
Subject: [slim] Fishbone skin


> Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:
>
> > Two problems in latest nightly and earlier versions on xp:
> >
> > 1) The "Squeezebox Home"-link removes/forgets the player-parameter
> > (?player=?.?.?.?)
> > 2) After a search the links to the player is allways 127.0.0.1 and not
the
> > player you have selected. The links without a search is ok.
> >
> > Peter
> thanks, I'll fix it.
> -kdf
>

kdf
2004-07-22, 11:07
Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:

> Thanks, It's ok in the 2004-07-22 version.
>
> But in this version the playlist is broken (not displayed below the
> player-frame)
>
> Peter

which browser?
and do you have the same troubles with the default skin?
This is attempting to load the playlist to the curfent song, and is using the
same code as Default skin to accomplish this.

-kdf

Peter Olufsen
2004-07-22, 13:54
It's only a problem with the Fishbone skin (default, exbrowse, sensemaker
ok).

I run Win XP and IE 6.0

Peter
----- Original Message -----
From: "kdf" <slim-mail (AT) deane-freeman (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Thursday, July 22, 2004 8:07 PM
Subject: [slim] Fishbone skin


> Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:
>
> > Thanks, It's ok in the 2004-07-22 version.
> >
> > But in this version the playlist is broken (not displayed below the
> > player-frame)
> >
> > Peter
>
> which browser?
> and do you have the same troubles with the default skin?
> This is attempting to load the playlist to the curfent song, and is using
the
> same code as Default skin to accomplish this.
>
> -kdf
>

kdf
2004-07-22, 14:02
Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:

> It's only a problem with the Fishbone skin (default, exbrowse, sensemaker
> ok).
>
> I run Win XP and IE 6.0

ok, well as far as I know, only Default even attempts to load the playlist to
the current song. Is it always lost? can you refresh and get it back? It
seems to work well with Firefox 0.9x, and for that matter IE6 under win2k.

do you have HTML caching on?
are you seeing any script error popups (have no idea if IE has any way to debug
javascript like the javascript console in mozilla/firefox)

I've not been able to reproduce this one. Anyone else got ideas?

-kdf

kdf
2004-07-22, 14:45
Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:

> It's only a problem with the Fishbone skin (default, exbrowse, sensemaker
> ok).
>
> I run Win XP and IE 6.0

ah...did manage to reproduce with a fresh cvs. found and fixed.
many thanks.
-kdf

Peter Olufsen
2004-07-22, 14:47
The playlist display is always lost including the line with Save / Download
/ Clear

I use html-cache but it doesen't change anything if i turn it off. I also
deleted all cache files (both Slim and IE)

I reinstalled the version from 2004-07-21 and here the playlist is displayed
correct.

I get no script errors and no errors in the logfile

Hope this helps,
Peter
----- Original Message -----
From: "kdf" <slim-mail (AT) deane-freeman (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Thursday, July 22, 2004 11:02 PM
Subject: [slim] Fishbone skin


> Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:
>
> > It's only a problem with the Fishbone skin (default, exbrowse,
sensemaker
> > ok).
> >
> > I run Win XP and IE 6.0
>
> ok, well as far as I know, only Default even attempts to load the playlist
to
> the current song. Is it always lost? can you refresh and get it back? It
> seems to work well with Firefox 0.9x, and for that matter IE6 under win2k.
>
> do you have HTML caching on?
> are you seeing any script error popups (have no idea if IE has any way to
debug
> javascript like the javascript console in mozilla/firefox)
>
> I've not been able to reproduce this one. Anyone else got ideas?
>
> -kdf
>

kdf
2004-07-22, 15:20
Quoting Peter Olufsen <po (AT) dsinet (DOT) dk>:

> The playlist display is always lost including the line with Save / Download
> / Clear
>
> I use html-cache but it doesen't change anything if i turn it off. I also
> deleted all cache files (both Slim and IE)
>
> I reinstalled the version from 2004-07-21 and here the playlist is displayed
> correct.
>
> I get no script errors and no errors in the logfile
>
> Hope this helps,
> Peter


Thanks for looking into it. The odd thing was, the same code is there for the
earlier nighty, but the script function just wasn't called. Given that the
problem is a parse error, seems strange that it needs to be called. If you can
find the playlist.html file in teh fishbone skin, try changing the following
line:

<script type="text/javascript" src="[% webroot %]html/scripts.js" />
to
<script type="text/javascript" src="[% webroot %]html/scripts.js" ></script>

that should fix it while you wait for tomorrow's build :)
-kdf