mp3id3id3v2

ID3v2.3: ETCO frame Event format clarification


According to the informal standard, an ETCO frame is:

How can someone figure out how many events there are? Would a program need to use the size field of the frame header?

If all events are five bytes in length, what's the purpose of the $FF event, whose purpose is "one more byte of event follows"?


Solution

    1. Yes, you must parse the entire frame to find out. Estimating (size of frame) minus (header size), divided by 5 would give you the most probable count of both, but in reality more events and fewer timestamps might occur.
    2. I've never encountered that situation myself, but assume it's for combining multiple events with the same timestamp. Instead of only having one event (i.e. $0D for unwanted noise) the bytes $FF$FF$05$06$0D might occur, indicating that two more bytes=events are following (i.e. outro ends, verse starts, unwanted noise - all at the same timestamp, whose 4 bytes then follow).