Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    6

    mp3 streaming over http

    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
    Last edited by stef_; 2008-11-02 at 09:38.

  2. #2
    Junior Member
    Join Date
    Nov 2008
    Posts
    6
    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?

  3. #3
    Junior Member
    Join Date
    Nov 2008
    Posts
    6
    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?

  4. #4
    Administrator andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396

    mp3 streaming over http

    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.

  5. #5
    Banned MrSinatra's Avatar
    Join Date
    Nov 2005
    Location
    Pa
    Posts
    3,696
    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?

  6. #6
    Administrator andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396
    I would suggest just changing the server config to use basic auth instead.

  7. #7
    Junior Member
    Join Date
    Nov 2008
    Posts
    6
    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.

  8. #8
    Administrator andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396
    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.

  9. #9
    Junior Member
    Join Date
    Nov 2008
    Posts
    6
    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?

  10. #10
    Administrator andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396
    No, SN never relays the stream.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •