Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions doc/bin/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,22 @@ profile or channel layout ADTS cannot label is refused rather than mislabeled.

A constant-rate MPEG-TS source records its multiplex rate in the catalog
(`mpegts.muxRate`, measured off the PCR clock, null stuffing included), and
`export ts` pads its output with null packets back to that rate so an IRD or
groomer receives a constant-rate stream. `--mux-rate 5000000` pads to an explicit
rate instead, including for a broadcast that recorded none. Media is never delayed
or dropped to fit: a source that sustains more than the rate overruns it, and a
VBR source records nothing, so export without either stays unpadded.
`export ts` transmits its output at that rate: every 25 ms between clock packets
carries the bytes the rate implies, media first and null packets after, so an IRD
or groomer recovering the clock from packet arrival can lock. `--mux-rate 5000000`
sets an explicit rate instead, including for a broadcast that recorded none. A VBR
source records nothing, so export without either stays VBR and unpadded. The
importer measures the rate over its first 2 s, and an export that starts with the
broadcast is VBR until then.

A keyframe is usually several intervals' worth of bytes, so it is spread over the
intervals before it decodes, and the output trails the media by a buffer delay.
The delay grows to fit the largest burst seen, up to `--max-age`, and is latency
on top of the export's own. A burst that needs more goes out above the rate before
it decodes, with a warning, and later intervals repay it from their padding: media
is never delayed past its decode time or dropped. A 60 s cut of a 9.95 Mb/s news
channel reaches the 500 ms default and has 75 % of intervals on the rate;
`--max-age 1s` settles at a 710 ms delay with 99 % on it.

fMP4 export writes one fragment per publisher group on each track. Audio follows
the publisher's cuts; video normally follows GOPs. Closing a group flushes it
Expand Down Expand Up @@ -328,7 +339,9 @@ For `export ts`, `--max-age` also bounds how long the muxer holds a leading
track for a lagging one. Frames go out in media-time order across all tracks,
not arrival order, so two exporters of one broadcast emit them in one order. A
track quiet for longer is muxed around until it catches up; a sparse track
(SCTE-35) costs that wait once per cue. `--max-age 0` keeps arrival order.
(SCTE-35) costs that wait once per cue. `--max-age 0` keeps arrival order. With
a mux rate it is also how far the output may trail the media to spread a keyframe
over the rate.

A stdout export ends with the broadcast. `export ts --linger 10s` waits that
long for the broadcast to come back instead: a publisher that restarts within
Expand Down
1 change: 0 additions & 1 deletion quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ QUIC studies there on that rule.
- [Catalog warmup](/quest/m1/catalog-warmup.md) - `warmup` on video and audio renditions, in the catalog and the draft
- [Audio warmup](/quest/m1/audio-warmup.md) - a viewer joining an Opus rendition mid-stream never hears the unconverged first 80 ms
- [#3021](/quest/m1/3021-moq-gst-anchor-generated-media-timelines-to-wall-clock.md) - moq-gst picks the broadcast wall epoch; a restarted source is a new epoch, not a forward re-anchor
- [TS byte schedule](/quest/m1/ts-export-byte-schedule.md) - moq export ts places PCRs and padding on the byte grid `mpegts.muxRate` implies, so a receiver can clock off arrival
- [Release profile](/quest/m1/release-profile.md) - every release build gets fat LTO, one codegen unit, and stripping from the workspace profile instead of three script exports
- [Size report](/quest/m1/size-report.md) - a nightly job reports every shipped artifact's size, native and JS, and alerts when one grows
- [Publish lazy file source](/quest/m1/publish-lazy-file.md) - a camera or screen `<moq-publish>` stops downloading mediabunny's ~99 KB gzip
Expand Down
30 changes: 0 additions & 30 deletions quest/m1/ts-export-byte-schedule.md

This file was deleted.

5 changes: 3 additions & 2 deletions rs/moq-cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,10 @@ pub struct Transport {
#[usage(flatten)]
pub container: Container,

/// Pad the output with null packets to this constant rate, in bits per second.
/// Transmit the output at this constant rate, in bits per second, padding with
/// null packets and trailing the media by up to `--max-age` to spread keyframes.
/// Defaults to the multiplex rate the catalog recorded from a constant-rate
/// source (`mpegts.muxRate`); without either the output is unpadded.
/// source (`mpegts.muxRate`); without either the output is VBR and unpadded.
#[usage(long)]
pub mux_rate: Option<u64>,
}
Expand Down
Loading
Loading