Skip to content

feat: add m2tsMuxRate field and null-packet CBR warning - #10

Merged
mondain merged 1 commit into
mondain:mainfrom
gwendalsimon:feat/m2ts-mux-rate
Jul 15, 2026
Merged

feat: add m2tsMuxRate field and null-packet CBR warning#10
mondain merged 1 commit into
mondain:mainfrom
gwendalsimon:feat/m2ts-mux-rate

Conversation

@gwendalsimon

Copy link
Copy Markdown
Collaborator

Summary

Addresses point 2 of #7 — null packet removal breaks CBR byte-clock and mux-clock recovery.

Point 2 notes that §5.5 permits null packet removal at publisher discretion, but removing null packets changes the byte distance between successive PCRs. Constant-bit-rate receivers use that spacing to reconstruct the mux clock; without it, a downstream device must re-derive a rate it was never told. The issue suggested either recommending that nulls be retained for CBR reconstruction, or defining an advisory catalog field for the source mux rate.

This PR implements the catalog field option.

Changes

§5.5 Multi-Program Source Handling — adds a paragraph warning that removing null packets changes the inter-packet byte spacing that constant-bit-rate receivers use to recover the mux clock, and that publishers removing null packets SHOULD declare m2tsMuxRate.

Catalog table — new m2tsMuxRate entry.

New field m2tsMuxRate — optional advisory Number (bits/s). A subscriber reconstructing a constant-bit-rate output stream MAY use this value to restore the original mux rate when null packets have been removed.

* Add warning in §5.5 that null packet removal changes inter-packet byte
  spacing, breaking CBR mux-clock recovery for downstream receivers
* Add optional advisory catalog field m2tsMuxRate (bits/s) so subscribers
  can restore the original mux rate when null packets have been removed
* Add m2tsMuxRate to catalog table and field definitions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gwendalsimon
gwendalsimon requested a review from mondain as a code owner July 9, 2026 08:30
@mondain
mondain merged commit 0b51ed5 into mondain:main Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants