PDA

View Full Version : mp3 streaming over http



stef_
2008-11-02, 08:55
Hi,

I have started to write a plugin. It's all ok...
I have only a problem: I don't know how to stream from a remote location over http.

I have to stream an mp3 like this:
http://mylocation:1234/mp3/song1.mp3
(can be a port != from 80 like 1234)

I know that it should be simple but I can't find documentation for this
(I am reading something in /usr/share/perl5/Slim/...).

BTW the location it's protected with digest authentication.

Can someone post here the perl code?

Thanks in advance,
Stef

stef_
2008-11-02, 11:59
I have tried this line:
$client->execute(["playlist", "play", "/tmp/test.mp3"]);
and it works for local files.

But for remote files:
$client->execute(["playlist", "play", "http://mylocation:1234/test.mp3"]);
it doesn't work...

Which is the right code for mp3 streaming over http?

stef_
2008-11-02, 15:10
I have tried:
$client->execute(["playlist", "play", "http://mylocation:1234/test.mp3"]);
$client->execute(["play"]);
and it works!

However for digest authenticated URLs it doesn't work...
I don't know if digest auth is supported and how to provide user and password.

Any suggestions?

andyg
2008-11-02, 16:56
On Nov 2, 2008, at 5:10 PM, stef_ wrote:

>
> I have tried:
> $client->execute(["playlist", "play",
> "http://mylocation:1234/test.mp3"]);
> $client->execute(["play"]);
> and it works!
>
> However for digest authenticated URLs it doesn't work...
> I don't know if digest auth is supported and how to provide user and
> password.

Basic auth is supported, but not digest auth, sorry.

MrSinatra
2008-11-07, 00:47
Andy,

is it something you'd encourage him to write the code for SC for?

or does slim just not want to include that feature?

andyg
2008-11-07, 06:46
I would suggest just changing the server config to use basic auth instead.

stef_
2008-11-07, 11:12
Thanks for the answer.

By now I can work with basic authentication over https.

I have another question (about the network architecture):

does the SqueezeCenter always act as a relay between the Squeezebox and
the remote stream (e.g. a webradio) using the stream http://squeezecenter_address:9000/stream.mp3
(I have seen SqueeCenter sends this url to the squeezebox at the end of the
"strm" packet) or Squeezebox can connect directly to the remote webradio stream
(in this case at the end of "strm" packet there is the remote webradio url) ?

Thanks in advance.

andyg
2008-11-07, 11:16
SSL is not supported either. You'll have to use basic auth over HTTP.

No, SC is not always a relay for the stream, it depends on several things such as transcoding settings or whether a player is synced.

stef_
2008-11-07, 11:30
inline

> SSL is not supported either. You'll have to use basic auth over HTTP.
Ok, I will try to find a solution.

> No, SC is not always a relay for the stream, it depends on several things such as transcoding settings or whether a player is synced.
Ok, is it the same for SqueezeNetwork?

When SqueezeBox is connected to SqueezeNetwork AND SqueezeNetwork (for some reason, like you said) need to act as a relay
the servers at SqueezeNetwork need a lot of bandwidth.

Is it correct? How can you manage so much bandwidth?

andyg
2008-11-07, 11:39
No, SN never relays the stream.

stef_
2008-11-07, 12:37
Thanks about the info.
My congratulations for this product (hw & sw).

Cheers,
Stef

mcm
2008-11-24, 04:07
SSL is not supported either. You'll have to use basic auth over HTTP.

Is there any chance that https music playback will be supported sometime? Or is it a hardware limitation?

thanks,
Michael

andyg
2008-11-24, 08:16
On Nov 24, 2008, at 6:07 AM, mcm wrote:

>
> andyg;357581 Wrote:
>> SSL is not supported either. You'll have to use basic auth over
>> HTTP.
>
> Is there any chance that https music playback will be supported
> sometime? Or is it a hardware limitation?

No chance, sorry. CPU/memory limitation and I think you are the first
person to ever ask about streaming over SSL.