Skip to main content

πŸ”’ Sync Byte

Every MPEG-TS packet begins with the sync byte 0x47. An analyzer confirms transport-stream alignment by finding one sync byte candidate and then checking that additional sync bytes appear at a fixed packet spacing.

Sync Byte

What This Test Does​

The Sync Byte test scans for a valid MPEG-TS packet alignment using both 188-byte packets and 204-byte wrapped packets. Once alignment is found, it checks that each packet starts with 0x47 and attempts to resynchronize if corruption breaks alignment later in the file.

βœ… Pass Criteria​

The test passes when a valid transport-stream alignment is found and no sync-byte alignment breaks are detected after scanning the file.

❌ Fail Criteria​

The test fails when no valid transport-stream alignment can be found, or when one or more packet starts do not contain the expected 0x47 sync byte.

Example​

Here a chart that shows a file with 10 corrupted sync bytes.

Sync Byte Corruption chart

Test file​

  • mpegts-sync-byte-corruption.ts