diff options
| author | Kieran <kieran@harkin.me> | 2025-10-15 21:15:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-15 16:15:27 -0400 |
| commit | a3c5554e34f2b292af705d94f49e68f280c7e451 (patch) | |
| tree | f9e136f36a8ea157d7dd55dc76537ebed03f523c /71.md | |
| parent | 7b24bf803f99e6bfe7a34b22f74f8a0942fca158 (diff) | |
Add `duration` & `bitrate` to NIP-71 (#1723)
Co-authored-by: Vitor Pamplona <vitor@vitorpamplona.com>
Diffstat (limited to '71.md')
| -rw-r--r-- | 71.md | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -26,6 +26,11 @@ The primary source of video information is the `imeta` tags which is defined in | |||
| 26 | 26 | ||
| 27 | Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties. | 27 | Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties. |
| 28 | 28 | ||
| 29 | This NIP defines the following additional `imeta` properties aside form those listen in [NIP-92](92.md) & [NIP-94](94.md): | ||
| 30 | |||
| 31 | * `duration` (recommended) the duration of the video/audio in seconds (floating point number) | ||
| 32 | * `bitrate` (recommended) the average bitrate of the video/audio in bits/sec | ||
| 33 | |||
| 29 | Example: | 34 | Example: |
| 30 | ```json | 35 | ```json |
| 31 | [ | 36 | [ |
| @@ -39,6 +44,8 @@ Example: | |||
| 39 | "fallback https://myotherserver.com/1080/12345.mp4", | 44 | "fallback https://myotherserver.com/1080/12345.mp4", |
| 40 | "fallback https://andanotherserver.com/1080/12345.mp4", | 45 | "fallback https://andanotherserver.com/1080/12345.mp4", |
| 41 | "service nip96", | 46 | "service nip96", |
| 47 | "bitrate 3000000", | ||
| 48 | "duration 29.223" | ||
| 42 | ], | 49 | ], |
| 43 | ["imeta", | 50 | ["imeta", |
| 44 | "dim 1280x720", | 51 | "dim 1280x720", |
| @@ -50,6 +57,8 @@ Example: | |||
| 50 | "fallback https://myotherserver.com/720/12345.mp4", | 57 | "fallback https://myotherserver.com/720/12345.mp4", |
| 51 | "fallback https://andanotherserver.com/720/12345.mp4", | 58 | "fallback https://andanotherserver.com/720/12345.mp4", |
| 52 | "service nip96", | 59 | "service nip96", |
| 60 | "bitrate 2000000", | ||
| 61 | "duration 29.24" | ||
| 53 | ], | 62 | ], |
| 54 | ["imeta", | 63 | ["imeta", |
| 55 | "dim 1280x720", | 64 | "dim 1280x720", |
| @@ -61,6 +70,7 @@ Example: | |||
| 61 | "fallback https://myotherserver.com/720/12345.m3u8", | 70 | "fallback https://myotherserver.com/720/12345.m3u8", |
| 62 | "fallback https://andanotherserver.com/720/12345.m3u8", | 71 | "fallback https://andanotherserver.com/720/12345.m3u8", |
| 63 | "service nip96", | 72 | "service nip96", |
| 73 | "duration 29.21" | ||
| 64 | ], | 74 | ], |
| 65 | ] | 75 | ] |
| 66 | ``` | 76 | ``` |
| @@ -74,7 +84,6 @@ Additionally `service nip96` may be included to allow clients to search the auth | |||
| 74 | ### Other tags: | 84 | ### Other tags: |
| 75 | * `title` (required) title of the video | 85 | * `title` (required) title of the video |
| 76 | * `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published | 86 | * `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published |
| 77 | * `duration` (optional) video duration in seconds | ||
| 78 | * `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code | 87 | * `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code |
| 79 | * `content-warning` (optional) warning about content of NSFW video | 88 | * `content-warning` (optional) warning about content of NSFW video |
| 80 | * `alt` (optional) description for accessibility | 89 | * `alt` (optional) description for accessibility |
| @@ -108,7 +117,6 @@ Additionally `service nip96` may be included to allow clients to search the auth | |||
| 108 | "service nip96", | 117 | "service nip96", |
| 109 | ], | 118 | ], |
| 110 | 119 | ||
| 111 | ["duration", "<duration of video in seconds>"], | ||
| 112 | ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], | 120 | ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], |
| 113 | ["content-warning", "<reason>"], | 121 | ["content-warning", "<reason>"], |
| 114 | ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], | 122 | ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], |