mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
Update 71.md
After discussing with Pablo, we decided to move away from relying on kind 1063 events and instead use the majority of the same tags for video events. The main motivations behind this are to allow for parameterized replaceable events for video events, prevent excessive `REQ` requests, not stringify event JSON in the `.content` section, ease of filtering by kind number, as well as some others. Happy to discuss this further.
This commit is contained in:
parent
c84d40f4a6
commit
d53f6fba15
37
71.md
37
71.md
|
@ -6,7 +6,7 @@ Video Events
|
||||||
|
|
||||||
`draft` `optional`
|
`draft` `optional`
|
||||||
|
|
||||||
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). The content of a video event is the stringified JSON of a `kind 1063` File metadata event as described in [NIP-94](94.md).
|
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).
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
@ -18,17 +18,27 @@ There are two types of video events represented by different kinds: horizontal a
|
||||||
|
|
||||||
The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos.
|
The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos.
|
||||||
|
|
||||||
The `.content` of these events is the stringified JSON of a `kind 1063` file metadata event.
|
The `.content` of these events is a summary or description on the video content.
|
||||||
|
|
||||||
The list of tags are as follows:
|
The list of tags are as follows:
|
||||||
* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
|
* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event.
|
||||||
* `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)
|
* `url` (required) the url to the video file
|
||||||
|
* `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase.
|
||||||
* `title` (required) title of the video
|
* `title` (required) title of the video
|
||||||
* `summary` (optional) summary/description of the video
|
* `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the video was published
|
||||||
* `url` (optional) a default link to the video data
|
* `summary` (optional) summary/description of the video (same as `.content`)
|
||||||
|
* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
|
||||||
|
* `x` containing the SHA-256 hexencoded string of the file.
|
||||||
|
* `size` (optional) size of file in bytes
|
||||||
|
* `dim` (optional) size of file in pixels in the form `<width>x<height>`
|
||||||
|
* `duration` (optional) video duration in seconds
|
||||||
|
* `magnet` (optional) URI to magnet file
|
||||||
|
* `i` (optional) torrent infohash
|
||||||
* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
|
* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
|
||||||
* `thumb` (optional) url of thumbnail with same aspect ratio
|
* `thumb` (optional) url of thumbnail with same aspect ratio
|
||||||
|
* `image` (optional) url of preview image with same dimensions
|
||||||
* `content-warning` (optional) warning about content of NSFW video
|
* `content-warning` (optional) warning about content of NSFW video
|
||||||
|
* `alt` (optional) description for accessibility
|
||||||
* `t` (optional, repeated) hashtag to categorize video
|
* `t` (optional, repeated) hashtag to categorize video
|
||||||
* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
|
* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
|
||||||
* `r` (optional, repeated) references / links to web pages
|
* `r` (optional, repeated) references / links to web pages
|
||||||
|
@ -39,18 +49,27 @@ The list of tags are as follows:
|
||||||
"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": 34235 | 34236,
|
||||||
"content": "<stringified JSON of kind 1063 event>",
|
"content": "<summary / description of video>",
|
||||||
"tags": [
|
"tags": [
|
||||||
["d", "<UUID>"],
|
["d", "<UUID>"],
|
||||||
["e", "<hex-id>", "<relay-url>", "<optional quality value>"],
|
|
||||||
|
|
||||||
["title", "<title of video>"],
|
["title", "<title of video>"],
|
||||||
["summary", "<summary of video>"],
|
["summary", "<summary of video>"],
|
||||||
["thumb", "<thumbnail image for video>"],
|
["thumb", "<thumbnail image for video>"],
|
||||||
|
["published_at", "<unix timestamp>"],
|
||||||
|
["alt", <description>],
|
||||||
|
|
||||||
// Video Data
|
// Video Data
|
||||||
["url", "<optional recommended url>"]
|
["url",<string with URI of file>],
|
||||||
["text-track", "<url>", "<text track type>", "<optional language>"],
|
["m", <MIME type>],
|
||||||
|
["x",<Hash SHA-256>],
|
||||||
|
["aes-256-gcm",<key>, <iv>],
|
||||||
|
["size", <size of file in bytes>],
|
||||||
|
["duration", <duration of video in seconds>],
|
||||||
|
["dim", <size of file in pixels>],
|
||||||
|
["magnet",<magnet URI> ],
|
||||||
|
["i",<torrent infohash>],
|
||||||
|
["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"],
|
||||||
["content-warning", "<reason>"],
|
["content-warning", "<reason>"],
|
||||||
|
|
||||||
// Participants
|
// Participants
|
||||||
|
|
Loading…
Reference in New Issue
Block a user