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:
authorfiatjaf_ <fiatjaf@gmail.com>2025-01-30 23:21:37 -0300
committerGitHub <noreply@github.com>2025-01-30 23:21:37 -0300
commit6a4b125ad771ac9da4a1347a1ed41185e30ad0cf (patch)
treef0944fb005c9b700c0b199a0c02cf936d416c92d /71.md
parentf440eac3dccefa5c0ec9d3964e1d08357fd31e09 (diff)
nip71: make video events regular (#1704)
Diffstat (limited to '71.md')
-rw-r--r--71.md32
1 files changed, 16 insertions, 16 deletions
diff --git a/71.md b/71.md
index 5edd7c6..d3b0925 100644
--- a/71.md
+++ b/71.md
@@ -6,17 +6,19 @@ Video Events
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9This specification defines video events representing a dedicated post of externally hosted content. These video events are _addressable_ and delete-requestable per [NIP-09](09.md). 9This specification defines _video_ events representing a dedicated post of externally hosted content.
10 10
11Unlike a `kind 1` event with a video attached, Video Events are meant to contain all additional metadata concerning the subject media and to be surfaced in video-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Netflix, YouTube, or TikTok like nostr client where the video itself is at the center of the experience. 11Unlike a `kind:1` event with a video attached, video events are meant to contain all additional metadata concerning the subject media and to be surfaced in video-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Netflix, YouTube, or TikTok like nostr client where the video itself is at the center of the experience.
12 12
13## Video Events 13## Video Events
14 14
15There are two types of video events represented by different kinds: horizontal and vertical video events. This is meant to allow clients to cater to each as the viewing experience for horizontal (landscape) videos is often different than that of vertical (portrait) videos (Stories, Reels, Shorts, etc). 15There are two types of video events represented by different kinds: _normal_ and _short_ video events. This is meant to allow clients to cater to each as the viewing experience for longer, mostly horizontal (landscape) videos is often different than that of short-form, mostly vertical (portrait), videos ("stories", "reels", "shorts" etc).
16
17Nothing except cavaliership and common sense prevents a _short_ video from being long, or a _normal_ video from being vertical, and that may or may not be justified, it's mostly a stylistic qualitative difference, not a question of actual raw size.
16 18
17#### Format 19#### Format
18 20
19The format uses an _addressable event_ kind `34235` for horizontal videos and `34236` for vertical videos. 21The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos.
20 22
21The `.content` of these events is a summary or description on the video content. 23The `.content` of these events is a summary or description on the video content.
22 24
@@ -27,7 +29,7 @@ Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m
27Example: 29Example:
28```json 30```json
29[ 31[
30 ["imeta", 32 ["imeta",
31 "dim 1920x1080", 33 "dim 1920x1080",
32 "url https://myvideo.com/1080/12345.mp4", 34 "url https://myvideo.com/1080/12345.mp4",
33 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", 35 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@@ -38,7 +40,7 @@ Example:
38 "fallback https://andanotherserver.com/1080/12345.mp4", 40 "fallback https://andanotherserver.com/1080/12345.mp4",
39 "service nip96", 41 "service nip96",
40 ], 42 ],
41 ["imeta", 43 ["imeta",
42 "dim 1280x720", 44 "dim 1280x720",
43 "url https://myvideo.com/720/12345.mp4", 45 "url https://myvideo.com/720/12345.mp4",
44 "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d", 46 "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
@@ -49,7 +51,7 @@ Example:
49 "fallback https://andanotherserver.com/720/12345.mp4", 51 "fallback https://andanotherserver.com/720/12345.mp4",
50 "service nip96", 52 "service nip96",
51 ], 53 ],
52 ["imeta", 54 ["imeta",
53 "dim 1280x720", 55 "dim 1280x720",
54 "url https://myvideo.com/720/12345.m3u8", 56 "url https://myvideo.com/720/12345.m3u8",
55 "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f", 57 "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
@@ -86,17 +88,15 @@ Additionally `service nip96` may be included to allow clients to search the auth
86 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 88 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
87 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 89 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
88 "created_at": <Unix timestamp in seconds>, 90 "created_at": <Unix timestamp in seconds>,
89 "kind": 34235 | 34236, 91 "kind": 21 | 22,
90 "content": "<summary / description of video>", 92 "content": "<summary / description of video>",
91 "tags": [ 93 "tags": [
92 ["d", "<UUID>"],
93
94 ["title", "<title of video>"], 94 ["title", "<title of video>"],
95 ["published_at", "<unix timestamp>"], 95 ["published_at", "<unix timestamp>"],
96 ["alt", <description>], 96 ["alt", <description>],
97 97
98 // Video Data 98 // video Data
99 ["imeta", 99 ["imeta",
100 "dim 1920x1080", 100 "dim 1920x1080",
101 "url https://myvideo.com/1080/12345.mp4", 101 "url https://myvideo.com/1080/12345.mp4",
102 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", 102 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@@ -113,17 +113,17 @@ Additionally `service nip96` may be included to allow clients to search the auth
113 ["content-warning", "<reason>"], 113 ["content-warning", "<reason>"],
114 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], 114 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
115 115
116 // Participants 116 // participants
117 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], 117 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
118 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], 118 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
119 119
120 // Hashtags 120 // hashtags
121 ["t", "<tag>"], 121 ["t", "<tag>"],
122 ["t", "<tag>"], 122 ["t", "<tag>"],
123 123
124 // Reference links 124 // reference links
125 ["r", "<url>"], 125 ["r", "<url>"],
126 ["r", "<url>"] 126 ["r", "<url>"]
127 ] 127 ]
128} 128}
129``` \ No newline at end of file 129```