Various tools for MPEG2 TS manipulation. https://raiza.dev/
Find a file
2026-06-18 11:46:04 +09:00
.gitignore Update tscarousel.py - at least extracts and fixed PNGs now. 2026-06-18 11:45:58 +09:00
LICENSE Initial commit 2026-03-21 11:47:18 +01:00
README.md Update README.md 2026-06-18 11:46:04 +09:00
tscarousel.py Update tscarousel.py - at least extracts and fixed PNGs now. 2026-06-18 11:45:58 +09:00
tsdropcheck.py Update tsdropcheck.py; added --stream option, --memory is default. 2026-06-12 12:17:35 +09:00

RaiTSTools

Various tools for MPEG2 TS manipulation.

tsDropCheck

usage: tsdropcheck [-h] [-srcpath PATH] [-nolog] [FILE ...]

Check an MPEG-2 TS file for packet drops.
Outputs the playback time (PCR), broadcast date/time (TOT) and
byte offset of every continuity-counter discontinuity found.

positional arguments:
  FILE           TS file(s) to analyse

options:
  -h, --help     show this help message and exit
  -srcpath PATH  Alternate way to specify the TS file path
  -nolog         Suppress all output; only set the exit code (for batch use)

tsCarousel

usage: tscarousel.py [-h] [-o OUTPUT] [-v] [--extra-pids PID[,PID…]] [--comp-tag TAG] [--module-id ID] [--zip FILE.zip] [--fix-png] ts_file

Extract ARIB ISDB DSM-CC Object Carousel from an MPEG-2 TS file.

positional arguments:
  ts_file               Input MPEG-2 TS recording (.ts / .m2ts / .mts)

options:
  -h, --help            show this help message and exit
  -o, --output OUTPUT   Output root directory (default: current directory)
  -v, --verbose         Enable verbose debug logging
  --extra-pids PID[,PID…]
                        Comma-separated list of additional PIDs to treat as DSM-CC data carousel (decimal or 0x-prefixed hex)
  --comp-tag TAG        Only extract the component with this component_tag (decimal or 0x-hex, default: 0x50). Pass --comp-tag=all to extract every component.
  --module-id ID        Only extract the module with this module_id (decimal or 0x-hex, default: 0x0021). Pass --module-id=all to extract every module.
  --zip FILE.zip        After extraction, compress the output directory into this ZIP file and remove the original directory. A .zip extension is added automatically if omitted.
  --fix-png             After extraction, find every .png that has a matching .clt palette file and inject the palette as a PLTE chunk. Required for indexed-colour PNGs used in ARIB data broadcasts to display correctly.



defaults are --comp-tag=0x50 --module-id=0x0021, these are used in TVO Pocket Monsters and PokeDoko for their data broadcast.