Skip to content

Fetching Data

FETCH retrieves historical objects from a track. Unlike SUBSCRIBE (which is a live stream), FETCH returns a bounded set of objects.

Terminal window
# Fetch data from a track (latest group)
moqtap peek moqt://relay.example.com data live video
# Fetch only the latest object
moqtap peek moqt://relay.example.com data live video latest
# JSON output
moqtap peek moqt://relay.example.com data live video -j
# Raw payload (pipe to file or another tool)
moqtap peek moqt://relay.example.com data live video --raw > output.bin

The peek data command reads the catalog track to understand available content, then subscribes or fetches sample data with auto-detected payload format.

FETCH (sent) → OK (received) → objects on fetch stream → stream closes
FETCH (sent) → error (received)
DraftsSuccessErrorTo cancel
07–14FETCH_OKFETCH_ERRORFETCH_CANCEL
15–16FETCH_OKREQUEST_ERRORFETCH_CANCEL
17–22FETCH_OKREQUEST_ERRORClose the FETCH’s request stream
23REQUEST_OKREQUEST_ERRORClose the FETCH’s request stream

In draft-23 a FETCH whose Location Filter is relative is rejected with INVALID_RANGE; give it an absolute range.

Fetched objects arrive on a dedicated unidirectional stream (fetch stream type 0x05 in drafts 07–23). moqtap displays them in order with their group/object IDs and payload content.