Using audio file services to extract ID3 tags from an incomplete mp3 payload.

  • Hello,

    I would like to take advantage of the audio file services api for
    extracting ID3 information from an incomplete mp3. At the moment I am
    downloading just the ID3 portion of an mp3 file (using
    NSURLConnection), and storing it in an NSData object. I'm trying to
    use this ID3 data to create an AudioFileID with
    AudioFileOpenWithCallbacks, by doing this I can use
    AudioFileGetProperty to extract the tags. However,
    AudioFileOpenWithCallbacks returns kAudioFileInvalidFileError when I
    attempt this.

    I don't know if this error is due to the fact that I need to do some
    preprocessing on the downloaded mp3 data before passing it to
    AudioFileOpenWithCallbacks, or if AudioFileOpenWithCallbacks simply
    does not support incomplete mp3 files.

    Does anyone have any thoughts? I'm trying to avoid writing my own ID3
    parser if possible, and would prefer to not using external
    libraries/frameworks

    Thanks in advance!

    -Rod
  • On 08/03/2010, at 8:46 AM, Rod Gutierrez wrote:

    > Does anyone have any thoughts? I'm trying to avoid writing my own ID3
    > parser if possible, and would prefer to not using external
    > libraries/frameworks

    I think the basic problem is that the ID3 tags are appended to the end of the audio data in the file, so to read them you either have to download all of the file or somehow request the header, figure out the offset then request the data at the end, which might not even be possible.

    --Graham
  • Hi Graham,

    This is true for ID3 version 1, but for version 2.x the tags live at
    the beginning of the file.

    I'm not too worried about not supporting ID3 version 1.

    Cheers,

    -Rod

    Sent from my iPhone

    On Mar 7, 2010, at 5:53 PM, Graham Cox <graham.cox...> wrote:

    >
    > On 08/03/2010, at 8:46 AM, Rod Gutierrez wrote:
    >
    >> Does anyone have any thoughts? I'm trying to avoid writing my own ID3
    >> parser if possible, and would prefer to not using external
    >> libraries/frameworks
    >
    >
    > I think the basic problem is that the ID3 tags are appended to the
    > end of the audio data in the file, so to read them you either have
    > to download all of the file or somehow request the header, figure
    > out the offset then request the data at the end, which might not
    > even be possible.
    >
    > --Graham
    >
    >
previous month march 2010 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today