Skip to TS diagnostics
Packet-level diagnosticsLocal stream-copy tools

TS Diagnostics, Trim & Lossless MP4 Remux

Inspect MPEG transport-stream programs, PIDs, codecs, timing, continuity errors, scrambling, and keyframes. For a narrowly compatible H.264/AAC program, preview keyframes, choose a trim range, and copy the streams into MP4 without re-encoding.

Compatibility first: MP4 output is enabled only for one unscrambled H.264 video stream plus optional AAC/ADTS audio. MPEG-2 video, HEVC, AC-3, encrypted/scrambled streams, missing program maps, and other variants remain diagnostics-only. Lossless trim starts snap to a detected keyframe.

Ready. Choose a transport stream or run the sample diagnostics.

Мясцовы files remain in this browser. Diagnostics are capped at 256 MiB; the pinned 31 MiB FFmpeg runtime is loaded only for compatible preview/remux operations, which are capped at 96 MiB.

TS diagnostic and remux boundaries

Packet layoutsDetects standard 188-byte TS, 192-byte M2TS prefix, and 204-byte Reed–Solomon trailer layouts.
Program evidenceParses PAT and PMT sections, verifies MPEG-2 CRC-32, and reports program, PCR, stream, descriptor, and codec mappings.
Error evidenceReports sync, transport-error, PSI CRC, scrambling, duplicates, and per-PID continuity-counter gaps.
Timing and keyframesUses bounded PCR/PTS evidence and H.264 random-access or IDR markers; counts are diagnostic, not a full decode index.
Lossless MP4 pathOne H.264 video plus optional AAC/ADTS audio; other codecs are identified but deliberately not copied to MP4 here.
No repair claimRemux does not repair missing packets, decrypt streams, correct timestamps, transcode unsupported codecs, or guarantee broadcast compliance.

TS diagnostics and remux questions

What does the PID/program report prove?

It reports packet-level structures actually recovered from the file: PAT and PMT sections, their CRC status, mapped PIDs/codecs, PCR PID, traffic counts, transport-error flags, continuity counters, scrambling control, and bounded timing evidence.

Which TS files can be remuxed losslessly to MP4?

This route intentionally enables stream copy only for one unscrambled H.264/AVC video stream plus optional AAC/ADTS audio. Unsupported codecs and incomplete program maps remain visible in diagnostics but do not receive a misleading conversion button.

Why can the trim start move earlier?

Starting between keyframes would require decoding and re-encoding part of the video. The lossless path instead snaps backward to the nearest detected keyframe and shows the actual chosen time. End time remains approximate.

Does a continuity error prove visible corruption?

No. It proves an unexpected continuity-counter transition on a PID. The missing or repeated packet may affect video, audio, metadata, or nothing visible; the per-PID table provides the context.

Ёсць files uploaded or transcoded?

Мясцовы files remain in the browser. Compatible MP4 output uses a pinned local FFmpeg WebAssembly runtime with codec copy, not transcoding. URL mode contacts only the URL you provide and requires CORS permission.