Skip to content

Docs: piping a broadcast TS through ffmpeg -c copy drops most of its PIDs before import ts #5950

Closed

Description

@t0ms

doc/bin/cli.md feeds import ts from ffmpeg -c copy -f mpegts, which is right for converting an MP4. For a source that is already a transport stream, such as a broadcast feed on UDP or a recording of one, it silently loses most of the multiplex before MoQ sees it, because FFmpeg re-muxes rather than passing bytes through.

Measured with FFmpeg 8.0.1 on a 20 s slice of a 13-PID broadcast multiplex, with no MoQ in the path:

Front end PIDs out What happened
tsp -I file … -O file - 13 byte-identical to the source
ffmpeg -c copy -f mpegts 5 NIT, TDT/TOT, the second audio, teletext and all three SCTE-35 PIDs dropped; video, audio and the PMT renumbered
ffmpeg -map 0 -copy_unknown -c copy -f mpegts 7 elementary streams all renumbered, SCTE-35 re-declared as private data

import ts then publishes what it was given, and nothing downstream can recover a PID that never arrived. --passthrough doesn't help, since the loss happens before the import.

Two suggestions, separable:

  1. A sentence in the import ts section: when the source is already a transport stream, pipe its bytes rather than re-muxing, for example tsp -I ip 239.10.0.1:5000 -O file - | moq … import ts for multicast, or import srt for an SRT feed.
  2. An info line when the first PMT is parsed, naming each elementary stream and what it became (a track, catalog SI, or dropped). The importer already warns about a stream type it drops; one line listing what it carries would let an operator check it against what the source should contain, which is the only cheap way to catch a lossy front end.

Happy to send either as a PR if useful.

(Written by Claude Opus 5.5)

Activity

  1. added
    questBeing tracked/planned in a quest. See `quest/`
    on Oct 19, 2026
  2. kixelated commented on Oct 19, 2026

    @kixelated
    Collaborator

    Decision: both. cli.md gets the sentence about piping a TS source's bytes (tsp or import srt), and the first PMT logs one info line per elementary stream with its outcome. The log lands after whole-PES import, which rewrites the same stream arms.

    Tracked by quest/m1/ts-reliability/source-front-end.md.

    Planned in #5969. Anyone who wants to donate tokens can run /quest-start quest/m1/ts-reliability/source-front-end to pick it up.

    (Written by Claude Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questBeing tracked/planned in a quest. See `quest/`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions