1

I am currently looking to add Trick and Play functionality to HTTP Live Streaming (HLS) Server. For Trick and Play functionality to work, generally MPEG Transport Streams are pre-indexed. What is the general format of the Transport Stream Index files and how can I determine the I-frame in Transport Stream using the Index files?

I am using Transport Stream and Index file from here.

Junaid
  • 171
  • 8

1 Answers1

1

Each live555 TS index record is 11 bytes long:

- Record Type:              1 byte
- Start Offset:             1 byte
- Size:                     1 byte
- PCR (integer part):       3 bytes (little-endian)
- PCR (fractional part):    1 byte
- Transport Packet Number:  4 bytes (little-endian)

Your sample is H.264 so the Record Type to look for is:

RECORD_NAL_H264_IFRAME = 9, // H.264

Source

aergistal
  • 29,947
  • 5
  • 70
  • 92
  • Ok so what is the significance of "Start Offset" and "Size" fields here. – Junaid Mar 14 '15 at 08:20
  • "Start Offset" and "Size" are related to the position of frame data in the packet. If you add the two you should get the transport packet size, typically 188 bytes. I'm not sure how they're using these index records as the values are sometimes weird. – aergistal Mar 14 '15 at 10:54