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:
authorAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
committerAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
commit5e1e24766910fc07cb61a049aed2623987458ec2 (patch)
treeb7588f61fddf9374268d5cd6f4e3f2655d7c840a /71.md
parentb8782df594b4e7e8f088869134908eed58be6078 (diff)
parent3465f540e3eaedccb5309711b502f0febf56b52f (diff)
Merge nip44-big-payloads into bigger-nip44bigger-nip44
Diffstat (limited to '71.md')
-rw-r--r--71.md91
1 files changed, 86 insertions, 5 deletions
diff --git a/71.md b/71.md
index d3b0925..0124edd 100644
--- a/71.md
+++ b/71.md
@@ -20,12 +20,31 @@ 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 `34235` for _addressable normal videos_
28- Kind `34236` 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)
26 40
27Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties. 41Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties.
28 42
43This NIP defines the following additional `imeta` properties aside from those listed in [NIP-92](92.md) & [NIP-94](94.md):
44
45* `duration` (recommended) the duration of the video/audio in seconds (floating point number)
46* `bitrate` (recommended) the average bitrate of the video/audio in bits/sec
47
29Example: 48Example:
30```json 49```json
31[ 50[
@@ -39,6 +58,8 @@ Example:
39 "fallback https://myotherserver.com/1080/12345.mp4", 58 "fallback https://myotherserver.com/1080/12345.mp4",
40 "fallback https://andanotherserver.com/1080/12345.mp4", 59 "fallback https://andanotherserver.com/1080/12345.mp4",
41 "service nip96", 60 "service nip96",
61 "bitrate 3000000",
62 "duration 29.223"
42 ], 63 ],
43 ["imeta", 64 ["imeta",
44 "dim 1280x720", 65 "dim 1280x720",
@@ -50,6 +71,8 @@ Example:
50 "fallback https://myotherserver.com/720/12345.mp4", 71 "fallback https://myotherserver.com/720/12345.mp4",
51 "fallback https://andanotherserver.com/720/12345.mp4", 72 "fallback https://andanotherserver.com/720/12345.mp4",
52 "service nip96", 73 "service nip96",
74 "bitrate 2000000",
75 "duration 29.24"
53 ], 76 ],
54 ["imeta", 77 ["imeta",
55 "dim 1280x720", 78 "dim 1280x720",
@@ -61,6 +84,7 @@ Example:
61 "fallback https://myotherserver.com/720/12345.m3u8", 84 "fallback https://myotherserver.com/720/12345.m3u8",
62 "fallback https://andanotherserver.com/720/12345.m3u8", 85 "fallback https://andanotherserver.com/720/12345.m3u8",
63 "service nip96", 86 "service nip96",
87 "duration 29.21"
64 ], 88 ],
65] 89]
66``` 90```
@@ -71,10 +95,12 @@ The `image` tag contains a preview image (at the same resolution). Multiple `ima
71 95
72Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash. 96Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash.
73 97
98### Required tags for addressable events:
99* `d` - Unique identifier for this video (user-chosen string, required for kinds 34235, 34236)
100
74### Other tags: 101### Other tags:
75* `title` (required) title of the video 102* `title` (required) title of the video
76* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published 103* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
77* `duration` (optional) video duration in seconds
78* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code 104* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
79* `content-warning` (optional) warning about content of NSFW video 105* `content-warning` (optional) warning about content of NSFW video
80* `alt` (optional) description for accessibility 106* `alt` (optional) description for accessibility
@@ -83,17 +109,20 @@ 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 109* `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 110* `r` (optional, repeated) references / links to web pages
85 111
112### Optional tags for imported content:
113* `origin` - Track original platform and ID: `["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"]`
114
86```jsonc 115```jsonc
87{ 116{
88 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 117 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
89 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 118 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
90 "created_at": <Unix timestamp in seconds>, 119 "created_at": <Unix timestamp in seconds>,
91 "kind": 21 | 22, 120 "kind": 21 | 22,
92 "content": "<summary / description of video>", 121 "content": "<summary / description of video>",
93 "tags": [ 122 "tags": [
94 ["title", "<title of video>"], 123 ["title", "<title of video>"],
95 ["published_at", "<unix timestamp>"], 124 ["published_at", "<unix timestamp>"],
96 ["alt", <description>], 125 ["alt", "<description>"],
97 126
98 // video Data 127 // video Data
99 ["imeta", 128 ["imeta",
@@ -108,7 +137,6 @@ Additionally `service nip96` may be included to allow clients to search the auth
108 "service nip96", 137 "service nip96",
109 ], 138 ],
110 139
111 ["duration", <duration of video in seconds>],
112 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], 140 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"],
113 ["content-warning", "<reason>"], 141 ["content-warning", "<reason>"],
114 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], 142 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
@@ -127,3 +155,56 @@ Additionally `service nip96` may be included to allow clients to search the auth
127 ] 155 ]
128} 156}
129``` 157```
158
159## Addressable Event Example
160
161```jsonc
162{
163 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
164 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
165 "created_at": <Unix timestamp in seconds>,
166 "kind": 34235 | 34236,
167 "content": "<summary / description of video>",
168 "tags": [
169 ["d", "<unique-identifier>"],
170 ["title", "<title of video>"],
171 ["published_at", "<unix timestamp>"],
172 ["alt", "<description for accessibility>"],
173
174 // video data
175 ["imeta",
176 "url https://example.com/media.mp4",
177 "m video/mp4",
178 "dim 480x480",
179 "blurhash eVF$^OI:${M{%LRjWBoLoLaeR*",
180 "image https://example.com/thumb.jpg",
181 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc"
182 ],
183
184 ["duration", <duration in seconds>],
185 ["content-warning", "<reason>"],
186
187 // origin tracking for imported content
188 ["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"],
189
190 // participants
191 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
192
193 // hashtags
194 ["t", "<tag>"],
195 ["t", "<tag>"],
196
197 // reference links
198 ["r", "<url>"]
199 ]
200}
201```
202
203## Referencing Addressable Events
204
205To reference an addressable video:
206
207```
208["a", "34235:<pubkey>:<d-tag-value>", "<relay-url>"] // for normal videos
209["a", "34236:<pubkey>:<d-tag-value>", "<relay-url>"] // for short videos
210```