Re: [slim] Playing ogg radio streams

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dean
    Gadfly, Former Founder Slim Devices
    • Apr 2005
    • 4427

    Re: [slim] Playing ogg radio streams

    Sounds great. Vidur has been working on this code recently to support
    RadioIO. Let's move this discussion to the developer list and get it
    nailed!

    Thank,

    dean

    On Sep 23, 2004, at 8:21 AM, Craig Eales wrote:

    > Ok,
    >
    > I have a handle on what the code is doing. Basically, it is passing
    > through streams totally unmolested so to a squeezebox you can stream
    > both mp3 or raw pcm.
    >
    > This means not only can other types of streams not be played, but, the
    > streams will also not be transcoded if you have a bit rate limit
    > turned on (not so bad for mp3, but a killer for pcm)
    >
    > However, I think I have an outline of a plan to fix it:
    > 1) Instead of attaching the stream to the client input - remember the
    > handle in the $client hash
    > 2) Launch the correct converting program where input filename is '-' ,
    > remember the input and output file handles of this stream in the
    > $client hash
    > 3) When get next chunk is called, if reading from the pipeline output
    > EWOULDBLOCK, then attempt to read some data from the socket, if
    > successful write the data to the pipeline input. If we successfully
    > read from the pipeline output then just pass on the chunk like normal.
    >
    > It is going to take a few days for me to test if this works. If I make
    > some progress I will post the patch.
    >
    > Craig
    >
    >
    >
    >
    > On Wed, 22 Sep 2004 09:44:39 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
    > wrote:
    >>
    >>
    >> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
    >>
    >>> Can you point me at the code that handles the mp3 streams currently?
    >>> If I get a chance then I may have a hack at adding ogg/other stream
    >>> types.

    >>
    >> I'm not entirely sure, but I'd exepct its mostly in
    >> Slim/Web/RemoteStream.pm
    >> General playback handling is done in Slim/Player/Source.pm
    >>
    >> someone will correct me if I'm wrong
    >>
    >>> It seems a pity when a content provider is streaming ogg content that
    >>> the open source community cannot actually play it :-(

    >>
    >> indeed.
    >> -kdf
    >>
    >>> Craig
    >>>
    >>> On Wed, 22 Sep 2004 07:19:56 -0700, kdf
    >>> <slim-mail (AT) deane-freeman (DOT) com> wrote:
    >>>> the conversion API does not yet support non-mp3 streams without
    >>>> something
    >>> like
    >>>> AlienStream or AlienBBC. However, this seems like a great reason
    >>>> for this
    >>> to
    >>>> become a higher priority to fix. I believe someone out there was
    >>>> working
    >>> on a
    >>>> more generic API that would handle streaming as well as files, but
    >>>> have not
    >>>> heard any recent info on its progress.
    >>>>
    >>>> -kdf
    >>>>
    >>>>
    >>>>
    >>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
    >>>>
    >>>>> Virgin Radio have decided to be good citizens, and make their radio
    >>>>> stations available as ogg streams!
    >>>>>
    >>>>> http://www.virginradio.co.uk/thestat...n/streams.html
    >>>>>
    >>>>> They also seem to be keen on actively supporting products that can
    >>>>> play their streams.
    >>>>>
    >>>>> http://www.virginradio.co.uk/thestat...en/others.html
    >>>>>
    >>>>> So I thought to myself: if I can get the streams playing via the
    >>>>> slim
    >>>>> server, I would drop them a note and get the details added to the
    >>>>> list
    >>>>> of supported products. Hopefully getting some free publicity for
    >>>>> slim
    >>>>> devices out of virgin.
    >>>>>
    >>>>> However, I cannot seem to get the streams to play.
    >>>>>
    >>>>> An example URL is
    >>>>>
    >>>>> http://ogg.smgradio.com/gr96.ogg
    >>>>>
    >>>>> I wrote a playlist (Virgin.pls) containing
    >>>>>
    >>>>> [playlist]
    >>>>> numberofentries=1
    >>>>> File1=http://ogg.smgradio.com/gr96.ogg
    >>>>> Title1=VirginRadio
    >>>>> Length1=-1
    >>>>> Version=2
    >>>>>
    >>>>> However, when I try and play the playlist, it just hangs
    >>>>> 'connecting to
    >>> play'
    >>>>>
    >>>>> The stream seems ok - If I 'wget' the stream then run oggdec on it
    >>>>> then I get a .wav
    >>>>> file that plays fine.
    >>>>>
    >>>>> Does anybody have an experience of making the ogg streams play via
    >>>>> slimserver?
    >>>>>
    >>>>> Craig
    >>>>>
  • Dan Sully

    #2
    Re: Re: [slim] Playing ogg radio streams

    * dean blackketter <dean (AT) slimdevices (DOT) com> shaped the electrons to say...

    >Sounds great. Vidur has been working on this code recently to support
    >RadioIO. Let's move this discussion to the developer list and get it nailed!


    What is RadioIO?

    I still have my simmering code that does Ogg decoding inline, using
    Ogg::Vorbis:ecoder. I need to get it updated to use the new Protool handler
    stuff (of which I had similar code).

    -D
    --
    <iNoah> you know, most free operating systems come preinstalled with their own high horse.

    Comment

    • kdf
      NOT a Slim Devices Employee
      • Apr 2005
      • 9493

      #3
      Re: Re: [slim] Playing ogg radio streams

      Quoting Dan Sully <daniel (AT) electricrain (DOT) com>:

      > * dean blackketter <dean (AT) slimdevices (DOT) com> shaped the electrons to say...
      >
      > >Sounds great. Vidur has been working on this code recently to support
      > >RadioIO. Let's move this discussion to the developer list and get it

      > nailed!
      >
      > What is RadioIO?


      a new plugin for the site: http://www.radioio.com/
      its included with 5.3.0

      > I still have my simmering code that does Ogg decoding inline, using
      > Ogg::Vorbis:ecoder. I need to get it updated to use the new Protool handler
      > stuff (of which I had similar code).


      I had been hoping you'd eventually join this discussion
      -kdf

      Comment

      • Dan Sully

        #4
        Re: Re: [slim] Playing ogg radio streams

        * kdf <slim-mail (AT) deane-freeman (DOT) com> shaped the electrons to say...

        >> I still have my simmering code that does Ogg decoding inline, using
        >> Ogg::Vorbis:ecoder. I need to get it updated to use the new Protool handler
        >> stuff (of which I had similar code).

        >
        >I had been hoping you'd eventually join this discussion


        Yeah - I've been swamped at the paying job, and that hasn't allowed me to work on this at all.

        Here's what I had working about ~6 months ago:

        Inline Ogg::Vorbis:ecoder decoding from a url, filehandle or IO::Handle subclass

        Inline Audio::FLAC:ecoder decoding - same as above.

        Transcoding to MP3 using Audio::MPEG (with patches to work with the
        latest lame) - so you could do things like call open()/new() on a
        Slim::Formats::WAV object, set a transcode to mp3 attribute on it,
        sysread(), and get MP3 data back, instead of PCM (or whatever the
        native source is).

        All the formats had a ::Base class, which ISA FileHandle, so all the
        standard sys*() functions would work on an object of that type.

        Subclasses, such as Formats::Ogg would override sysread(), etc to dip
        into the Decoder methods of the same name.

        Things I didn't have working:

        Replay gain support in the Ogg & FLAC bindings (ie: same level of
        support we have now with the command line programs).

        FLAC single-file with many tracks support in the bindings. (I might have, just not tested).

        Testing!

        Testing!

        I tried to keep up with changes to Player/Source.pm as best I could, but that
        went downhill with Vidur's recent Protocol stuff, which I need to integrate my code into.

        Also: Ogg::Vorbis:ecoder & Audio::FLAC:ecoder are both up on CPAN - I'm the maintainer for both.

        -D
        --
        <weezyl> It'll have pretty flowers and NUMA GET OUT OF MY HEAD.

        Comment

        • Craig Eales

          #5
          Re: Re: [slim] Playing ogg radio streams

          Ok,

          I cannot promise anything, but I will have a hack on this tomorrow.

          Dan's code sounds very exciting, it is obviously a step forward to be
          able to play natively in the server. But, there are always going to be
          streams that need an external program to handle them so I think any
          work I do will not be totally wasted when Dan's code reaches the main
          branch.

          Craig

          On Thu, 23 Sep 2004 16:28:15 -0700, dean blackketter
          <dean (AT) slimdevices (DOT) com> wrote:
          > Sounds great. Vidur has been working on this code recently to support
          > RadioIO. Let's move this discussion to the developer list and get it
          > nailed!
          >
          > Thank,
          >
          > dean
          >
          >
          >
          > On Sep 23, 2004, at 8:21 AM, Craig Eales wrote:
          >
          > > Ok,
          > >
          > > I have a handle on what the code is doing. Basically, it is passing
          > > through streams totally unmolested so to a squeezebox you can stream
          > > both mp3 or raw pcm.
          > >
          > > This means not only can other types of streams not be played, but, the
          > > streams will also not be transcoded if you have a bit rate limit
          > > turned on (not so bad for mp3, but a killer for pcm)
          > >
          > > However, I think I have an outline of a plan to fix it:
          > > 1) Instead of attaching the stream to the client input - remember the
          > > handle in the $client hash
          > > 2) Launch the correct converting program where input filename is '-' ,
          > > remember the input and output file handles of this stream in the
          > > $client hash
          > > 3) When get next chunk is called, if reading from the pipeline output
          > > EWOULDBLOCK, then attempt to read some data from the socket, if
          > > successful write the data to the pipeline input. If we successfully
          > > read from the pipeline output then just pass on the chunk like normal.
          > >
          > > It is going to take a few days for me to test if this works. If I make
          > > some progress I will post the patch.
          > >
          > > Craig
          > >
          > >
          > >
          > >
          > > On Wed, 22 Sep 2004 09:44:39 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
          > > wrote:
          > >>
          > >>
          > >> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
          > >>
          > >>> Can you point me at the code that handles the mp3 streams currently?
          > >>> If I get a chance then I may have a hack at adding ogg/other stream
          > >>> types.
          > >>
          > >> I'm not entirely sure, but I'd exepct its mostly in
          > >> Slim/Web/RemoteStream.pm
          > >> General playback handling is done in Slim/Player/Source.pm
          > >>
          > >> someone will correct me if I'm wrong
          > >>
          > >>> It seems a pity when a content provider is streaming ogg content that
          > >>> the open source community cannot actually play it :-(
          > >>
          > >> indeed.
          > >> -kdf
          > >>
          > >>> Craig
          > >>>
          > >>> On Wed, 22 Sep 2004 07:19:56 -0700, kdf
          > >>> <slim-mail (AT) deane-freeman (DOT) com> wrote:
          > >>>> the conversion API does not yet support non-mp3 streams without
          > >>>> something
          > >>> like
          > >>>> AlienStream or AlienBBC. However, this seems like a great reason
          > >>>> for this
          > >>> to
          > >>>> become a higher priority to fix. I believe someone out there was
          > >>>> working
          > >>> on a
          > >>>> more generic API that would handle streaming as well as files, but
          > >>>> have not
          > >>>> heard any recent info on its progress.
          > >>>>
          > >>>> -kdf
          > >>>>
          > >>>>
          > >>>>
          > >>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
          > >>>>
          > >>>>> Virgin Radio have decided to be good citizens, and make their radio
          > >>>>> stations available as ogg streams!
          > >>>>>
          > >>>>> http://www.virginradio.co.uk/thestat...n/streams.html
          > >>>>>
          > >>>>> They also seem to be keen on actively supporting products that can
          > >>>>> play their streams.
          > >>>>>
          > >>>>> http://www.virginradio.co.uk/thestat...en/others.html
          > >>>>>
          > >>>>> So I thought to myself: if I can get the streams playing via the
          > >>>>> slim
          > >>>>> server, I would drop them a note and get the details added to the
          > >>>>> list
          > >>>>> of supported products. Hopefully getting some free publicity for
          > >>>>> slim
          > >>>>> devices out of virgin.
          > >>>>>
          > >>>>> However, I cannot seem to get the streams to play.
          > >>>>>
          > >>>>> An example URL is
          > >>>>>
          > >>>>> http://ogg.smgradio.com/gr96.ogg
          > >>>>>
          > >>>>> I wrote a playlist (Virgin.pls) containing
          > >>>>>
          > >>>>> [playlist]
          > >>>>> numberofentries=1
          > >>>>> File1=http://ogg.smgradio.com/gr96.ogg
          > >>>>> Title1=VirginRadio
          > >>>>> Length1=-1
          > >>>>> Version=2
          > >>>>>
          > >>>>> However, when I try and play the playlist, it just hangs
          > >>>>> 'connecting to
          > >>> play'
          > >>>>>
          > >>>>> The stream seems ok - If I 'wget' the stream then run oggdec on it
          > >>>>> then I get a .wav
          > >>>>> file that plays fine.
          > >>>>>
          > >>>>> Does anybody have an experience of making the ogg streams play via
          > >>>>> slimserver?
          > >>>>>
          > >>>>> Craig
          > >>>>>

          Comment

          • dean blackketter
            Gadfly, Former Founder Slim Devices
            • Apr 2005
            • 4427

            #6
            Re: Re: [slim] Playing ogg radio streams

            We already include oggdec binaries for mac, windows and i386 linux, so
            depending on oggdec is just fine.

            -dean

            On Sep 24, 2004, at 8:36 AM, Craig Eales wrote:

            > Ok,
            >
            > I cannot promise anything, but I will have a hack on this tomorrow.
            >
            > Dan's code sounds very exciting, it is obviously a step forward to be
            > able to play natively in the server. But, there are always going to be
            > streams that need an external program to handle them so I think any
            > work I do will not be totally wasted when Dan's code reaches the main
            > branch.
            >
            > Craig
            >
            > On Thu, 23 Sep 2004 16:28:15 -0700, dean blackketter
            > <dean (AT) slimdevices (DOT) com> wrote:
            >> Sounds great. Vidur has been working on this code recently to support
            >> RadioIO. Let's move this discussion to the developer list and get it
            >> nailed!
            >>
            >> Thank,
            >>
            >> dean
            >>
            >>
            >>
            >> On Sep 23, 2004, at 8:21 AM, Craig Eales wrote:
            >>
            >>> Ok,
            >>>
            >>> I have a handle on what the code is doing. Basically, it is passing
            >>> through streams totally unmolested so to a squeezebox you can stream
            >>> both mp3 or raw pcm.
            >>>
            >>> This means not only can other types of streams not be played, but,
            >>> the
            >>> streams will also not be transcoded if you have a bit rate limit
            >>> turned on (not so bad for mp3, but a killer for pcm)
            >>>
            >>> However, I think I have an outline of a plan to fix it:
            >>> 1) Instead of attaching the stream to the client input - remember the
            >>> handle in the $client hash
            >>> 2) Launch the correct converting program where input filename is '-'
            >>> ,
            >>> remember the input and output file handles of this stream in the
            >>> $client hash
            >>> 3) When get next chunk is called, if reading from the pipeline output
            >>> EWOULDBLOCK, then attempt to read some data from the socket, if
            >>> successful write the data to the pipeline input. If we successfully
            >>> read from the pipeline output then just pass on the chunk like
            >>> normal.
            >>>
            >>> It is going to take a few days for me to test if this works. If I
            >>> make
            >>> some progress I will post the patch.
            >>>
            >>> Craig
            >>>
            >>>
            >>>
            >>>
            >>> On Wed, 22 Sep 2004 09:44:39 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
            >>> wrote:
            >>>>
            >>>>
            >>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
            >>>>
            >>>>> Can you point me at the code that handles the mp3 streams
            >>>>> currently?
            >>>>> If I get a chance then I may have a hack at adding ogg/other stream
            >>>>> types.
            >>>>
            >>>> I'm not entirely sure, but I'd exepct its mostly in
            >>>> Slim/Web/RemoteStream.pm
            >>>> General playback handling is done in Slim/Player/Source.pm
            >>>>
            >>>> someone will correct me if I'm wrong
            >>>>
            >>>>> It seems a pity when a content provider is streaming ogg content
            >>>>> that
            >>>>> the open source community cannot actually play it :-(
            >>>>
            >>>> indeed.
            >>>> -kdf
            >>>>
            >>>>> Craig
            >>>>>
            >>>>> On Wed, 22 Sep 2004 07:19:56 -0700, kdf
            >>>>> <slim-mail (AT) deane-freeman (DOT) com> wrote:
            >>>>>> the conversion API does not yet support non-mp3 streams without
            >>>>>> something
            >>>>> like
            >>>>>> AlienStream or AlienBBC. However, this seems like a great reason
            >>>>>> for this
            >>>>> to
            >>>>>> become a higher priority to fix. I believe someone out there was
            >>>>>> working
            >>>>> on a
            >>>>>> more generic API that would handle streaming as well as files, but
            >>>>>> have not
            >>>>>> heard any recent info on its progress.
            >>>>>>
            >>>>>> -kdf
            >>>>>>
            >>>>>>
            >>>>>>
            >>>>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
            >>>>>>
            >>>>>>> Virgin Radio have decided to be good citizens, and make their
            >>>>>>> radio
            >>>>>>> stations available as ogg streams!
            >>>>>>>
            >>>>>>> http://www.virginradio.co.uk/thestat...n/streams.html
            >>>>>>>
            >>>>>>> They also seem to be keen on actively supporting products that
            >>>>>>> can
            >>>>>>> play their streams.
            >>>>>>>
            >>>>>>> http://www.virginradio.co.uk/thestat...en/others.html
            >>>>>>>
            >>>>>>> So I thought to myself: if I can get the streams playing via the
            >>>>>>> slim
            >>>>>>> server, I would drop them a note and get the details added to the
            >>>>>>> list
            >>>>>>> of supported products. Hopefully getting some free publicity for
            >>>>>>> slim
            >>>>>>> devices out of virgin.
            >>>>>>>
            >>>>>>> However, I cannot seem to get the streams to play.
            >>>>>>>
            >>>>>>> An example URL is
            >>>>>>>
            >>>>>>> http://ogg.smgradio.com/gr96.ogg
            >>>>>>>
            >>>>>>> I wrote a playlist (Virgin.pls) containing
            >>>>>>>
            >>>>>>> [playlist]
            >>>>>>> numberofentries=1
            >>>>>>> File1=http://ogg.smgradio.com/gr96.ogg
            >>>>>>> Title1=VirginRadio
            >>>>>>> Length1=-1
            >>>>>>> Version=2
            >>>>>>>
            >>>>>>> However, when I try and play the playlist, it just hangs
            >>>>>>> 'connecting to
            >>>>> play'
            >>>>>>>
            >>>>>>> The stream seems ok - If I 'wget' the stream then run oggdec on
            >>>>>>> it
            >>>>>>> then I get a .wav
            >>>>>>> file that plays fine.
            >>>>>>>
            >>>>>>> Does anybody have an experience of making the ogg streams play
            >>>>>>> via
            >>>>>>> slimserver?
            >>>>>>>
            >>>>>>> Craig
            >>>>>>>

            Comment

            • Craig Eales

              #7
              Re: Re: [slim] Playing ogg radio streams

              Dean,

              I have a set of changes that enable the transcoding of streams with
              the same helper program configuration as for normal files.

              The changes are attached as a gziped tar file of the chnaged files.

              The base versions of the files are (latest as of 12 hours ago)

              Source.pm 1.115
              Client.pm 1.58
              convert.conf 1.28

              Nearly all of the changes are in Source.pm: explicit handling of the
              remorte streams; launching the converters etc.
              Client.pm contains three extra fields required to handle the pipeline
              convert.conf : I had to remove the -Q option from the ogg decoder: for
              some reason it explodes when run in the pipeline!

              If you try and listen to the 'Virgin Radio' stream then you can listen
              to one song - but as the song changes the oggdec process dies - it
              seems that the stream sends looks like multiple streams to oggdec at
              this point and falls over - this is a problem in oggdec not in my
              changes.

              I set up a local web server and streamed raw 'wav' data to the server,
              and set bit rate limiting on the client - the server automatically
              launched lame and transcoded to a lower frequency etc.

              All my old streams play fine. So I think I have not broken anything.

              However, I only have linux to test on.

              Does somebody want to try and test the change on windows/mac?
              Dean, what is the next step towards getting this in the main branch?
              These changes will allow some big changes to alienBBC that Jules and I
              are looking at trying out.

              Craig

              On Thu, 23 Sep 2004 16:28:15 -0700, dean blackketter
              <dean (AT) slimdevices (DOT) com> wrote:
              > Sounds great. Vidur has been working on this code recently to support
              > RadioIO. Let's move this discussion to the developer list and get it
              > nailed!
              >
              > Thank,
              >
              > dean
              >
              >
              >
              > On Sep 23, 2004, at 8:21 AM, Craig Eales wrote:
              >
              > > Ok,
              > >
              > > I have a handle on what the code is doing. Basically, it is passing
              > > through streams totally unmolested so to a squeezebox you can stream
              > > both mp3 or raw pcm.
              > >
              > > This means not only can other types of streams not be played, but, the
              > > streams will also not be transcoded if you have a bit rate limit
              > > turned on (not so bad for mp3, but a killer for pcm)
              > >
              > > However, I think I have an outline of a plan to fix it:
              > > 1) Instead of attaching the stream to the client input - remember the
              > > handle in the $client hash
              > > 2) Launch the correct converting program where input filename is '-' ,
              > > remember the input and output file handles of this stream in the
              > > $client hash
              > > 3) When get next chunk is called, if reading from the pipeline output
              > > EWOULDBLOCK, then attempt to read some data from the socket, if
              > > successful write the data to the pipeline input. If we successfully
              > > read from the pipeline output then just pass on the chunk like normal.
              > >
              > > It is going to take a few days for me to test if this works. If I make
              > > some progress I will post the patch.
              > >
              > > Craig
              > >
              > >
              > >
              > >
              > > On Wed, 22 Sep 2004 09:44:39 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
              > > wrote:
              > >>
              > >>
              > >> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
              > >>
              > >>> Can you point me at the code that handles the mp3 streams currently?
              > >>> If I get a chance then I may have a hack at adding ogg/other stream
              > >>> types.
              > >>
              > >> I'm not entirely sure, but I'd exepct its mostly in
              > >> Slim/Web/RemoteStream.pm
              > >> General playback handling is done in Slim/Player/Source.pm
              > >>
              > >> someone will correct me if I'm wrong
              > >>
              > >>> It seems a pity when a content provider is streaming ogg content that
              > >>> the open source community cannot actually play it :-(
              > >>
              > >> indeed.
              > >> -kdf
              > >>
              > >>> Craig
              > >>>
              > >>> On Wed, 22 Sep 2004 07:19:56 -0700, kdf
              > >>> <slim-mail (AT) deane-freeman (DOT) com> wrote:
              > >>>> the conversion API does not yet support non-mp3 streams without
              > >>>> something
              > >>> like
              > >>>> AlienStream or AlienBBC. However, this seems like a great reason
              > >>>> for this
              > >>> to
              > >>>> become a higher priority to fix. I believe someone out there was
              > >>>> working
              > >>> on a
              > >>>> more generic API that would handle streaming as well as files, but
              > >>>> have not
              > >>>> heard any recent info on its progress.
              > >>>>
              > >>>> -kdf
              > >>>>
              > >>>>
              > >>>>
              > >>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
              > >>>>
              > >>>>> Virgin Radio have decided to be good citizens, and make their radio
              > >>>>> stations available as ogg streams!
              > >>>>>
              > >>>>> http://www.virginradio.co.uk/thestat...n/streams.html
              > >>>>>
              > >>>>> They also seem to be keen on actively supporting products that can
              > >>>>> play their streams.
              > >>>>>
              > >>>>> http://www.virginradio.co.uk/thestat...en/others.html
              > >>>>>
              > >>>>> So I thought to myself: if I can get the streams playing via the
              > >>>>> slim
              > >>>>> server, I would drop them a note and get the details added to the
              > >>>>> list
              > >>>>> of supported products. Hopefully getting some free publicity for
              > >>>>> slim
              > >>>>> devices out of virgin.
              > >>>>>
              > >>>>> However, I cannot seem to get the streams to play.
              > >>>>>
              > >>>>> An example URL is
              > >>>>>
              > >>>>> http://ogg.smgradio.com/gr96.ogg
              > >>>>>
              > >>>>> I wrote a playlist (Virgin.pls) containing
              > >>>>>
              > >>>>> [playlist]
              > >>>>> numberofentries=1
              > >>>>> File1=http://ogg.smgradio.com/gr96.ogg
              > >>>>> Title1=VirginRadio
              > >>>>> Length1=-1
              > >>>>> Version=2
              > >>>>>
              > >>>>> However, when I try and play the playlist, it just hangs
              > >>>>> 'connecting to
              > >>> play'
              > >>>>>
              > >>>>> The stream seems ok - If I 'wget' the stream then run oggdec on it
              > >>>>> then I get a .wav
              > >>>>> file that plays fine.
              > >>>>>
              > >>>>> Does anybody have an experience of making the ogg streams play via
              > >>>>> slimserver?
              > >>>>>
              > >>>>> Craig
              > >>>>>

              Comment

              • Gregory P. Smith

                #8
                Re: Re: [slim] Playing ogg radio streams

                On Fri, Sep 24, 2004 at 08:51:49AM -0700, dean blackketter wrote:
                > We already include oggdec binaries for mac, windows and i386 linux, so
                > depending on oggdec is just fine.
                >
                > -dean


                For the interim anyways. Dan's ogg and flac decoding modules can seek
                within files which allows for much needed ff/rew in transcoded files.
                A pipe to an external program can't do that.

                Comment

                • dean blackketter
                  Gadfly, Former Founder Slim Devices
                  • Apr 2005
                  • 4427

                  #9
                  Re: Re: [slim] Playing ogg radio streams

                  This looks great. Vidur's going to do the merge for our next (post
                  5.3.1 release...)

                  -dean

                  On Sep 25, 2004, at 11:42 AM, Craig Eales wrote:

                  > Dean,
                  >
                  > I have a set of changes that enable the transcoding of streams with
                  > the same helper program configuration as for normal files.
                  >
                  > The changes are attached as a gziped tar file of the chnaged files.
                  >
                  > The base versions of the files are (latest as of 12 hours ago)
                  >
                  > Source.pm 1.115
                  > Client.pm 1.58
                  > convert.conf 1.28
                  >
                  > Nearly all of the changes are in Source.pm: explicit handling of the
                  > remorte streams; launching the converters etc.
                  > Client.pm contains three extra fields required to handle the pipeline
                  > convert.conf : I had to remove the -Q option from the ogg decoder: for
                  > some reason it explodes when run in the pipeline!
                  >
                  > If you try and listen to the 'Virgin Radio' stream then you can listen
                  > to one song - but as the song changes the oggdec process dies - it
                  > seems that the stream sends looks like multiple streams to oggdec at
                  > this point and falls over - this is a problem in oggdec not in my
                  > changes.
                  >
                  > I set up a local web server and streamed raw 'wav' data to the server,
                  > and set bit rate limiting on the client - the server automatically
                  > launched lame and transcoded to a lower frequency etc.
                  >
                  > All my old streams play fine. So I think I have not broken anything.
                  >
                  > However, I only have linux to test on.
                  >
                  > Does somebody want to try and test the change on windows/mac?
                  > Dean, what is the next step towards getting this in the main branch?
                  > These changes will allow some big changes to alienBBC that Jules and I
                  > are looking at trying out.
                  >
                  > Craig
                  >
                  > On Thu, 23 Sep 2004 16:28:15 -0700, dean blackketter
                  > <dean (AT) slimdevices (DOT) com> wrote:
                  >> Sounds great. Vidur has been working on this code recently to support
                  >> RadioIO. Let's move this discussion to the developer list and get it
                  >> nailed!
                  >>
                  >> Thank,
                  >>
                  >> dean
                  >>
                  >>
                  >>
                  >> On Sep 23, 2004, at 8:21 AM, Craig Eales wrote:
                  >>
                  >>> Ok,
                  >>>
                  >>> I have a handle on what the code is doing. Basically, it is passing
                  >>> through streams totally unmolested so to a squeezebox you can stream
                  >>> both mp3 or raw pcm.
                  >>>
                  >>> This means not only can other types of streams not be played, but,
                  >>> the
                  >>> streams will also not be transcoded if you have a bit rate limit
                  >>> turned on (not so bad for mp3, but a killer for pcm)
                  >>>
                  >>> However, I think I have an outline of a plan to fix it:
                  >>> 1) Instead of attaching the stream to the client input - remember the
                  >>> handle in the $client hash
                  >>> 2) Launch the correct converting program where input filename is '-'
                  >>> ,
                  >>> remember the input and output file handles of this stream in the
                  >>> $client hash
                  >>> 3) When get next chunk is called, if reading from the pipeline output
                  >>> EWOULDBLOCK, then attempt to read some data from the socket, if
                  >>> successful write the data to the pipeline input. If we successfully
                  >>> read from the pipeline output then just pass on the chunk like
                  >>> normal.
                  >>>
                  >>> It is going to take a few days for me to test if this works. If I
                  >>> make
                  >>> some progress I will post the patch.
                  >>>
                  >>> Craig
                  >>>
                  >>>
                  >>>
                  >>>
                  >>> On Wed, 22 Sep 2004 09:44:39 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com>
                  >>> wrote:
                  >>>>
                  >>>>
                  >>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
                  >>>>
                  >>>>> Can you point me at the code that handles the mp3 streams
                  >>>>> currently?
                  >>>>> If I get a chance then I may have a hack at adding ogg/other stream
                  >>>>> types.
                  >>>>
                  >>>> I'm not entirely sure, but I'd exepct its mostly in
                  >>>> Slim/Web/RemoteStream.pm
                  >>>> General playback handling is done in Slim/Player/Source.pm
                  >>>>
                  >>>> someone will correct me if I'm wrong
                  >>>>
                  >>>>> It seems a pity when a content provider is streaming ogg content
                  >>>>> that
                  >>>>> the open source community cannot actually play it :-(
                  >>>>
                  >>>> indeed.
                  >>>> -kdf
                  >>>>
                  >>>>> Craig
                  >>>>>
                  >>>>> On Wed, 22 Sep 2004 07:19:56 -0700, kdf
                  >>>>> <slim-mail (AT) deane-freeman (DOT) com> wrote:
                  >>>>>> the conversion API does not yet support non-mp3 streams without
                  >>>>>> something
                  >>>>> like
                  >>>>>> AlienStream or AlienBBC. However, this seems like a great reason
                  >>>>>> for this
                  >>>>> to
                  >>>>>> become a higher priority to fix. I believe someone out there was
                  >>>>>> working
                  >>>>> on a
                  >>>>>> more generic API that would handle streaming as well as files, but
                  >>>>>> have not
                  >>>>>> heard any recent info on its progress.
                  >>>>>>
                  >>>>>> -kdf
                  >>>>>>
                  >>>>>>
                  >>>>>>
                  >>>>>> Quoting Craig Eales <craig.eales (AT) gmail (DOT) com>:
                  >>>>>>
                  >>>>>>> Virgin Radio have decided to be good citizens, and make their
                  >>>>>>> radio
                  >>>>>>> stations available as ogg streams!
                  >>>>>>>
                  >>>>>>> http://www.virginradio.co.uk/thestat...n/streams.html
                  >>>>>>>
                  >>>>>>> They also seem to be keen on actively supporting products that
                  >>>>>>> can
                  >>>>>>> play their streams.
                  >>>>>>>
                  >>>>>>> http://www.virginradio.co.uk/thestat...en/others.html
                  >>>>>>>
                  >>>>>>> So I thought to myself: if I can get the streams playing via the
                  >>>>>>> slim
                  >>>>>>> server, I would drop them a note and get the details added to the
                  >>>>>>> list
                  >>>>>>> of supported products. Hopefully getting some free publicity for
                  >>>>>>> slim
                  >>>>>>> devices out of virgin.
                  >>>>>>>
                  >>>>>>> However, I cannot seem to get the streams to play.
                  >>>>>>>
                  >>>>>>> An example URL is
                  >>>>>>>
                  >>>>>>> http://ogg.smgradio.com/gr96.ogg
                  >>>>>>>
                  >>>>>>> I wrote a playlist (Virgin.pls) containing
                  >>>>>>>
                  >>>>>>> [playlist]
                  >>>>>>> numberofentries=1
                  >>>>>>> File1=http://ogg.smgradio.com/gr96.ogg
                  >>>>>>> Title1=VirginRadio
                  >>>>>>> Length1=-1
                  >>>>>>> Version=2
                  >>>>>>>
                  >>>>>>> However, when I try and play the playlist, it just hangs
                  >>>>>>> 'connecting to
                  >>>>> play'
                  >>>>>>>
                  >>>>>>> The stream seems ok - If I 'wget' the stream then run oggdec on
                  >>>>>>> it
                  >>>>>>> then I get a .wav
                  >>>>>>> file that plays fine.
                  >>>>>>>
                  >>>>>>> Does anybody have an experience of making the ogg streams play
                  >>>>>>> via
                  >>>>>>> slimserver?
                  >>>>>>>
                  >>>>>>> Craig
                  >>>>>>>

                  Comment

                  Working...