PDA

View Full Version : How to format a stream header?



Martin Hall
2005-06-29, 08:43
I have a DAB radio receiver with a digital output. This delivers an MP2
stream directly: no transcoding needed.

What I want to do is to make a little webserver application, so that my
radio will look like an internet radio station to the slimserver (and
now apparently the Squeezebox?) and, for that matter, to any browser.

What do I need to do to make this happen? In an ideal world, I would
just set the Content-Type in the header to audio/mpeg... but nothing is
ever that simple.

Can anyone please give me some pointers?


Thank you
Martin

Grotus
2005-06-29, 21:32
Martin Hall blurted out:
>
>
> I have a DAB radio receiver with a digital output. This delivers an MP2
> stream directly: no transcoding needed.
>
> What I want to do is to make a little webserver application, so that my
> radio will look like an internet radio station to the slimserver (and
> now apparently the Squeezebox?) and, for that matter, to any browser.
>
> What do I need to do to make this happen? In an ideal world, I would
> just set the Content-Type in the header to audio/mpeg... but nothing is
> ever that simple.
>
> Can anyone please give me some pointers?
>
>
> Thank you
> Martin

You might get in touch with the developer of DABBar
(http://www.dabbar.co.uk/dabbar.htm). That software takes the DAB
information from a Psion WaveFinder and can convert it to an
IceCast/ShoutCast stream. DABBar is freeware, but apparently not open
source, so only direct contact will get any info for you.

For source that may or may not be applicable, try here:
http://www.baycom.de/products/dabusb/
With this related note:
http://lists.xiph.org/pipermail/icecast-dev/2004-September/001268.html

As for the headers we care about, you can look in
Slim::Player::Protocols::HTTP::request() to see what we do with the
headers we find.

Here's a brief rundown:
icy-name: sets the title for the stream
icy-br: sets the bit-rate for the stream
icy-metaint: if you are injecting metadata, or if the DAB stream itself
has metadata
Location: if you need to redirect
Content-Type: audio/mpeg seems correct

As for the metadata, you'll have to read the source for what we are
looking for there.

Martin Hall
2005-06-30, 10:52
Very helpful, thank you.

After a certain amount of investigation, I now understand Shoutcast metadata pretty well. The header stuff looks OK too.

I do know about Dabbar; he's certainly on my list of interesting contacts.

I'll keep you posted.

Thanks again
Martin