Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nip71: make video events regular #1704

Merged
merged 5 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 51.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Aside from their main identifier, the `"d"` tag, sets can optionally have a `"ti
| Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) |
| Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r"` (URLs) |
| Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) |
| Curation sets | 30005 | groups of videos picked by users as interesting and/or belonging to the same category | `"a"` (kind:34235 videos) |
| Curation sets | 30005 | groups of videos picked by users as interesting and/or belonging to the same category | `"a"` (kind:21 videos) |
| Kind mute sets | 30007 | mute pubkeys by kinds<br>`"d"` tag MUST be the kind string | `"p"` (pubkeys) |
| Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) |
| Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) |
Expand Down
6 changes: 3 additions & 3 deletions 68.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The idea is for this type of event to cater to Nostr clients resembling platform

## Picture Events

Picture events contain a `title` tag and description in the `.content`.
Picture events contain a `title` tag and description in the `.content`.

They may contain multiple images to be displayed as a single post.

Expand Down Expand Up @@ -81,12 +81,12 @@ They may contain multiple images to be displayed as a single post.

The `imeta` tag `annotate-user` places a user link in the specific position in the image.

Only the following media types are accepted:
Only the following media types are accepted:
- `image/apng`: Animated Portable Network Graphics (APNG)
- `image/avif`: AV1 Image File Format (AVIF)
- `image/gif`: Graphics Interchange Format (GIF)
- `image/jpeg`: Joint Photographic Expert Group image (JPEG)
- `image/png`: Portable Network Graphics (PNG)
- `image/webp`: Web Picture format (WEBP)

Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed.
Picture events might be used with [NIP-71](71.md)'s kind `22` to display short vertical videos in the same feed.
32 changes: 16 additions & 16 deletions 71.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ Video Events

`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

There 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).
There 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).

Nothing 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.

#### 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 _normal_ videos and `22` for _short_ videos.

The `.content` of these events is a summary or description on the video content.

Expand All @@ -27,7 +29,7 @@ Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m
Example:
```json
[
["imeta",
["imeta",
"dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
Expand All @@ -38,7 +40,7 @@ Example:
"fallback https://andanotherserver.com/1080/12345.mp4",
"service nip96",
],
["imeta",
["imeta",
"dim 1280x720",
"url https://myvideo.com/720/12345.mp4",
"x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
Expand All @@ -49,7 +51,7 @@ Example:
"fallback https://andanotherserver.com/720/12345.mp4",
"service nip96",
],
["imeta",
["imeta",
"dim 1280x720",
"url https://myvideo.com/720/12345.m3u8",
"x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
Expand Down Expand Up @@ -86,17 +88,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>,
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
"created_at": <Unix timestamp in seconds>,
"kind": 34235 | 34236,
"kind": 21 | 22,
"content": "<summary / description of video>",
"tags": [
["d", "<UUID>"],

["title", "<title of video>"],
["published_at", "<unix timestamp>"],
["alt", <description>],

// Video Data
["imeta",
// video Data
["imeta",
"dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
Expand All @@ -113,17 +113,17 @@ Additionally `service nip96` may be included to allow clients to search the auth
["content-warning", "<reason>"],
["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>"],

// Hashtags
// hashtags
["t", "<tag>"],
["t", "<tag>"],

// Reference links
// reference links
["r", "<url>"],
["r", "<url>"]
]
}
```
```
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `16` | Generic Repost | [18](18.md) |
| `17` | Reaction to a website | [25](25.md) |
| `20` | Picture | [68](68.md) |
| `21` | Video Event | [71](71.md) |
| `22` | Short-form Portrait Video Event | [71](71.md) |
| `40` | Channel Creation | [28](28.md) |
| `41` | Channel Metadata | [28](28.md) |
| `42` | Channel Message | [28](28.md) |
Expand Down Expand Up @@ -227,10 +229,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `31924` | Calendar | [52](52.md) |
| `31925` | Calendar Event RSVP | [52](52.md) |
| `31989` | Handler recommendation | [89](89.md) |
| `31990` | Handler information | [89](89.md) |
| `32267` | Software Application | |
| `34235` | Video Event | [71](71.md) |
| `34236` | Short-form Portrait Video Event | [71](71.md) |
| `31990` | Handler information | [89](89.md) | |
| `32267` | Software Application | | |
| `34550` | Community Definition | [72](72.md) |
| `37375` | Cashu Wallet Event | [60](60.md) |
| `38383` | Peer-to-peer Order events | [69](69.md) |
Expand Down