moqsub is a learning-focused Go CLI for subscribing to Media over QUIC (MoQT) tracks over raw QUIC, with protocol-level visibility.
- Hand-rolled draft-16 and draft-18 subscriber behavior over
quic-go. - Rich protocol debugging across setup, request, and data channels.
- Pipe received object payloads to stdout, ffmpeg, or ffplay.
- Subscriber-only scope: no publisher and no relay implementation.
Implemented:
- Raw QUIC session dialing that negotiates ALPN between
moqt-18andmoqt-16(or pins one via--alpn), selecting the matching draft's wire format and session model. - draft-18: client
SETUPon its own control stream + peer control stream parsing; eachSUBSCRIBEon a fresh request stream withSUBSCRIBE_OK/REQUEST_ERRORreplies implied by that stream. - draft-16:
CLIENT_SETUP/SERVER_SETUPand everySUBSCRIBE/SUBSCRIBE_OK/REQUEST_ERROR/GOAWAYmultiplexed on one shared control stream, correlated by explicit Request ID. - Incoming unidirectional stream dispatch, including subgroup data stream parsing (
SUBGROUP_HEADER+ subgroup object fields). - Object payload forwarding to configured output sink.
- Runtime summary counters (bytes, objects, groups, gap hints, resets, first-object latency).
- Explorable rich HTML session log with spec links that follow whichever draft was negotiated.
Not implemented yet:
- WebTransport.
- Fetch and datagram object handling.
- Draft compatibility shims for drafts other than -16/-18 (e.g. draft-14).
- Publishing functionality.
go build ./cmd/moqsubBasic run (stdout payload):
./moqsub \
--relay moqt://localhost:4443 \
--namespace anon/bbb \
--output stdoutPipe payload to ffplay:
./moqsub \
--relay moqt://localhost:4443 \
--namespace anon/bbb \
--output ffplay--relay:moqt://URI for raw QUIC relay endpoint.--namespace: Slash-delimited track namespace fields.--alpn: Pin a specific ALPN protocol (moqt-18ormoqt-16). If unset, both are offered and the server's choice determines which draft's wire format is used.--insecure: Skip TLS cert verification (local/testing only).--output:stdout|ffmpeg|ffplay|command.--ffmpeg-cmd: Command for--output=ffmpeg.--ffplay-cmd: Command for--output=ffplay.--pipe-cmd: Command for--output=command.--log-format:text|json.--rich-log: Write an explorable single-file HTML log of every MoQ message exchanged (with field breakdowns, explanations, and spec links) to the given path.