upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/71.md
diff options
context:
space:
mode:
authorrabble <evan@protest.net>2025-09-26 12:18:01 +1200
committerrabble <evan@protest.net>2025-09-26 12:18:01 +1200
commit114271a5066d4d5dcc02ae3f72aee6e666109938 (patch)
tree7f0b02a751510969c13602813c3d39824aa8f28c /71.md
parent93f95c2156ab8317b752823bdac2a14556149cb9 (diff)
NIP-71: Add addressable video events (kinds 32221, 32222)
Extends NIP-71 to support addressable video events for content that may need updates after publication. This enables: - Metadata corrections without republishing - URL migration when hosting changes - Preservation of imported content IDs from legacy platforms - Platform migration tracking Adds kinds 32221 (normal videos) and 32222 (short videos) with required 'd' tag for unique identification and optional 'origin' tag for tracking imported content.
Diffstat (limited to '71.md')
-rw-r--r--71.md73
1 files changed, 73 insertions, 0 deletions
diff --git a/71.md b/71.md
index d3b0925..2097c7e 100644
--- a/71.md
+++ b/71.md
@@ -20,6 +20,20 @@ Nothing except cavaliership and common sense prevents a _short_ video from being
20 20
21The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos. 21The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos.
22 22
23## Addressable Video Events
24
25For content that may need updates after publication (such as correcting metadata, descriptions, or handling URL migrations), addressable versions are available:
26
27- Kind `32221` for _addressable normal videos_
28- Kind `32222` for _addressable short videos_
29
30These addressable events follow the same format as their regular counterparts but include a `d` tag as a unique identifier and can be updated while maintaining the same addressable reference. This is particularly useful for:
31
32- Metadata corrections (descriptions, titles, tags) without republishing
33- Preservation of imported content IDs from legacy platforms
34- URL migration when hosting changes
35- Platform migration tracking
36
23The `.content` of these events is a summary or description on the video content. 37The `.content` of these events is a summary or description on the video content.
24 38
25The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md) 39The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md)
@@ -71,6 +85,9 @@ The `image` tag contains a preview image (at the same resolution). Multiple `ima
71 85
72Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash. 86Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash.
73 87
88### Required tags for addressable events:
89* `d` - Unique identifier for this video (user-chosen string, required for kinds 32221, 32222)
90
74### Other tags: 91### Other tags:
75* `title` (required) title of the video 92* `title` (required) title of the video
76* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published 93* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
@@ -83,6 +100,9 @@ Additionally `service nip96` may be included to allow clients to search the auth
83* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL 100* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
84* `r` (optional, repeated) references / links to web pages 101* `r` (optional, repeated) references / links to web pages
85 102
103### Optional tags for imported content:
104* `origin` - Track original platform and ID: `["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"]`
105
86```jsonc 106```jsonc
87{ 107{
88 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 108 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
@@ -127,3 +147,56 @@ Additionally `service nip96` may be included to allow clients to search the auth
127 ] 147 ]
128} 148}
129``` 149```
150
151## Addressable Event Example
152
153```jsonc
154{
155 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
156 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
157 "created_at": <Unix timestamp in seconds>,
158 "kind": 32221 | 32222,
159 "content": "<summary / description of video>",
160 "tags": [
161 ["d", "<unique-identifier>"],
162 ["title", "<title of video>"],
163 ["published_at", "<unix timestamp>"],
164 ["alt", "<description for accessibility>"],
165
166 // video data
167 ["imeta",
168 "url https://example.com/media.mp4",
169 "m video/mp4",
170 "dim 480x480",
171 "blurhash eVF$^OI:${M{%LRjWBoLoLaeR*",
172 "image https://example.com/thumb.jpg",
173 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc"
174 ],
175
176 ["duration", <duration in seconds>],
177 ["content-warning", "<reason>"],
178
179 // origin tracking for imported content
180 ["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"],
181
182 // participants
183 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
184
185 // hashtags
186 ["t", "<tag>"],
187 ["t", "<tag>"],
188
189 // reference links
190 ["r", "<url>"]
191 ]
192}
193```
194
195## Referencing Addressable Events
196
197To reference an addressable video:
198
199```
200["a", "32221:<pubkey>:<d-tag-value>", "<relay-url>"] // for normal videos
201["a", "32222:<pubkey>:<d-tag-value>", "<relay-url>"] // for short videos
202```