Skip to content

Commit 7ed7ddd

Browse files
authored
moq-lite and hang. (#6)
1 parent 6cd41da commit 7ed7ddd

7 files changed

Lines changed: 738 additions & 693 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Automatically generated CODEOWNERS
22
# Regenerate with `make update-codeowners`
3-
draft-lcurley-moq-transfork.md kixelated@gmail.com
3+
draft-lcurley-moq-lite.md kixelated@gmail.com
44
draft-lcurley-moq-use-cases.md kixelated@gmail.com

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/versioned/
1919
Gemfile.lock
2020
archive.json
21-
draft-lcurley-moq-transfork.xml
21+
draft-lcurley-moq-lite.xml
2222
draft-lcurley-moq-use-cases.xml
2323
package-lock.json
2424
report.xml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
This is the working area for individual Internet-Drafts.
44

5-
## Media over QUIC - Transfork
5+
## Media over QUIC - Lite
66

7-
* [Editor's Copy](https://kixelated.github.io/moq-drafts/#go.draft-lcurley-moq-transfork.html)
8-
* [Datatracker Page](https://datatracker.ietf.org/doc/draft-lcurley-moq-transfork)
9-
* [Individual Draft](https://datatracker.ietf.org/doc/html/draft-lcurley-moq-transfork)
10-
* [Compare Editor's Copy to Individual Draft](https://kixelated.github.io/moq-drafts/#go.draft-lcurley-moq-transfork.diff)
7+
* [Editor's Copy](https://kixelated.github.io/moq-drafts/#go.draft-lcurley-moq-lite.html)
8+
* [Datatracker Page](https://datatracker.ietf.org/doc/draft-lcurley-moq-lite)
9+
* [Individual Draft](https://datatracker.ietf.org/doc/html/draft-lcurley-moq-lite)
10+
* [Compare Editor's Copy to Individual Draft](https://kixelated.github.io/moq-drafts/#go.draft-lcurley-moq-lite.diff)
1111

1212
## Media over QUIC - Use Cases
1313

draft-lcurley-moq-hang.md

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
---
2+
title: "Media over QUIC - Hang"
3+
abbrev: "hang"
4+
category: info
5+
6+
docname: draft-lcurley-moq-hang-latest
7+
submissiontype: IETF # also: "independent", "editorial", "IAB", or "IRTF"
8+
number:
9+
date:
10+
v: 3
11+
area: wit
12+
workgroup: moq
13+
14+
author:
15+
-
16+
fullname: Luke Curley
17+
email: kixelated@gmail.com
18+
19+
normative:
20+
moql: I-D.lcurley-moq-lite
21+
moqt: I-D.ietf-moq-transport
22+
webcodecs: WebCodecs
23+
24+
informative:
25+
26+
--- abstract
27+
28+
Hang is a real-time conferencing protocol built on top of moq-lite.
29+
A room consists of multiple participants who publish media tracks.
30+
All updates are live, such as a change in participants or media tracks.
31+
32+
--- middle
33+
34+
# Conventions and Definitions
35+
{::boilerplate bcp14-tagged}
36+
37+
38+
# Terminology
39+
Hang is built on top of moq-lite [moql] and uses much of the same terminology.
40+
A quick recap:
41+
42+
- **Broadcast**: A collection of Tracks from a single publisher.
43+
- **Track**: An series of Groups, each of which can be delivered and decoded *out-of-order*.
44+
- **Group**: An series of Frames, each of which must be delivered and decoded *in-order*.
45+
- **Frame**: A sized payload of bytes representing a single moment in time.
46+
47+
Hang introduces additional terminology:
48+
49+
- **Room**: A collection of participants, publishing under a common prefix.
50+
- **Participant**: A moq-lite broadcaster that may produce any number of media tracks.
51+
- **Catalog**: A JSON document that describes each available media track, supporting live updates.
52+
- **Container**: A tiny header in front of each media payload containing the timestamp.
53+
54+
55+
# Discovery
56+
The first requirement for a real-time conferencing application is to discover other participants in the same room.
57+
Hang does this using moq-lite's ANNOUNCE capabilities.
58+
59+
A room consists of a path.
60+
Any participants within the room MUST publish a broadcast with the room path as a prefix and it SHOULD end with the `.hang` suffix.
61+
62+
For example:
63+
64+
~~~
65+
/room/alice.hang
66+
/room/bob.hang
67+
/other/zoe.hang
68+
~~~
69+
70+
A participant issues an ANNOUNCE_PLEASE message to discover any other participants in the same room.
71+
The server (relay) will then respond with an ANNOUNCE message for any matching broadcasts, including their own.
72+
73+
For example:
74+
75+
~~~
76+
ANNOUNCE_PLEASE prefix=/room/
77+
ANNOUNCE suffix=alice.hang active=true
78+
ANNOUNCE suffix=bob.hang active=true
79+
~~~
80+
81+
If a publisher no longer wants to participant, or is disconnected somehow, their presence will be unannounced.
82+
Publishers and subscribers SHOULD terminate any subscriptions once a participant is unannounced.
83+
84+
~~~
85+
ANNOUNCE suffix=alice.hang active=false
86+
~~~
87+
88+
# Catalog
89+
The catalog describes the available media tracks for a single participant.
90+
It's a JSON document that extends the the W3C WebCodecs specification.
91+
92+
The catalog is published as a `catalog.json` track within the broadcast so it can be updated live as the participant's media tracks change.
93+
A participant MAY forgo publishing a catalog if it does not wish to publish any media tracks now and in the future.
94+
95+
The catalog track consists of multiple groups, one for each update.
96+
Each group contains a single frame with UTF-8 JSON.
97+
A publisher MUST NOT write multiple frames to a group until a future specification includes a delta-encoding mechanism.
98+
99+
## Root
100+
The root of the catalog is a JSON document with the following schema:
101+
102+
~~~
103+
type Catalog = {
104+
"audio": AudioTrack[],
105+
"video": VideoTrack[],
106+
}
107+
~~~
108+
109+
When there are multiple audio or video tracks, they SHOULD describe the same content.
110+
For example, different resolutions, codecs, bitrates, etc.
111+
If a participant wants to publish unrelated content, for example sharing the screen in addition to a webcam, it SHOULD publish a separate broadcast (and catalog).
112+
113+
Additional fields MAY be added based on the application.
114+
The catalog SHOULD be mostly static, delegating any dynamic content to other tracks.
115+
Additionally, a catalog SHOULD describe optional content, allowing the client to decide if it wants to subscribe.
116+
117+
For example, a `"chat"` field should include the name of a chat track, not individual chat messages.
118+
This way catalog updates are rare and a client MAY choose to not subscribe.
119+
120+
121+
## Video
122+
A video track contains the necessary information to decode a video stream.
123+
124+
Hang uses the [VideoDecoderConfig](https://www.w3.org/TR/webcodecs/#video-decoder-config).
125+
This contains all of the information needed to configure a video decoder.
126+
127+
The `track` field includes the name and priority of the track within the broadcast.
128+
129+
~~~
130+
type VideoTrack = {
131+
"track": {
132+
"name": string,
133+
"priority": number,
134+
},
135+
"config": VideoDecoderConfig,
136+
}
137+
~~~
138+
139+
For example:
140+
141+
~~~
142+
{
143+
"track": {
144+
"name": "video",
145+
"priority": 2
146+
},
147+
"config": {
148+
"codec": "avc1.64001f",
149+
"dimensions": {
150+
"width": 1280,
151+
"height": 720
152+
},
153+
"bitrate": 6000000,
154+
"framerate": 30.0
155+
}
156+
}
157+
~~~
158+
159+
160+
## Audio
161+
An audio track contains the necessary information to decode an audio stream.
162+
163+
The `track` field includes the name and priority of the track within the broadcast.
164+
165+
The `config` field contains an [AudioDecoderConfig](https://www.w3.org/TR/webcodecs/#audio-decoder-config).
166+
This contains all of the information needed to configure an audio decoder.
167+
168+
~~~
169+
type AudioTrack = {
170+
"track": {
171+
"name": string,
172+
"priority": number,
173+
},
174+
"config": AudioDecoderConfig,
175+
}
176+
~~~
177+
178+
For example:
179+
180+
~~~
181+
{
182+
"track": {
183+
"name": "audio",
184+
"priority": 1
185+
},
186+
"config": {
187+
"codec": "opus",
188+
"sampleRate": 48000,
189+
"numberOfChannels": 2,
190+
"bitrate": 128000
191+
}
192+
}
193+
~~~
194+
195+
# Media
196+
Media tracks are split into groups and further into frames.
197+
198+
A group consists of one or more frames in decode order.
199+
Each group MUST start with a keyframe.
200+
If a codec supports delta frames (video), then all subsequent frames MUST be delta frames.
201+
Otherwise, a group MAY consist of multiple keyframes (audio).
202+
203+
Each "frame" consists of a tiny "container" containing the timestamp and codec specific payload.
204+
The timestamp is the presentation timestamp in microseconds encoded as a QUIC variable-length integer (62-bit max).
205+
The remainder of the frame payload is codec specific.
206+
207+
# Security Considerations
208+
TODO Security
209+
210+
211+
# IANA Considerations
212+
213+
This document has no IANA actions.
214+
215+
216+
--- back
217+
218+
# Acknowledgments
219+
{:numbered="false"}
220+
221+
TODO acknowledge.

0 commit comments

Comments
 (0)