Skip to content

Commit bca7991

Browse files
committed
Add draft-16 CMAF operator workflow
1 parent 0f99d9b commit bca7991

6 files changed

Lines changed: 700 additions & 45 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ All notable changes to `moqx` will be documented in this file.
66

77
### Added
88

9+
- Added a draft-16 CMAF publisher workflow with namespace/track readiness,
10+
Moqtail-compatible CMSF catalogs, a bounded catalog discovery window, paced
11+
media fragments, and a public relay/player operator script.
912
- Added opt-in application-controlled inbound publisher subscriptions with
1013
typed request and cancellation events, explicit accept/reject operations,
1114
bounded decision timers, and deterministic stale/wrong-client handling.

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,16 +374,48 @@ delivery remains pending and `accept_subscription/4` returns
374374
`:not_supported`. Publisher-selected order defaults to ascending and can be
375375
confirmed explicitly with `group_order: :ascending` in the acceptance options.
376376

377-
`MOQX.CMAF.publish_file/3` prepares a fragmented MP4 as a CMSF `.catalog`, an
378-
initialization track, and retained media fragments:
377+
`MOQX.CMAF.publish_file/3` prepares a fragmented MP4 using the selected
378+
protocol's catalog convention. Cloudflare draft-14 uses `.catalog`, a separate
379+
initialization track, and retained media fragments. Standard draft-16 waits for
380+
namespace and track readiness, publishes a Moqtail-compatible `catalog` with
381+
inline `initData`, then publishes retained media on `video`:
379382

380383
```elixir
381384
{:ok, published} =
382385
MOQX.CMAF.publish_file(client, "/tmp/input.mp4",
383-
namespace: ["live", "camera-1"]
386+
namespace: ["live", "camera-1"],
387+
catalog_repetitions: 10,
388+
catalog_interval: 1_000,
389+
fragment_interval: 1_000
384390
)
385391
```
386392

393+
The repository includes an opt-in finite publisher for the public Moqtail
394+
draft-16 relay and player. It prints the player URL before publication starts,
395+
repeats only the catalog during the discovery window, and sends each media
396+
fragment once so embedded CMAF decode timestamps remain monotonic:
397+
398+
```bash
399+
ffmpeg -i input.mp4 -an -c:v libx264 -profile:v baseline -level 3.1 \
400+
-g 30 -keyint_min 30 -sc_threshold 0 \
401+
-movflags +frag_keyframe+empty_moov+default_base_moof \
402+
-frag_duration 1000000 -f mp4 /tmp/input-fragmented.mp4
403+
404+
mise exec -- mix run scripts/moqtail_cmaf_publish.exs \
405+
/tmp/input-fragmented.mp4 \
406+
--endpoint moqt://relay.moqtail.dev:443 \
407+
--namespace moqx/unique-camera \
408+
--catalog-repetitions 10 \
409+
--catalog-interval 1000 \
410+
--fragment-interval 1000
411+
```
412+
413+
Open the printed `https://player.moqtail.dev` URL during the catalog discovery
414+
window. The input must be fragmented H.264 CMAF; the codec, dimensions,
415+
bitrate, timescale, and fragment pacing options must describe that file. This
416+
manual workflow is not part of ordinary `mix test`, and local success alone is
417+
not evidence of public relay/player playback.
418+
387419
Managed relay credentials are explicit caller input. The credential value is
388420
wrapped so both its value and the resulting sensitive wire actions have
389421
redacted inspection:

0 commit comments

Comments
 (0)