How do I parse timed_id3 values taken from a HLS stream chunk?
Twitch stream chunks contain info like encoding time in a 3rd data stream that ffprobe identifies as timed_id3, the extracted data is:
b'\x00\x00\x00\x020TRCK\x00\x00\x00\x06\x00\x00\x033936\x00TDEN\x00\x00\x00\x15\x00\x00\x032016-09-30T02:01:11\x00TDTG\x00\x00\x00\x15\x00\x00\x032016-09-30T02:01:18\x00TOFN\x00\x00\x00\x1a\x00\x00\x03index-0000003936-tI2q.ts\x00TSSE\x00\x00\x00\x15\x00\x00\x03libavtwitch: 730c86\x00TXXX\x00\x00\x01\x15\x00\x00\x03segmentmetadata\x00{"broadc_s":1,"cmd":"ld_lat_data","ingest_r":2,"ingest_s":3,"stream_offset":15624,"transc_r":1475200871542,"transc_s":1475200878899}\xbd\x00\x00\x00\x01\xce\x8cM\x9d\x10\x8e%\xe9\xfe'
It's sort of parseable and contains common ID3 values but does not seem to be full ID3 data. Based on the ID3 spec it should start with a 'ID3' identifier value and other values but it doesn't, and all id3 parsing libraries I tried fail parsing it because of that.
It seems timed_id3 in HLS streams is different from normal id3 info for mp3 files.