Skip to content
Merged
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
5 changes: 5 additions & 0 deletions cpp/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `moq::ContainerFormat::kFmp4` unwraps to Legacy (#6250)

A container import with `moq::ContainerFormat::kFmp4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `moq::ContainerFormat::kCmaf` to keep publishing CMAF.

### Catalog references carry their epoch

`Video` and `Audio` gain `epoch`, the publisher instance their `broadcast` reference names, right after `broadcast`; positional initializers shift by one.
Expand Down
5 changes: 5 additions & 0 deletions dart/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `ContainerFormat.fmp4` unwraps to Legacy (#6250)

A container import with `ContainerFormat.fmp4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `ContainerFormat.cmaf` to keep publishing CMAF.

### Catalog references carry their epoch

`Video` and `Audio` renditions gain `epoch`, the publisher instance their `broadcast` reference names.
Expand Down
4 changes: 3 additions & 1 deletion dart/moq_ffi/lib/src/moq.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6339,7 +6339,7 @@ class LocMoqContainer extends MoqContainer {
}
}

enum MoqContainerFormat { fmp4, mkv, ts, flv }
enum MoqContainerFormat { fmp4, mkv, ts, flv, cmaf }

class FfiConverterMoqContainerFormat {
static LiftRetVal<MoqContainerFormat> read(Uint8List buf) {
Expand All @@ -6353,6 +6353,8 @@ class FfiConverterMoqContainerFormat {
return LiftRetVal(MoqContainerFormat.ts, 4);
case 4:
return LiftRetVal(MoqContainerFormat.flv, 4);
case 5:
return LiftRetVal(MoqContainerFormat.cmaf, 4);
default:
throw UniffiInternalError(
UniffiInternalError.unexpectedEnumCase,
Expand Down
5 changes: 5 additions & 0 deletions doc/bin/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ program aboard, for what demultiplexing cannot carry, such as a scrambled
service; `export ts --passthrough` writes it back out. FLV accepts the same
legacy and enhanced-RTMP codecs as the [RTMP gateway](/bin/rtmp).

fMP4 import splits each fragment into one frame per sample, so players need no
MP4 parser. `import fmp4 --passthrough` publishes each fragment whole as
[`cmaf`](/concept/hang#container) instead, keeping the source's exact sample
timing.

`import rtsp` pulls an IP camera's H.264 or H.265 video and AAC audio without
re-encoding. RTP rides the RTSP connection, so run it on the camera's network
and the camera needs no inbound port. Credentials go in the URL
Expand Down
3 changes: 2 additions & 1 deletion doc/bin/hls.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ and `--cors-origin` opens it to browsers. See `moq export hls --help`.

Import handles classic HLS; LL-HLS parts are not implemented. It publishes the
playlist's own media times, and anchors the catalog clock on the first imported
segment.
segment. Each fMP4 segment is split into one frame per sample; `--passthrough`
publishes each fragment whole as CMAF instead, keeping its exact sample timing.

The library, including the recorder cursors for mirroring a broadcast to
storage, is [`moq-hls`](https://docs.rs/moq-hls).
1 change: 1 addition & 0 deletions doc/lib/c/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ inside. The header is the reference: each function carries a doc comment.
- **Threading.** Call any function from any thread. Raw publish calls block until the codec takes the frame, which paces a publisher.
- **Zeroed config is the default.** A zeroed `moq_client_config` means the default for every field, so new fields don't break callers. A field whose default isn't zero has a `has_*` flag: `backoff_timeout_us = 0` means "retry forever" only with `has_backoff_timeout = true`.
- **Compressed tracks.** `moq_track_info.compress` on a raw track sends each group DEFLATE-compressed to opt-in `moq-lite-07-wip` peers; other peers, and every reader here, get the original frames. `@moq/net` cannot read a compressed track yet.
- **fMP4 import.** `MOQ_CONTAINER_FORMAT_FMP4` splits each fragment into one frame per sample; `MOQ_CONTAINER_FORMAT_CMAF` republishes it whole.
- **Audio needs cuts.** Video groups at its keyframes, but audio forms a group only where you call `moq_publish_media_cut`: after every frame, or at a segment cadence to align with video.
- **Ending cleanly.** When the input ends, finish every track, then call `moq_publish_finish()`. It consumes the broadcast and returns a finish handle that keeps it announced and serving the finished tracks, writing the linger, their longest max age, to `linger_us`. Keep the handle for that long on your own clock so a subscriber still catching up can drain them, then `moq_publish_finish_close()` it; closing early is the interrupt. `moq_publish_close()` stays the abrupt end.
- **Live encoder timing.** After writing a frame you encoded yourself, call `moq_publish_media_flush` with the same timestamp so the catalog advertises your jitter. Skip it for file and network imports. On a seek or pause, call `moq_publish_media_discontinuity`, then keep timestamps moving forward and resume video on a keyframe.
Expand Down
1 change: 1 addition & 0 deletions doc/lib/cpp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Share `moq::MediaTimebase::init(broadcast)` through `ContainerInit` when several
use one source timeline; omitting it keeps an independent offset. A timebase belongs to
its broadcast and does not keep it open. `MediaContainerProducer` takes chunks split
anywhere, so a raw byte stream needs no other importer.
`moq::ContainerFormat::kFmp4` splits each fragment into one frame per sample; `kCmaf` republishes it whole.

```cpp
// Publish encoded frames, or raw pixels with the codec inside the binding.
Expand Down
1 change: 1 addition & 0 deletions doc/lib/dart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Share `media.Timebase(broadcast: ...)` through `ContainerInit` when several impo
one source timeline; omitting it keeps an independent offset. A timebase belongs to its
broadcast and does not keep it open. `ContainerProducer` takes chunks split anywhere,
so a raw byte stream needs no other importer.
`ContainerFormat.fmp4` splits each fragment into one frame per sample; `ContainerFormat.cmaf` republishes it whole.
`media.CatalogConsumer.subscribe`, `media.TrackConsumer.subscribe`, and `media.GroupConsumer.fetch`
construct the read side from a broadcast; the last two take a catalog `media.Rendition` and
follow its broadcast and track themselves. For arrival-order reads, decode each group from
Expand Down
1 change: 1 addition & 0 deletions doc/lib/go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Share `media.NewTimebase(broadcast)` through `ContainerInit` when several import
source timeline; omitting it keeps an independent offset. Timebases belong to one broadcast
and do not keep it open; release the handle with `Close` on the calling goroutine.
`NewContainerProducer` takes chunks split anywhere, so a raw byte stream needs no other importer.
`ContainerFormatFmp4` splits each fragment into one frame per sample; `ContainerFormatCmaf` republishes it whole.
For arrival-order reads, decode each group from `moq.TrackConsumer.RecvGroup` with
`media.NewGroupConsumer`; frames carry container media time as they land. `media.FetchGroup`
fetches and decodes one past group.
Expand Down
1 change: 1 addition & 0 deletions doc/lib/kt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Share `Timebase(broadcast)` through `ContainerInit` when several imports use one
timeline; omitting it keeps an independent offset. A timebase belongs to its broadcast
and does not keep it open. `ContainerProducer` takes chunks split anywhere, so a raw
byte stream needs no other importer.
`ContainerFormat.FMP4` splits each fragment into one frame per sample; `ContainerFormat.CMAF` republishes it whole.
Construct readers with `CatalogConsumer.subscribe`, `TrackConsumer.subscribe`, or
`GroupConsumer.fetch`; the last two take a catalog `Rendition` and follow its broadcast and
track themselves. For arrival-order reads, decode each group from
Expand Down
1 change: 1 addition & 0 deletions doc/lib/py/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Share `media.Timebase(broadcast)` through `ContainerInit` when several imports u
source timeline; omitting it keeps an independent offset. A timebase belongs to its
broadcast and does not keep it open. `ContainerProducer` takes chunks split anywhere,
so a raw byte stream needs no other importer.
`ContainerFormat.FMP4` splits each fragment into one frame per sample; `ContainerFormat.CMAF` republishes it whole.
`MediaFrame.timestamp`, media writes, and `flush` use `datetime.timedelta`.
A missing data timestamp stays untimed; the library never substitutes zero or now.
JSON consumers yield `moq.json.Timed(value, timestamp)`; a snapshot consumer yields each state in order,
Expand Down
2 changes: 1 addition & 1 deletion doc/lib/rs/moq-mux.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ back. This is what `moq import` / `export` and the gateways are built on.

| Format | Import | Export | Notes |
| --- | --- | --- | --- |
| fMP4 / CMAF | yes | yes | Audio/video passthrough as `cmaf` or repackaged as `legacy`; `wvtt` subtitles import as timed WebVTT text and `stpp` TTML (IMSC timing profile) as `ttml` documents on the broadcast clock, preserving source language and label when present; other subtitle codecs are skipped. |
| fMP4 / CMAF | yes | yes | Audio/video unwrapped to `legacy` by default, or passed through as `cmaf` with `with_passthrough`; `wvtt` subtitles import as timed WebVTT text and `stpp` TTML (IMSC timing profile) as `ttml` documents on the broadcast clock, preserving source language and label when present; other subtitle codecs are skipped. |
| MPEG-TS | yes | yes | H.264/H.265; AAC, MP2, AC-3, E-AC-3, Opus up to 7.1; SCTE-35 sections and every other undecoded PES stream (KLV, subtitles, DVB AC-3) as tracks; service tables round-trip. |
| FLV / RTMP | yes | yes | Legacy H.264 + AAC + MP3, plus enhanced-RTMP HEVC, AV1, VP9, Opus, AC-3, E-AC-3, and multitrack. |
| Matroska / WebM | yes | yes | Timed SRT and WebVTT subtitles import as WebVTT text renditions, preserving source language and label when present; other subtitle codecs are skipped. |
Expand Down
1 change: 1 addition & 0 deletions doc/lib/swift/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Share `Media.Timebase(broadcast:)` through `ContainerInit` when several imports
source timeline; omitting it keeps an independent offset. A timebase belongs to its
broadcast and does not keep it open. `ContainerProducer` takes chunks split anywhere,
so a raw byte stream needs no other importer.
`.fmp4` splits each fragment into one frame per sample; `.cmaf` republishes it whole.
For arrival-order reads, decode each group from `TrackConsumer.recvGroup()` with
`Media.GroupConsumer(group:container:)`; frames carry container media time as they land.

Expand Down
5 changes: 5 additions & 0 deletions go/wrapper/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `media.ContainerFormatFmp4` unwraps to Legacy (#6250)

A container import with `media.ContainerFormatFmp4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `media.ContainerFormatCmaf` to keep publishing CMAF.

### Catalog references carry their epoch

`ffi.MoqVideo` and `ffi.MoqAudio` gain `Epoch`, the publisher instance their `Broadcast` reference names.
Expand Down
4 changes: 3 additions & 1 deletion go/wrapper/media/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ const (

// ContainerFormat values: a container that publishes its own tracks.
const (
// ContainerFormatFmp4 is fragmented MP4 / CMAF.
// ContainerFormatFmp4 is fragmented MP4 / CMAF, split into one frame per sample.
ContainerFormatFmp4 = ffi.MoqContainerFormatFmp4
// ContainerFormatCmaf is fragmented MP4 / CMAF, republished whole as one CMAF frame per fragment.
ContainerFormatCmaf = ffi.MoqContainerFormatCmaf
// ContainerFormatMkv is Matroska / WebM.
ContainerFormatMkv = ffi.MoqContainerFormatMkv
// ContainerFormatTs is an MPEG-2 transport stream.
Expand Down
5 changes: 5 additions & 0 deletions kt/moq/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `ContainerFormat.FMP4` unwraps to Legacy (#6250)

A container import with `ContainerFormat.FMP4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `ContainerFormat.CMAF` to keep publishing CMAF.

### Catalog references carry their epoch

`Video` and `Audio` gain `epoch`, the publisher instance their `broadcast` reference names; it defaults to `null`, so only positional construction changes.
Expand Down
5 changes: 5 additions & 0 deletions py/moq-rs/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `ContainerFormat.FMP4` unwraps to Legacy (#6250)

A container import with `ContainerFormat.FMP4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `ContainerFormat.CMAF` to keep publishing CMAF.

### Catalog references carry their epoch

`Video` and `Audio` renditions gain `epoch`, the publisher instance their `broadcast` reference names.
Expand Down
1 change: 0 additions & 1 deletion quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ lite-07 stream type here.
- [WebGPU on Safari](/quest/m1/webgpu-safari.md) - the WebGPU renderer is verified on Safari 26 for macOS and iOS
- [Interop finish](/quest/m1/interop-finish.md) - the interop matrix proves a clean broadcast finish across implementations
- [Exporters follow a rendition to a new track](/quest/m1/export-rendition-rebind.md) - the fMP4, TS, MKV and FLV exporters rebuild a rendition whose resolved `track` or `broadcast` changes under the same ID
- [fMP4 import unwraps to Legacy](/quest/m1/fmp4-import-unwrap.md) - fMP4 and HLS imports publish per-sample `Legacy` frames unless `--passthrough` asks for CMAF, and no first-party producer defaults to CMAF
- [lite-06 max sequence](/quest/m1/lite06-max-sequence.md) - group sequence 2^62-1 reaches a lite-06 subscriber or is refused loudly, instead of vanishing
- [Track live signal](/quest/m1/track-live.md) - a reader can wait for its track's feed to be live, so a player skips old cached groups while a fresh upstream subscription starts
- [moq-net compiles once](/quest/m1/net-erase-transport.md) - the session drivers stop monomorphizing per transport and per crate, saving several MiB of the relay, FFI library, `libmoq` and CLI
Expand Down
65 changes: 0 additions & 65 deletions quest/m1/fmp4-import-unwrap.md

This file was deleted.

5 changes: 5 additions & 0 deletions rs/moq-c/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your code for each breaking change, newest first.

## Unreleased

### `MOQ_CONTAINER_FORMAT_FMP4` unwraps to Legacy (#6250)

A container import with `MOQ_CONTAINER_FORMAT_FMP4` now publishes one Legacy frame per sample instead of one CMAF frame per fragment.
Pass the new `MOQ_CONTAINER_FORMAT_CMAF` to keep publishing CMAF.

### Finished tracks stay until the broadcast ends (#6157)

`moq_publish_track_finish`, `moq_publish_media_finish`, `moq_publish_container_finish`, and the encoder finishes now release the handle while the broadcast keeps the finished track listed, with its catalog rendition and demand, until `moq_publish_close` or the new `moq_publish_finish_close`.
Expand Down
5 changes: 4 additions & 1 deletion rs/moq-c/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,16 @@ pub enum moq_video_format {
#[allow(non_camel_case_types)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum moq_container_format {
/// Fragmented MP4 / CMAF.
/// Fragmented MP4 / CMAF, split into one frame per sample.
MOQ_CONTAINER_FORMAT_FMP4 = 0,
/// Matroska / WebM.
MOQ_CONTAINER_FORMAT_MKV = 1,
/// MPEG-2 transport stream.
MOQ_CONTAINER_FORMAT_TS = 2,
/// Flash Video, as used by RTMP.
MOQ_CONTAINER_FORMAT_FLV = 3,
/// Fragmented MP4 / CMAF, republished whole as one CMAF frame per fragment.
MOQ_CONTAINER_FORMAT_CMAF = 4,
}

/// Configuration for [moq_publish_audio].
Expand Down Expand Up @@ -312,6 +314,7 @@ fn container_format_from_u32(value: u32) -> Result<moq_mux::import::ContainerFor
v if v == moq_container_format::MOQ_CONTAINER_FORMAT_MKV as u32 => ContainerFormat::Mkv,
v if v == moq_container_format::MOQ_CONTAINER_FORMAT_TS as u32 => ContainerFormat::Ts,
v if v == moq_container_format::MOQ_CONTAINER_FORMAT_FLV as u32 => ContainerFormat::Flv,
v if v == moq_container_format::MOQ_CONTAINER_FORMAT_CMAF as u32 => ContainerFormat::Cmaf,
_ => return Err(Error::InvalidCode),
})
}
Expand Down
5 changes: 5 additions & 0 deletions rs/moq-cli/MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ How to update your invocation and config for each breaking change, newest first.

## Unreleased

### `import fmp4` and `import hls` unwrap to Legacy (#6250)

Both now publish one `legacy` frame per sample instead of one `cmaf` frame per fragment.
Add `--passthrough` to keep publishing CMAF.

### `export archive` records a prefix (#6160)

`moq export archive <url>` records every broadcast announced at or under `--broadcast`, each instance under `<url>/<broadcast>/@<epoch>`, until the connection ends, instead of one broadcast at `<url>`.
Expand Down
Loading
Loading