upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--71.md117
-rw-r--r--94.md13
-rw-r--r--README.md100
3 files changed, 121 insertions, 109 deletions
diff --git a/71.md b/71.md
index dd813e9..5edd7c6 100644
--- a/71.md
+++ b/71.md
@@ -20,21 +20,60 @@ The format uses an _addressable event_ kind `34235` for horizontal videos and `3
20 20
21The `.content` of these events is a summary or description on the video content. 21The `.content` of these events is a summary or description on the video content.
22 22
23The list of tags are as follows: 23The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md)
24* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event. 24
25* `url` (required) the url to the video file 25Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties.
26* `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. 26
27Example:
28```json
29[
30 ["imeta",
31 "dim 1920x1080",
32 "url https://myvideo.com/1080/12345.mp4",
33 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
34 "m video/mp4",
35 "image https://myvideo.com/1080/12345.jpg",
36 "image https://myotherserver.com/1080/12345.jpg",
37 "fallback https://myotherserver.com/1080/12345.mp4",
38 "fallback https://andanotherserver.com/1080/12345.mp4",
39 "service nip96",
40 ],
41 ["imeta",
42 "dim 1280x720",
43 "url https://myvideo.com/720/12345.mp4",
44 "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
45 "m video/mp4",
46 "image https://myvideo.com/720/12345.jpg",
47 "image https://myotherserver.com/720/12345.jpg",
48 "fallback https://myotherserver.com/720/12345.mp4",
49 "fallback https://andanotherserver.com/720/12345.mp4",
50 "service nip96",
51 ],
52 ["imeta",
53 "dim 1280x720",
54 "url https://myvideo.com/720/12345.m3u8",
55 "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
56 "m application/x-mpegURL",
57 "image https://myvideo.com/720/12345.jpg",
58 "image https://myotherserver.com/720/12345.jpg",
59 "fallback https://myotherserver.com/720/12345.m3u8",
60 "fallback https://andanotherserver.com/720/12345.m3u8",
61 "service nip96",
62 ],
63]
64```
65
66Where `url` is the primary server url and `fallback` are other servers hosting the same file, both `url` and `fallback` should be weighted equally and clients are recommended to use any of the provided video urls.
67
68The `image` tag contains a preview image (at the same resolution). Multiple `image` tags may be used to specify fallback copies in the same way `fallback` is used for `url`.
69
70Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash.
71
72### Other tags:
27* `title` (required) title of the video 73* `title` (required) title of the video
28* `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the video was published 74* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
29* `x` containing the SHA-256 hexencoded string of the file.
30* `size` (optional) size of file in bytes
31* `dim` (optional) size of file in pixels in the form `<width>x<height>`
32* `duration` (optional) video duration in seconds 75* `duration` (optional) video duration in seconds
33* `magnet` (optional) URI to magnet file
34* `i` (optional) torrent infohash
35* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code 76* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
36* `thumb` (optional) url of thumbnail with same aspect ratio
37* `image` (optional) url of preview image with same dimensions
38* `content-warning` (optional) warning about content of NSFW video 77* `content-warning` (optional) warning about content of NSFW video
39* `alt` (optional) description for accessibility 78* `alt` (optional) description for accessibility
40* `segment` (optional, repeated) start timestamp in format `HH:MM:SS.sss`, end timestamp in format `HH:MM:SS.sss`, chapter/segment title, chapter thumbnail-url 79* `segment` (optional, repeated) start timestamp in format `HH:MM:SS.sss`, end timestamp in format `HH:MM:SS.sss`, chapter/segment title, chapter thumbnail-url
@@ -53,19 +92,23 @@ The list of tags are as follows:
53 ["d", "<UUID>"], 92 ["d", "<UUID>"],
54 93
55 ["title", "<title of video>"], 94 ["title", "<title of video>"],
56 ["thumb", "<thumbnail image for video>"],
57 ["published_at", "<unix timestamp>"], 95 ["published_at", "<unix timestamp>"],
58 ["alt", <description>], 96 ["alt", <description>],
59 97
60 // Video Data 98 // Video Data
61 ["url",<string with URI of file>], 99 ["imeta",
62 ["m", <MIME type>], 100 "dim 1920x1080",
63 ["x",<Hash SHA-256>], 101 "url https://myvideo.com/1080/12345.mp4",
64 ["size", <size of file in bytes>], 102 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
103 "m video/mp4",
104 "image https://myvideo.com/1080/12345.jpg",
105 "image https://myotherserver.com/1080/12345.jpg",
106 "fallback https://myotherserver.com/1080/12345.mp4",
107 "fallback https://andanotherserver.com/1080/12345.mp4",
108 "service nip96",
109 ],
110
65 ["duration", <duration of video in seconds>], 111 ["duration", <duration of video in seconds>],
66 ["dim", <size of file in pixels>],
67 ["magnet",<magnet URI> ],
68 ["i",<torrent infohash>],
69 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], 112 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"],
70 ["content-warning", "<reason>"], 113 ["content-warning", "<reason>"],
71 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], 114 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
@@ -83,36 +126,4 @@ The list of tags are as follows:
83 ["r", "<url>"] 126 ["r", "<url>"]
84 ] 127 ]
85} 128}
86``` 129``` \ No newline at end of file
87
88## Video View
89
90A video event view is a response to a video event to track a user's view or progress viewing the video.
91
92### Format
93
94The format uses an _addressable event_ kind `34237`.
95
96The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
97
98The list of tags are as follows:
99* `a` (required) reference tag to kind `34235` or `34236` video event being viewed
100* `d` (required) same as `a` reference tag value
101* `viewed` (optional, repeated) timestamp of the user's start time in seconds, timestamp of the user's end time in seconds
102
103
104```json
105{
106 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
107 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
108 "created_at": <Unix timestamp in seconds>,
109 "kind": 34237,
110 "content": "<note>",
111 "tags": [
112 ["a", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
113 ["e", "<event-id", "<relay-url>"]
114 ["d", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>"],
115 ["viewed", <start>, <end>],
116 ]
117}
118```
diff --git a/94.md b/94.md
index a057cb2..021cc4c 100644
--- a/94.md
+++ b/94.md
@@ -26,6 +26,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
26* `summary` (optional) text excerpt 26* `summary` (optional) text excerpt
27* `alt` (optional) description for accessibility 27* `alt` (optional) description for accessibility
28* `fallback` (optional) zero or more fallback file sources in case `url` fails 28* `fallback` (optional) zero or more fallback file sources in case `url` fails
29* `service` (optional) service type which is serving the file (eg. [NIP-96](96.md))
29 30
30```jsonc 31```jsonc
31{ 32{
@@ -33,15 +34,15 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
33 "tags": [ 34 "tags": [
34 ["url",<string with URI of file>], 35 ["url",<string with URI of file>],
35 ["m", <MIME type>], 36 ["m", <MIME type>],
36 ["x",<Hash SHA-256>], 37 ["x", <Hash SHA-256>],
37 ["ox",<Hash SHA-256>], 38 ["ox", <Hash SHA-256>],
38 ["size", <size of file in bytes>], 39 ["size", <size of file in bytes>],
39 ["dim", <size of file in pixels>], 40 ["dim", <size of file in pixels>],
40 ["magnet",<magnet URI> ], 41 ["magnet", <magnet URI> ],
41 ["i",<torrent infohash>], 42 ["i", <torrent infohash>],
42 ["blurhash", <value>], 43 ["blurhash", <value>],
43 ["thumb", <string with thumbnail URI>], 44 ["thumb", <string with thumbnail URI>, <Hash SHA-256>],
44 ["image", <string with preview URI>], 45 ["image", <string with preview URI>, <Hash SHA-256>],
45 ["summary", <excerpt>], 46 ["summary", <excerpt>],
46 ["alt", <description>] 47 ["alt", <description>]
47 ], 48 ],
diff --git a/README.md b/README.md
index e03cb3b..9566dff 100644
--- a/README.md
+++ b/README.md
@@ -249,56 +249,56 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
249 249
250## Standardized Tags 250## Standardized Tags
251 251
252| name | value | other parameters | NIP | 252| name | value | other parameters | NIP |
253| ----------------- | ------------------------------------ | ------------------------------- | ------------------------------------- | 253| ----------------- | ------------------------------------ | ------------------------------- | -------------------------------------------------- |
254| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) | 254| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) |
255| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) | 255| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
256| `a` | coordinates to an event | relay URL | [01](01.md) | 256| `a` | coordinates to an event | relay URL | [01](01.md) |
257| `d` | identifier | -- | [01](01.md) | 257| `d` | identifier | -- | [01](01.md) |
258| `-` | -- | -- | [70](70.md) | 258| `-` | -- | -- | [70](70.md) |
259| `g` | geohash | -- | [52](52.md) | 259| `g` | geohash | -- | [52](52.md) |
260| `h` | group id | -- | [29](29.md) | 260| `h` | group id | -- | [29](29.md) |
261| `i` | external identity | proof, url hint | [39](39.md), [73](73.md) | 261| `i` | external identity | proof, url hint | [39](39.md), [73](73.md) |
262| `k` | kind number (string) | -- | [18](18.md), [25](25.md), [72](72.md) | 262| `k` | kind | -- | [18](18.md), [25](25.md), [72](72.md), [73](73.md) |
263| `l` | label, label namespace | -- | [32](32.md) | 263| `l` | label, label namespace | -- | [32](32.md) |
264| `L` | label namespace | -- | [32](32.md) | 264| `L` | label namespace | -- | [32](32.md) |
265| `m` | MIME type | -- | [94](94.md) | 265| `m` | MIME type | -- | [94](94.md) |
266| `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) | 266| `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) |
267| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | 267| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) |
268| `r` | relay url | marker | [65](65.md) | 268| `r` | relay url | marker | [65](65.md) |
269| `t` | hashtag | -- | [24](24.md), [34](34.md) | 269| `t` | hashtag | -- | [24](24.md), [34](34.md) |
270| `alt` | summary | -- | [31](31.md) | 270| `alt` | summary | -- | [31](31.md) |
271| `amount` | millisatoshis, stringified | -- | [57](57.md) | 271| `amount` | millisatoshis, stringified | -- | [57](57.md) |
272| `bolt11` | `bolt11` invoice | -- | [57](57.md) | 272| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
273| `challenge` | challenge string | -- | [42](42.md) | 273| `challenge` | challenge string | -- | [42](42.md) |
274| `client` | name, address | relay URL | [89](89.md) | 274| `client` | name, address | relay URL | [89](89.md) |
275| `clone` | git clone URL | -- | [34](34.md) | 275| `clone` | git clone URL | -- | [34](34.md) |
276| `content-warning` | reason | -- | [36](36.md) | 276| `content-warning` | reason | -- | [36](36.md) |
277| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) | 277| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
278| `description` | description | -- | [34](34.md), [57](57.md), [58](58.md) | 278| `description` | description | -- | [34](34.md), [57](57.md), [58](58.md) |
279| `emoji` | shortcode, image URL | -- | [30](30.md) | 279| `emoji` | shortcode, image URL | -- | [30](30.md) |
280| `encrypted` | -- | -- | [90](90.md) | 280| `encrypted` | -- | -- | [90](90.md) |
281| `expiration` | unix timestamp (string) | -- | [40](40.md) | 281| `expiration` | unix timestamp (string) | -- | [40](40.md) |
282| `goal` | event id (hex) | relay URL | [75](75.md) | 282| `goal` | event id (hex) | relay URL | [75](75.md) |
283| `image` | image URL | dimensions in pixels | [23](23.md), [52](52.md), [58](58.md) | 283| `image` | image URL | dimensions in pixels | [23](23.md), [52](52.md), [58](58.md) |
284| `imeta` | inline metadata | -- | [92](92.md) | 284| `imeta` | inline metadata | -- | [92](92.md) |
285| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | 285| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
286| `location` | location string | -- | [52](52.md), [99](99.md) | 286| `location` | location string | -- | [52](52.md), [99](99.md) |
287| `name` | name | -- | [34](34.md), [58](58.md), [72](72.md) | 287| `name` | name | -- | [34](34.md), [58](58.md), [72](72.md) |
288| `nonce` | random | difficulty | [13](13.md) | 288| `nonce` | random | difficulty | [13](13.md) |
289| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) | 289| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
290| `price` | price | currency, frequency | [99](99.md) | 290| `price` | price | currency, frequency | [99](99.md) |
291| `proxy` | external ID | protocol | [48](48.md) | 291| `proxy` | external ID | protocol | [48](48.md) |
292| `published_at` | unix timestamp (string) | -- | [23](23.md) | 292| `published_at` | unix timestamp (string) | -- | [23](23.md) |
293| `relay` | relay url | -- | [42](42.md), [17](17.md) | 293| `relay` | relay url | -- | [42](42.md), [17](17.md) |
294| `relays` | relay list | -- | [57](57.md) | 294| `relays` | relay list | -- | [57](57.md) |
295| `server` | file storage server url | -- | [96](96.md) | 295| `server` | file storage server url | -- | [96](96.md) |
296| `subject` | subject | -- | [14](14.md), [17](17.md), [34](34.md) | 296| `subject` | subject | -- | [14](14.md), [17](17.md), [34](34.md) |
297| `summary` | summary | -- | [23](23.md), [52](52.md) | 297| `summary` | summary | -- | [23](23.md), [52](52.md) |
298| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) | 298| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
299| `title` | article title | -- | [23](23.md) | 299| `title` | article title | -- | [23](23.md) |
300| `web` | webpage URL | -- | [34](34.md) | 300| `web` | webpage URL | -- | [34](34.md) |
301| `zap` | pubkey (hex), relay URL | weight | [57](57.md) | 301| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
302 302
303Please update these lists when proposing new NIPs. 303Please update these lists when proposing new NIPs.
304 304