Re: ID3v2 tags
Re: ID3v2 tags
- Subject: Re: ID3v2 tags
- From: Stephen Davis <email@hidden>
- Date: Wed, 18 Jun 2008 23:07:49 -1000
The shoutcast metadata streaming is rather odd, to say the least.
There are two ways to access the information:
1) As an out-of-band UDP stream (eaten by many proxies/firewalls)
2) As an in-band stream intermixed with the audio (every N bytes a
metadata packet will come through).
Neither of them have anything to do with ID3 tags. It sounds like you
found some code to deal with them. I'm not familiar with it myself
but you should definitely look at instead of trying to find actual
documentation on the protocol. :-)
One tidbit you might find useful is that the spec originally specified
ISO Latin 1 encoding for the data but many servers seem to send UTF-8
these days. Just something to keep in mind.
hth,
stephen
On Jun 18, 2008, at 9:13 PM, Marco Papa wrote:
Jens,
Yes, I found that ID3Tag Framework that you mention below and
another library TagLib 1.5, that also has an OS X framework available:
TagLib 1.5 library:
http://developer.kde.org/~wheeler/taglib.html
OS X TagLib 1.5 framework:
http://developer.kde.org/~wheeler/files/TagLib.dmg
Unfortunately both work on MP3 files, not MP3 streams.
On the other hand, I googled a great article from O'Reilly:
http://jicyshout.sourceforge.net/oreilly-article/java-streaming-mp3-pt2/java-streaming-mp3-pt2.html
It has links to a Java implementation of "metadata" (not just ID3
Tags) extraction from icecast, shoutcast and live365 "streams":
http://sourceforge.net/projects/jicyshout/
On Wed, Jun 18, 2008 at 7:26 PM, Jens Alfke <email@hidden>
wrote:
On 18 Jun '08, at 11:18 AM, Marco Papa wrote:
and several open source libraries that will do the "tag
extraction". There is at least one C++ library that should be easy
to link with the Apple frameworks.
If you haven't found it yet, the one that I've used in the past is
an Objective-C library called "ID3Tag.framework":
http://drewfamily.homemail.com.au/Cocoa_-_ID3Tag_framework.html
It expects a file, though, so it might be difficult to get it to
work on streamed data.
I assume the right place to look and extract the ID3v2 tags would
be right at the beginning on the transaction, in response to the
kCFStreamEventHasBytesAvailable event, before I pass the stream to
Audio File Stream Services. This code would work like a proxy pass-
through. Correct?
ID3v2 tags go at the beginning of the file. So if the stream is
playing multiple tracks, like a typical radio station, there should
be tags embedded in the data (in between the MPEG frames) wherever a
new track/song begins. So realistically, you have to be ready to
detect tags anywhere in the stream, since there's no other way to
tell where a track begins.
[...]
I think you're right about how to parse the tags. You'll need to do
some buffering of the streamed data, though, because the tag
boundaries won't necessarily match up with the chunks of the stream
you read from the socket.
—Jens
--
Marco Papa, Ph.D.
Computer Science Department
University of Southern California
Henry Salvatori Computer Center
Los Angeles, California 90089-0781
Voice: +1-213-974-2137
Cell: +1-310-944-5468
E-mail: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden