Skip to content

Subscribing to Tracks

Terminal window
# Subscribe to a track and stream objects to the terminal
moqtap peek moqt://relay.example.com data live video
# Fetch only the latest object
moqtap 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 output
moqtap peek moqt://relay.example.com data live video -j

The CLI auto-detects the payload format (JSON, fMP4, LOC/MSF binary, text) and renders it accordingly.

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.

ValueNameDrafts 07–08Drafts 09–10Drafts 11+
0x1Next Group StartLatest Group — starts at the beginning of the current groupNot assigned. A receiver rejects itNext Group Start — starts one group later
0x2Largest ObjectStarts from the largest available objectSameSame
0x3AbsoluteStartStarts from an explicit Start Location, open-endedSameSame
0x4AbsoluteRangeExplicit Start Location and an end boundSameSame

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.

DraftsCarried as
07–14Fields directly on SUBSCRIBE: Filter Type, then the Start Location and End Group that type promises
15–18One length-prefixed parameter, type 0x21, named SUBSCRIPTION_FILTER
19The same parameter and the same type number 0x21, renamed LOCATION_FILTER
20Still 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 (0x10x4) 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.

DraftsEnd field
07–16End 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.

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.

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

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.