NIP-71: Add addressable video events (kinds 34235, 34236) (#2072)

Co-authored-by: hodlbod <jstaab@protonmail.com>
This commit is contained in:
rabble
2026-01-08 05:48:48 +13:00
committed by GitHub
parent d7db75fc69
commit f34e98c73f
2 changed files with 75 additions and 0 deletions

73
71.md
View File

@@ -20,6 +20,20 @@ Nothing except cavaliership and common sense prevents a _short_ video from being
The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos. The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos.
## Addressable Video Events
For content that may need updates after publication (such as correcting metadata, descriptions, or handling URL migrations), addressable versions are available:
- Kind `34235` for _addressable normal videos_
- Kind `34236` for _addressable short videos_
These addressable events follow the same format as their regular counterparts but include a `d` tag as a unique identifier and can be updated while maintaining the same addressable reference. This is particularly useful for:
- Metadata corrections (descriptions, titles, tags) without republishing
- Preservation of imported content IDs from legacy platforms
- URL migration when hosting changes
- Platform migration tracking
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.
The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md) The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md)
@@ -81,6 +95,9 @@ The `image` tag contains a preview image (at the same resolution). Multiple `ima
Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash. Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash.
### Required tags for addressable events:
* `d` - Unique identifier for this video (user-chosen string, required for kinds 34235, 34236)
### Other tags: ### Other tags:
* `title` (required) title of the video * `title` (required) title of the video
* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published * `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
@@ -92,6 +109,9 @@ Additionally `service nip96` may be included to allow clients to search the auth
* `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
### Optional tags for imported content:
* `origin` - Track original platform and ID: `["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"]`
```jsonc ```jsonc
{ {
"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>",
@@ -135,3 +155,56 @@ Additionally `service nip96` may be included to allow clients to search the auth
] ]
} }
``` ```
## Addressable Event Example
```jsonc
{
"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,
"content": "<summary / description of video>",
"tags": [
["d", "<unique-identifier>"],
["title", "<title of video>"],
["published_at", "<unix timestamp>"],
["alt", "<description for accessibility>"],
// video data
["imeta",
"url https://example.com/media.mp4",
"m video/mp4",
"dim 480x480",
"blurhash eVF$^OI:${M{%LRjWBoLoLaeR*",
"image https://example.com/thumb.jpg",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc"
],
["duration", <duration in seconds>],
["content-warning", "<reason>"],
// origin tracking for imported content
["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"],
// participants
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
// hashtags
["t", "<tag>"],
["t", "<tag>"],
// reference links
["r", "<url>"]
]
}
```
## Referencing Addressable Events
To reference an addressable video:
```
["a", "34235:<pubkey>:<d-tag-value>", "<relay-url>"] // for normal videos
["a", "34236:<pubkey>:<d-tag-value>", "<relay-url>"] // for short videos
```

View File

@@ -279,6 +279,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `32267` | Software Application | | | `32267` | Software Application | |
| `32388` | User Room Favorites | [Corny Chat][cornychat-roomfavorites] | | `32388` | User Room Favorites | [Corny Chat][cornychat-roomfavorites] |
| `33388` | High Scores | [Corny Chat][cornychat-highscores] | | `33388` | High Scores | [Corny Chat][cornychat-highscores] |
| `34235` | Addressable Video Event | [71](71.md) |
| `34236` | Addressable Short Video Event | [71](71.md) |
| `34388` | Sound Effects | [Corny Chat][cornychat-soundeffects] | | `34388` | Sound Effects | [Corny Chat][cornychat-soundeffects] |
| `34550` | Community Definition | [72](72.md) | | `34550` | Community Definition | [72](72.md) |
| `38172` | Cashu Mint Announcement | [87](87.md) | | `38172` | Cashu Mint Announcement | [87](87.md) |