←Back to Technical Sheets
🛠️ Interactive Tool

TS Packet Analyzer

Paste hex from tsdump, a hex editor or a capture, and get every transport stream header field decoded per ISO/IEC 13818-1 — including the full adaptation field and the PCR base-and-extension arithmetic. Continuity counters are tracked per PID across the whole input, so packet loss shows up as it would on a real monitor. Everything runs in your browser; nothing is uploaded anywhere.

Input

A single 4-byte header is enough for the header fields. Supply the full 188 bytes to also decode the adaptation field and PCR. Multiple packets are decoded in sequence.

Decoded

Paste hex above and press Decode.

What this decodes

The 4-byte header is mandatory in every packet. The adaptation field is present only when the adaptation field control bits say so, and each of its own fields is present only when its flag is set — which is why the layout has to be walked in order rather than read at fixed offsets.

FieldBitsNotes
sync_byte8Always 0x47. Anything else means you are not aligned to a packet boundary
transport_error_indicator1Set by the demodulator when FEC could not correct the packet. Never set by software that merely mangles bytes
payload_unit_start_indicator1A PES packet or a section starts in this payload
transport_priority1Rarely used in practice
PID138192 possible values. 0x0000–0x001F reserved, 0x1FFF is null
transport_scrambling_control200 clear, 01 reserved for DVB, 10 even key, 11 odd key
adaptation_field_control200 reserved, 01 payload only, 10 adaptation only, 11 both
continuity_counter4Increments per packet on a PID, wrapping every 16 — hence the blind spot
PCR33 + 933-bit base at 90 kHz plus 9-bit extension at 27 MHz. PCR = base × 300 + ext
On the continuity counter. This tool reports the observed step between consecutive packets on the same PID. A step of 1 is correct; anything else is a discontinuity. Note that a step of 1 does not prove nothing was lost — losing exactly 16 packets produces a step of 1 as well. That is measured, not theorised: see section 12 of the TSDuck cookbook.
A packet whose adaptation field claims more bytes than remain is flagged rather than silently truncated. In real streams that usually means the input is misaligned, or bytes were dropped mid-packet by whatever produced the dump.

Related

About the author

Gleb Sazanov

Project Leader

Gleb Sazanov is an accomplished Chief Technology Officer (CTO) with over 20 years of experience in software development, system architecture, and cloud-based solutions. As the CTO of SATLINE, a leading provider of virtual and colocation services tailored to SATCOM businesses, Gleb drives the company’s technological strategy, fostering innovation and efficiency in data center services. His expertise spans various domains, including DevOps, system scaling, and high-performance infrastructure management. With a deep passion for cutting-edge technologies, Gleb plays a pivotal role in shaping the future of the SATCOM industry.