diff options
| author | zmeyer44 <54515037+zmeyer44@users.noreply.github.com> | 2023-12-07 20:09:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-07 20:09:08 -0500 |
| commit | 7646386956927cea8be78747b1dda4fead8b1f32 (patch) | |
| tree | a6b4edbd83d0a779bc82253537141a2e23c5a735 | |
| parent | ef106ecccad2f764f80cae85f2bc666a419f9e20 (diff) | |
Create NIP 44 for Video Events
Nip for video events to enable dedicated video clients (e.g. Netflix, YouTube) to be built on nostr.
| -rw-r--r-- | 44.md | 98 |
1 files changed, 98 insertions, 0 deletions
| @@ -0,0 +1,98 @@ | |||
| 1 | NIP-44 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Video Events | ||
| 5 | --------------- | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This 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). | ||
| 10 | |||
| 11 | Unlike a `kind 1` event with a video attached, Video Events are meant to contain all necessary metadata concerning the media and to be surfaced in media specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a YouTube like nostr client where the video itself is at the center of the experience. | ||
| 12 | |||
| 13 | ## Video Events | ||
| 14 | |||
| 15 | #### Format | ||
| 16 | |||
| 17 | The format uses a parameterized replaceable event kind `34235`. | ||
| 18 | |||
| 19 | The `.content` of these events is optional and should be a summary of the video's contents. | ||
| 20 | |||
| 21 | The list of tags are as follows: | ||
| 22 | * `d` (required) universally unique identifier (UUID). Generated by the client creating the video event. | ||
| 23 | * `title` (required) title of the video | ||
| 24 | * `src` (required) a link to the video data | ||
| 25 | * `m` (optional) the MIME type of the video data in the `src` tag | ||
| 26 | * `summary` (optional) summary/description of the video (same as content) | ||
| 27 | * `image` (optional) thumbnail or preview image for the video | ||
| 28 | * `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code | ||
| 29 | * `content-warning` (optional) warning about content of NSFW video | ||
| 30 | * `t` (optional, repeated) hashtag to categorize video | ||
| 31 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL | ||
| 32 | * `r` (optional, repeated) references / links to web pages. | ||
| 33 | |||
| 34 | ```json | ||
| 35 | { | ||
| 36 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| 37 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| 38 | "created_at": <Unix timestamp in seconds>, | ||
| 39 | "kind": 34235, | ||
| 40 | "content": "<summary of video>", | ||
| 41 | "tags": [ | ||
| 42 | ["d", "<UUID>"], | ||
| 43 | |||
| 44 | ["title", "<title of video>"], | ||
| 45 | ["summary", "<summary of video>"], | ||
| 46 | ["image", "<thumbnail image for video>"], | ||
| 47 | |||
| 48 | // Video Data | ||
| 49 | ["src", "<url>"], | ||
| 50 | ["m", "<MIME type>"], | ||
| 51 | ["text-track", "<url>", "<text track type>", "<optional language>"], | ||
| 52 | ["content-warning", "<reason>"], | ||
| 53 | |||
| 54 | // Participants | ||
| 55 | ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], | ||
| 56 | ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], | ||
| 57 | |||
| 58 | // Hashtags | ||
| 59 | ["t", "<tag>"], | ||
| 60 | ["t", "<tag>"], | ||
| 61 | |||
| 62 | // Reference links | ||
| 63 | ["r", "<url>"], | ||
| 64 | ["r", "<url>"] | ||
| 65 | ] | ||
| 66 | } | ||
| 67 | ``` | ||
| 68 | |||
| 69 | ## Video View | ||
| 70 | |||
| 71 | A video event view is a response to a video event to track a user's view or progress viewing the video. | ||
| 72 | |||
| 73 | ### Format | ||
| 74 | |||
| 75 | The format uses a parameterized replaceable event kind `34236`. | ||
| 76 | |||
| 77 | The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user. | ||
| 78 | |||
| 79 | The list of tags are as follows: | ||
| 80 | * `a` (required) reference tag to kind `34235` video event being viewed | ||
| 81 | * `d` (required) universally unique identifier. Generated by the client creating the video event view | ||
| 82 | * `progress` (optional) timestamp of the user's progress in format `HH:MM:SS.sss` | ||
| 83 | |||
| 84 | |||
| 85 | ```json | ||
| 86 | { | ||
| 87 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| 88 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| 89 | "created_at": <Unix timestamp in seconds>, | ||
| 90 | "kind": 34236, | ||
| 91 | "content": "<note>", | ||
| 92 | "tags": [ | ||
| 93 | ["a", "<34235>:<calendar event author pubkey>:<d-identifier of video event>", "<optional relay url>"], | ||
| 94 | ["d", "<UUID>"], | ||
| 95 | ["progress", "00:08:31.520"], | ||
| 96 | ] | ||
| 97 | } | ||
| 98 | ``` | ||