Search code examples
codechttp-live-streamingm3u8

How to find out specifics about an m3u8 stream?


How can I find out the specifics about an m3u8 stream? For example, what codecs / profiles the footage was built with?

Example m3u8: http://live.3gv.ifeng.com/live/zixun.m3u8


Solution

  • You cant determine this information from the m3u8. You must download a .ts segment and analyze the elementary stream. For H264 you need to parse the SPS, for AAC the ADTS header and for MP3 the mpeg frame header. Note the specifics can also change in the middle of the stream if a discontinuity via the m3u8, or discontinuity indicator bit in the ts is set.