• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ID3v2 tags
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ID3v2 tags


  • Subject: Re: ID3v2 tags
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 18 Jun 2008 19:26:00 -0700


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.

(The original ID3v1 tags went at the _end_ of the file. This made them easier to update without having to rewrite the whole file, but obviously was not useable for streamed audio. I don't think you'd run into any of those.)

I've heard there is an additional protocol used by some streaming servers to let clients ask for the tags of the current track; otherwise if you start listening in the middle of one track, there's no way to get its tags, since they already went by before you tuned in. I don't know any details about that, though. The MP3 streaming protocol is sometimes called "Icecast", after one of the first implementations, so that might be a useful keyword to search on.

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: ID3v2 tags
      • From: "Marco Papa" <email@hidden>
References: 
 >ID3v2 tags (From: "Marco Papa" <email@hidden>)
 >Re: ID3v2 tags (From: "Marco Papa" <email@hidden>)

  • Prev by Date: Re: ID3v2 tags
  • Next by Date: Re: Getting Started
  • Previous by thread: Re: ID3v2 tags
  • Next by thread: Re: ID3v2 tags
  • Index(es):
    • Date
    • Thread