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.

  1. Enter the namespace and track name
  2. Specify the range (start group/object to end group/object)
  3. Click Fetch
FETCH (sent) → FETCH_OK (received) → objects on fetch stream → stream closes

or:

FETCH (sent) → FETCH_ERROR (received) # draft-14
FETCH (sent) → REQUEST_ERROR (received) # draft-17

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

In draft-14, send FETCH_CANCEL to abort an in-progress fetch. In draft-17, the consolidated request pattern handles cancellation.