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:
Diffstat (limited to '71.md')
-rw-r--r--71.md100
1 files changed, 100 insertions, 0 deletions
diff --git a/71.md b/71.md
new file mode 100644
index 0000000..39d6cc8
--- /dev/null
+++ b/71.md
@@ -0,0 +1,100 @@
1NIP-71
2======
3
4Video Events
5---------------
6
7`draft` `optional`
8
9This specification defines video events representing a dedicated post of externally hosted content. These video events are _parameterized replaceable_ and deletable per [NIP-09](09.md). The content of a video event is the stringified JSON of a `kind 1063` File metadata event as described in [NIP-94](94.md).
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.
12
13## Video Events
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).
16
17#### Format
18
19The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos.
20
21The `.content` of these events is the stringified JSON of a `kind 1063` file metadata event.
22
23The list of tags are as follows:
24* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
25* `e` (required, repeated) reference tag to kind 1063 file metadata event being posted, optional relay information for the file metadata event, optional quality value (low|medium|high)
26* `title` (required) title of the video
27* `summary` (optional) summary/description of the video (same as content)
28* `url` (optional) a default link to the video data
29* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
30* `thumb` (optional) url of thumbnail with same aspect ratio
31* `content-warning` (optional) warning about content of NSFW video
32* `t` (optional, repeated) hashtag to categorize video
33* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
34* `r` (optional, repeated) references / links to web pages
35
36```json
37{
38 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
39 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
40 "created_at": <Unix timestamp in seconds>,
41 "kind": 34235 | 34236,
42 "content": "<stringified JSON of kind 1063 event>",
43 "tags": [
44 ["d", "<UUID>"],
45 ["e", "<hex-id>", "<relay-url>", "<optional quality value>"],
46
47 ["title", "<title of video>"],
48 ["summary", "<summary of video>"],
49 ["thumb", "<thumbnail image for video>"],
50
51 // Video Data
52 ["url", "<optional recommended url>"]
53 ["text-track", "<url>", "<text track type>", "<optional language>"],
54 ["content-warning", "<reason>"],
55
56 // Participants
57 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
58 ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
59
60 // Hashtags
61 ["t", "<tag>"],
62 ["t", "<tag>"],
63
64 // Reference links
65 ["r", "<url>"],
66 ["r", "<url>"]
67 ]
68}
69```
70
71## Video View
72
73A video event view is a response to a video event to track a user's view or progress viewing the video.
74
75### Format
76
77The format uses a parameterized replaceable event kind `34237`.
78
79The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
80
81The list of tags are as follows:
82* `a` (required) reference tag to kind `34235` or `34236` video event being viewed
83* `d` (required) same as `a` reference tag value
84* `viewed` (optional, repeated) timestamp of the user's start time in `HH:MM:SS.sss`, timestamp of the user's end time in `HH:MM:SS.sss`
85
86
87```json
88{
89 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
90 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
91 "created_at": <Unix timestamp in seconds>,
92 "kind": 34237,
93 "content": "<note>",
94 "tags": [
95 ["a", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
96 ["d", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>"],
97 ["viewed", <start>, <end>],
98 ]
99}
100```