nip71: make video events regular.

This commit is contained in:
fiatjaf 2025-01-20 16:24:31 -03:00
parent cc3fbab153
commit b0ab83f04d

28
71.md
View File

@ -6,9 +6,9 @@ Video Events
`draft` `optional` `draft` `optional`
This 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). This specification defines _video_ events representing a dedicated post of externally hosted content.
Unlike 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. Unlike 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.
## Video Events ## Video Events
@ -16,7 +16,7 @@ There are two types of video events represented by different kinds: horizontal a
#### Format #### Format
The format uses an _addressable event_ kind `34235` for horizontal videos and `34236` for vertical videos. The format uses a _regular event_ kind `21` for horizontal videos and `22` for vertical videos.
The `.content` of these events is a summary or description on the video content. The `.content` of these events is a summary or description on the video content.
@ -27,7 +27,7 @@ Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m
Example: Example:
```json ```json
[ [
["imeta", ["imeta",
"dim 1920x1080", "dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4", "url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@ -38,7 +38,7 @@ Example:
"fallback https://andanotherserver.com/1080/12345.mp4", "fallback https://andanotherserver.com/1080/12345.mp4",
"service nip96", "service nip96",
], ],
["imeta", ["imeta",
"dim 1280x720", "dim 1280x720",
"url https://myvideo.com/720/12345.mp4", "url https://myvideo.com/720/12345.mp4",
"x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d", "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
@ -49,7 +49,7 @@ Example:
"fallback https://andanotherserver.com/720/12345.mp4", "fallback https://andanotherserver.com/720/12345.mp4",
"service nip96", "service nip96",
], ],
["imeta", ["imeta",
"dim 1280x720", "dim 1280x720",
"url https://myvideo.com/720/12345.m3u8", "url https://myvideo.com/720/12345.m3u8",
"x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f", "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
@ -86,17 +86,15 @@ Additionally `service nip96` may be included to allow clients to search the auth
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
"created_at": <Unix timestamp in seconds>, "created_at": <Unix timestamp in seconds>,
"kind": 34235 | 34236, "kind": 21 | 22,
"content": "<summary / description of video>", "content": "<summary / description of video>",
"tags": [ "tags": [
["d", "<UUID>"],
["title", "<title of video>"], ["title", "<title of video>"],
["published_at", "<unix timestamp>"], ["published_at", "<unix timestamp>"],
["alt", <description>], ["alt", <description>],
// Video Data // video Data
["imeta", ["imeta",
"dim 1920x1080", "dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4", "url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@ -113,17 +111,17 @@ Additionally `service nip96` may be included to allow clients to search the auth
["content-warning", "<reason>"], ["content-warning", "<reason>"],
["segment", <start>, <end>, "<title>", "<thumbnail URL>"], ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
// Participants // participants
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
// Hashtags // hashtags
["t", "<tag>"], ["t", "<tag>"],
["t", "<tag>"], ["t", "<tag>"],
// Reference links // reference links
["r", "<url>"], ["r", "<url>"],
["r", "<url>"] ["r", "<url>"]
] ]
} }
``` ```