ts-analyzer
A library used for analyzing MPEG/Transport Stream files. This library is not intended for encoding, decoding or multiplexing transport streams. It has mainly been created for payload extraction and packet analysis of transport stream packets. Specifically in the case of KLV extraction using klv-reader.
Example
extern crate ts_analyzer;
use env;
use TSReader;
use File;
use BufReader;
Goals
- Parse transport stream packets
- Parse transport stream packet header
- Parse transport stream packet adaptation field
- Parse transport stream packet adaptation extension field
- Be able to dump raw payload bytes from packet
- Parse complete payloads from multiple packets
- Track packets based on PID
- Concatenate payloads of the same PID based on continuity counter
- Improve throughput of packet and payload reading.
- Current speeds are around 15MB/s for payload reading and 22MB/s for packet reading even with data directly in memory.
Reference Material
A sample TS stream with KLV data can be found here.