NIP-71: Add addressable video events (kinds 32221, 32222)
Extends NIP-71 to support addressable video events for content that may need updates after publication. This enables: - Metadata corrections without republishing - URL migration when hosting changes - Preservation of imported content IDs from legacy platforms - Platform migration tracking Adds kinds 32221 (normal videos) and 32222 (short videos) with required 'd' tag for unique identification and optional 'origin' tag for tracking imported content.
This commit is contained in:
parent
93f95c2156
commit
114271a506
73
71.md
73
71.md
|
@ -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.
|
||||
|
||||
## 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 `32221` for _addressable normal videos_
|
||||
- Kind `32222` 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 primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md)
|
||||
|
@ -71,6 +85,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.
|
||||
|
||||
### Required tags for addressable events:
|
||||
* `d` - Unique identifier for this video (user-chosen string, required for kinds 32221, 32222)
|
||||
|
||||
### Other tags:
|
||||
* `title` (required) title of the video
|
||||
* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
|
||||
|
@ -83,6 +100,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
|
||||
* `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
|
||||
{
|
||||
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
|
||||
|
@ -127,3 +147,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": 32221 | 32222,
|
||||
"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", "32221:<pubkey>:<d-tag-value>", "<relay-url>"] // for normal videos
|
||||
["a", "32222:<pubkey>:<d-tag-value>", "<relay-url>"] // for short videos
|
||||
```
|
||||
|
|
|
@ -248,6 +248,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||
| `31925` | Calendar Event RSVP | [52](52.md) |
|
||||
| `31989` | Handler recommendation | [89](89.md) |
|
||||
| `31990` | Handler information | [89](89.md) | |
|
||||
| `32221` | Addressable Video Event | [71](71.md) |
|
||||
| `32222` | Addressable Short Video Event | [71](71.md) |
|
||||
| `32267` | Software Application | | |
|
||||
| `34550` | Community Definition | [72](72.md) |
|
||||
| `38383` | Peer-to-peer Order events | [69](69.md) |
|
||||
|
|
Loading…
Reference in New Issue