Subscribing to Tracks
Using the CLI
Section titled “Using the CLI”# Subscribe to a track and stream objects to the terminalmoqtap peek moqt://relay.example.com data live video
# Fetch only the latest objectmoqtap peek moqt://relay.example.com data live video latest
# Raw payload output (for piping to other tools)moqtap peek moqt://relay.example.com data live video --raw
# JSON outputmoqtap peek moqt://relay.example.com data live video -jThe CLI auto-detects the payload format (JSON, fMP4, LOC/MSF binary, text) and renders it accordingly.
Filter types
Section titled “Filter types”A subscription carries a filter saying where in the track it starts, and — for
one of the four types — where it ends. Every draft that has the field assigns
the same four numbers, but neither the meaning of 0x1 nor the place the filter
lives is constant across drafts.
| Value | Name | Drafts 07–08 | Drafts 09–10 | Drafts 11+ |
|---|---|---|---|---|
0x1 | Next Group Start | Latest Group — starts at the beginning of the current group | Not assigned. A receiver rejects it | Next Group Start — starts one group later |
0x2 | Largest Object | Starts from the largest available object | Same | Same |
0x3 | AbsoluteStart | Starts from an explicit Start Location, open-ended | Same | Same |
0x4 | AbsoluteRange | Explicit Start Location and an end bound | Same | Same |
The 0x1 row is the one that bites. A tool reading 0x1 off a draft-07
SUBSCRIBE and calling it “Next Group Start” has the right number and the wrong
meaning — draft-07 starts at the beginning of the group already in progress,
draft-11 starts at the next one. Drafts 09 and 10 withdrew the value entirely,
so a peer that sends it is making a protocol error.
0x3 is an absolute location, not the beginning of the track. Starting at
group 0, object 0 is one particular AbsoluteStart, not what the type means.
Where the filter lives
Section titled “Where the filter lives”| Drafts | Carried as |
|---|---|
| 07–14 | Fields directly on SUBSCRIBE: Filter Type, then the Start Location and End Group that type promises |
| 15–18 | One length-prefixed parameter, type 0x21, named SUBSCRIPTION_FILTER |
| 19 | The same parameter and the same type number 0x21, renamed LOCATION_FILTER |
| 20 | Still LOCATION_FILTER at 0x21, but no Filter Type: the parameter’s byte length determines which of StartGroup, StartObject, EndGroupDelta, EndObject are present |
Draft-15 moved the whole group of fields into a single parameter. Draft-19 kept both the number and the contents and only changed the name, because it introduced a second family of range filters and the older parameter needed to say which kind it was.
Draft-20 then removed the Filter Type enum altogether. The four named types in
the table above (0x1–0x4) apply through draft-19 only. In draft-20 the same
intents are expressed positionally: a length of 0 means no filter; one field is
StartGroup (relative to the Next Group); two are StartGroup and
StartObject; three add EndGroupDelta; four add EndObject. A parser written
against draft-19’s Filter Type will read draft-20’s first optional field as a
type code.
How AbsoluteRange ends
Section titled “How AbsoluteRange ends”| Drafts | End field |
|---|---|
| 07–16 | End Group — the last group ID that passes the filter, written out in full |
| 17+ | End Group Delta — measured from the Start Location’s group |
These spell the same intent differently, and zero means opposite things in the
two forms. A delta of 0 bounds the range to the starting group, so the
remainder of that group passes. An absolute End Group of 0 bounds the range to
group zero — usually a range that excludes its own start.
The subscription lifecycle
Section titled “The subscription lifecycle”SUBSCRIBE (sent) → SUBSCRIBE_OK (received) → objects flow → UNSUBSCRIBE (sent) → PUBLISH_DONE (received)In draft-17, UNSUBSCRIBE is removed — the subscription lifecycle uses the consolidated request/response pattern with REQUEST_OK / REQUEST_ERROR.
moqtap prints each state transition with a timestamp.
Viewing objects
Section titled “Viewing objects”Objects arrive on unidirectional QUIC streams (subgroup streams) or datagrams. Each object shows:
- Group ID and Object ID
- Subgroup assignment
- Publisher priority and status
- Payload — auto-detected as text, JSON, fMP4, or binary
Using the browser extension
Section titled “Using the browser extension”The extension passively decodes subscription messages and object delivery from your application’s WebTransport connections. The DevTools panel shows subscriptions with namespace/track name display, live bitrate, and a stream data viewer with hex and JSON modes.