diff options
| -rw-r--r-- | 71.md | 73 | ||||
| -rw-r--r-- | README.md | 2 |
2 files changed, 75 insertions, 0 deletions
| @@ -20,6 +20,20 @@ Nothing except cavaliership and common sense prevents a _short_ video from being | |||
| 20 | 20 | ||
| 21 | The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos. | 21 | The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos. |
| 22 | 22 | ||
| 23 | ## Addressable Video Events | ||
| 24 | |||
| 25 | For content that may need updates after publication (such as correcting metadata, descriptions, or handling URL migrations), addressable versions are available: | ||
| 26 | |||
| 27 | - Kind `34235` for _addressable normal videos_ | ||
| 28 | - Kind `34236` for _addressable short videos_ | ||
| 29 | |||
| 30 | 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: | ||
| 31 | |||
| 32 | - Metadata corrections (descriptions, titles, tags) without republishing | ||
| 33 | - Preservation of imported content IDs from legacy platforms | ||
| 34 | - URL migration when hosting changes | ||
| 35 | - Platform migration tracking | ||
| 36 | |||
| 23 | The `.content` of these events is a summary or description on the video content. | 37 | The `.content` of these events is a summary or description on the video content. |
| 24 | 38 | ||
| 25 | The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md) | 39 | 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 | |||
| 81 | 95 | ||
| 82 | Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash. | 96 | Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash. |
| 83 | 97 | ||
| 98 | ### Required tags for addressable events: | ||
| 99 | * `d` - Unique identifier for this video (user-chosen string, required for kinds 34235, 34236) | ||
| 100 | |||
| 84 | ### Other tags: | 101 | ### Other tags: |
| 85 | * `title` (required) title of the video | 102 | * `title` (required) title of the video |
| 86 | * `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published | 103 | * `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 | |||
| 92 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL | 109 | * `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL |
| 93 | * `r` (optional, repeated) references / links to web pages | 110 | * `r` (optional, repeated) references / links to web pages |
| 94 | 111 | ||
| 112 | ### Optional tags for imported content: | ||
| 113 | * `origin` - Track original platform and ID: `["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"]` | ||
| 114 | |||
| 95 | ```jsonc | 115 | ```jsonc |
| 96 | { | 116 | { |
| 97 | "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>", | 117 | "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 | |||
| 135 | ] | 155 | ] |
| 136 | } | 156 | } |
| 137 | ``` | 157 | ``` |
| 158 | |||
| 159 | ## Addressable Event Example | ||
| 160 | |||
| 161 | ```jsonc | ||
| 162 | { | ||
| 163 | "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, | ||
| 164 | "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, | ||
| 165 | "created_at": <Unix timestamp in seconds>, | ||
| 166 | "kind": 34235 | 34236, | ||
| 167 | "content": "<summary / description of video>", | ||
| 168 | "tags": [ | ||
| 169 | ["d", "<unique-identifier>"], | ||
| 170 | ["title", "<title of video>"], | ||
| 171 | ["published_at", "<unix timestamp>"], | ||
| 172 | ["alt", "<description for accessibility>"], | ||
| 173 | |||
| 174 | // video data | ||
| 175 | ["imeta", | ||
| 176 | "url https://example.com/media.mp4", | ||
| 177 | "m video/mp4", | ||
| 178 | "dim 480x480", | ||
| 179 | "blurhash eVF$^OI:${M{%LRjWBoLoLaeR*", | ||
| 180 | "image https://example.com/thumb.jpg", | ||
| 181 | "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc" | ||
| 182 | ], | ||
| 183 | |||
| 184 | ["duration", <duration in seconds>], | ||
| 185 | ["content-warning", "<reason>"], | ||
| 186 | |||
| 187 | // origin tracking for imported content | ||
| 188 | ["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"], | ||
| 189 | |||
| 190 | // participants | ||
| 191 | ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], | ||
| 192 | |||
| 193 | // hashtags | ||
| 194 | ["t", "<tag>"], | ||
| 195 | ["t", "<tag>"], | ||
| 196 | |||
| 197 | // reference links | ||
| 198 | ["r", "<url>"] | ||
| 199 | ] | ||
| 200 | } | ||
| 201 | ``` | ||
| 202 | |||
| 203 | ## Referencing Addressable Events | ||
| 204 | |||
| 205 | To reference an addressable video: | ||
| 206 | |||
| 207 | ``` | ||
| 208 | ["a", "34235:<pubkey>:<d-tag-value>", "<relay-url>"] // for normal videos | ||
| 209 | ["a", "34236:<pubkey>:<d-tag-value>", "<relay-url>"] // for short videos | ||
| 210 | ``` | ||
| @@ -279,6 +279,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 279 | | `32267` | Software Application | | | 279 | | `32267` | Software Application | | |
| 280 | | `32388` | User Room Favorites | [Corny Chat][cornychat-roomfavorites] | | 280 | | `32388` | User Room Favorites | [Corny Chat][cornychat-roomfavorites] | |
| 281 | | `33388` | High Scores | [Corny Chat][cornychat-highscores] | | 281 | | `33388` | High Scores | [Corny Chat][cornychat-highscores] | |
| 282 | | `34235` | Addressable Video Event | [71](71.md) | | ||
| 283 | | `34236` | Addressable Short Video Event | [71](71.md) | | ||
| 282 | | `34388` | Sound Effects | [Corny Chat][cornychat-soundeffects] | | 284 | | `34388` | Sound Effects | [Corny Chat][cornychat-soundeffects] | |
| 283 | | `34550` | Community Definition | [72](72.md) | | 285 | | `34550` | Community Definition | [72](72.md) | |
| 284 | | `38172` | Cashu Mint Announcement | [87](87.md) | | 286 | | `38172` | Cashu Mint Announcement | [87](87.md) | |