Chapter 71 - Media
71
Nostr Implementation Possibility - Hex № 71

Video Events

Dedicated posts for externally hosted video: two viewing formats, addressable editions, and full playback metadata in one event.

1 Overview

A video event is a dedicated post about one externally hosted video. The event does not carry the video bytes. It carries every piece of metadata a player needs: URLs, formats, resolutions, previews, audio tracks, and chapters.

A NIP-01 kind:1 note can also link a video. The difference is intent. A kind-1 note targets micro-blogging clients. A video event targets video-specific clients, in the style of Netflix, YouTube, or TikTok. There the video is the center of the experience, and clients need structured metadata, not a bare link.

This NIP defines four kinds. Kinds 21 and 22 are regular events for normal and short videos. Kinds 34235 and 34236 are addressable versions of the same two formats. The media metadata itself rides in imeta tags from NIP-92.

Hint!

Read NIP-92 and NIP-94 first. This chapter reuses their imeta vocabulary (url, m, x, dim, image, fallback, blurhash, service) and adds three video-specific properties on top.

2 The Four Video Kinds

There are two types of video events: normal and short. Normal videos are longer and mostly horizontal (landscape). Short videos are short-form and mostly vertical (portrait): "stories", "reels", "shorts". The split lets a client build a different viewing experience for each type.

The split is stylistic, not technical. Nothing except common sense stops a short video from being long, or a normal video from being vertical. The kind states how the author wants the video presented. It does not constrain the raw size or dimensions.

Kind reference
KindTypeStorage class
21Normal videoRegular event. Immutable once published.
22Short videoRegular event. Immutable once published.
34235Addressable normal videoAddressable event. Requires a d tag. Updatable.
34236Addressable short videoAddressable event. Requires a d tag. Updatable.
NORMAL (landscape) SHORT (portrait) kind 21 regular - immutable kind 22 regular - immutable kind 34235 addressable - d tag - updatable kind 34236 addressable - d tag - updatable publish update
Fig. 71-1 — The kind grid. Pick the column by presentation format. Pick the row by whether you need updates later.

In every one of the four kinds, the content field holds a summary or description of the video. The primary source of video information is the imeta tags, described in §4.

3 Addressable Video Events

Some video posts need edits after publication. Kinds 34235 and 34236 exist for that case. They follow the same format as kinds 21 and 22. They add one required tag: a d tag with a unique, user-chosen identifier string. Publish a new event with the same d value to update the post. The addressable reference stays stable across updates.

Use the addressable kinds for:

  • Metadata corrections — fix descriptions, titles, or tags without republishing the video.
  • Preservation of imported content IDs from legacy platforms.
  • URL migration when the hosting server changes.
  • Platform migration tracking.

Referencing an addressable video

Reference an addressable video with a standard NIP-01 a tag:

Address reference - a tags
["a", "34235:<pubkey>:<d-tag-value>", "<relay-url>"]  // normal videos
["a", "34236:<pubkey>:<d-tag-value>", "<relay-url>"]  // short videos

4 Video Data: imeta Tags

Each imeta tag describes one file. One video event can carry many imeta tags. Each tag can specify one variant of the video, distinguished by the dim (dimensions) and m (MIME type) properties. Extra imeta tags can carry separate audio tracks, one per language.

Clients should check if separate audio tracks are available and prefer them over in-video audio. Separate audio allows smooth resolution switching without interrupting the sound. The ov flag on the l (language) property marks the original language track.

imeta properties inherited from NIP-92 / NIP-94
PropertyMeaning in a video event
urlPrimary server URL of the file.
fallbackAnother server hosting the same file. Repeatable. Weight url and fallback equally; clients are recommended to use any of the provided URLs.
mMIME type, for example video/mp4 or application/x-mpegURL.
xSHA-256 hash of the file, hex.
dimDimensions in pixels, <width>x<height>. Selects the variant together with m.
imagePreview image at the same resolution. Repeatable: extra image entries are fallback copies, the same way fallback backs up url.
blurhashBlurhash placeholder string for the preview.
lLanguage of an audio track: code, standard (for example ISO-639-1), and the optional ov flag for the original version.
serviceservice nip96 lets clients search the author's NIP-96 server list to find the file by its hash.

This NIP defines three additional imeta properties, on top of those listed in NIP-92 and NIP-94:

imeta properties added by NIP-71
PropertyLevelMeaning
durationrecommendedDuration of the video or audio in seconds. Floating point number.
bitraterecommendedAverage bitrate of the video or audio in bits per second.
waveformoptionalAudio only. Amplitude values over time: space-separated full integers. Fewer than 100 values should be enough for a nice visual.
Video event kind 21 imeta 1080p - mp4 imeta 720p - mp4 imeta 720p - HLS imeta audio - l en ov Player dim + m video audio
Fig. 71-2 — Variant selection. The player picks one video variant by dim and m, then pairs it with a separate audio track. Resolution can switch without an audio cut.
imeta variants - three resolutions plus one audio track
[
  ["imeta",
    "dim 1920x1080",
    "url https://myvideo.com/1080/12345.mp4",
    "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
    "m video/mp4",
    "image https://myvideo.com/1080/12345.jpg",
    "image https://myotherserver.com/1080/12345.jpg",
    "fallback https://myotherserver.com/1080/12345.mp4",
    "fallback https://andanotherserver.com/1080/12345.mp4",
    "service nip96",
    "bitrate 3000000",
    "duration 29.223"
  ],
  ["imeta",
    "dim 1280x720",
    "url https://myvideo.com/720/12345.mp4",
    "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
    "m video/mp4",
    "image https://myvideo.com/720/12345.jpg",
    "fallback https://myotherserver.com/720/12345.mp4",
    "service nip96",
    "bitrate 2000000",
    "duration 29.24"
  ],
  ["imeta",
    "dim 1280x720",
    "url https://myvideo.com/720/12345.m3u8",
    "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
    "m application/x-mpegURL",
    "image https://myvideo.com/720/12345.jpg",
    "fallback https://myotherserver.com/720/12345.m3u8",
    "service nip96",
    "duration 29.21"
  ],
  ["imeta",
    "url https://myaudio.com/audio/en/12345.mp3",
    "x b2e0a7a82ac9f3f3a71f1d9a78c381d5be9d1cf19dce258765c17c8a76287c93",
    "m audio/mp3",
    "waveform 0 7 35 8 100 100 49 8 4 16 8 10 7 2 20 10 100 100 ...",
    "l en ISO-639-1 ov",
    "fallback https://myotherserver.com/audio/en/12345.mp3",
    "service nip96",
    "bitrate 320000",
    "duration 29.24"
  ]
]

5 Tag Reference

Outside the imeta tags, a video event uses the tags below. The title tag is required on every video event. The d tag is required on the addressable kinds only.

Video event tags
TagLevelRule
drequired*Unique identifier for this video. A user-chosen string. Required for kinds 34235 and 34236 only.
titlerequiredTitle of the video.
published_atoptionalUnix timestamp in seconds, stringified, of the first time the video was published. Keep it stable across updates of an addressable event.
text-trackoptional, repeatedLink to a WebVTT file for the video, the type of supplementary information (captions, subtitles, chapters, or metadata), and an optional language code.
content-warningoptionalWarning about the content of an NSFW video. The value is the reason.
altoptionalDescription of the video for accessibility.
segmentoptional, repeatedOne chapter: start timestamp in HH:MM:SS.sss format, end timestamp in HH:MM:SS.sss format, chapter title, chapter thumbnail URL.
toptional, repeatedHashtag to categorize the video.
poptional, repeated32-byte hex pubkey of a participant in the video, plus an optional recommended relay URL.
roptional, repeatedReference link to a web page.
originoptionalFor imported content. Tracks the original platform and ID: ["origin", "<platform>", "<external-id>", "<original-url>", "<optional-metadata>"].
Tech Note

The source spec defines text-track twice, with different shapes. The tag list says: a WebVTT file link, a type, and an optional language code. The kind-21 schema instead shows ["text-track", "<encoded kind 6000 event>", "<recommended relay urls>"]. Kind 6000 is a data-vending-machine job-result kind elsewhere. The spec does not say which shape is normative. This page lists both; expect either in the wild.

Tech Note

The addressable example in the source shows a top-level ["duration", <seconds>] tag. The tag reference does not list it; the spec defines duration only as an imeta property. Treat the top-level form as a leftover from an older revision. Prefer duration inside imeta.

6 Worked Example

The event below is a complete short video, kind 22. It offers one mp4 file with a preview image, one fallback server, a caption track, one participant, and hashtags.

Wire format - kind 22 short video
{
  "id": "7fdc7e6a15…",
  "pubkey": "22a12a12…",
  "created_at": 1749762600,
  "kind": 22,
  "content": "My cat discovers the water tap. 29 seconds of chaos.",
  "tags": [
    ["title", "Cat vs. tap"],
    ["published_at", "1749762600"],
    ["alt", "A vertical phone video of a cat pawing at a running tap"],
    ["imeta",
      "dim 1080x1920",
      "url https://myvideo.com/v/cat-tap.mp4",
      "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
      "m video/mp4",
      "image https://myvideo.com/v/cat-tap.jpg",
      "fallback https://myotherserver.com/v/cat-tap.mp4",
      "service nip96",
      "bitrate 2500000",
      "duration 29.223"
    ],
    ["text-track", "https://myvideo.com/v/cat-tap.en.vtt", "captions", "en"],
    ["segment", "00:00:00.000", "00:00:12.000", "The approach", "https://myvideo.com/v/seg1.jpg"],
    ["segment", "00:00:12.000", "00:00:29.223", "Contact", "https://myvideo.com/v/seg2.jpg"],
    ["content-warning", "mild cat distress"],
    ["p", "f7234bd4c139…76e9ca", "wss://relay.example.com"],
    ["t", "cats"],
    ["t", "shorts"],
    ["r", "https://myblog.example.com/cat-tap"]
  ],
  "sig": "e8551d85…"
}

An imported catalog uses the addressable kinds instead. The event below is kind 34235. The d tag preserves the legacy platform ID, and the origin tag records where the video came from. Republishing with the same d value updates the metadata in place.

Wire format - kind 34235 addressable normal video (abridged)
{
  "kind": 34235,
  "content": "Full 40-minute talk on relay economics.",
  "tags": [
    ["d", "yt-dQw4w9WgXcQ"],
    ["title", "Relay Economics 101"],
    ["published_at", "1702166400"],
    ["imeta",
      "url https://example.com/talks/relay-econ.mp4",
      "m video/mp4",
      "dim 1920x1080",
      "blurhash eVF$^OI:${M{%LRjWBoLoLaeR*",
      "image https://example.com/talks/relay-econ.jpg",
      "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
      "duration 2400.0"
    ],
    ["origin", "youtube", "dQw4w9WgXcQ", "https://youtube.com/watch?v=dQw4w9WgXcQ"]
  ],
  … id / pubkey / created_at / sig as usual …
}
-- reference it from any other event --
["a", "34235:22a12a12…:yt-dQw4w9WgXcQ", "wss://relay.example.com"]

7 Version History

The spec started life as a proposal numbered 44 and became NIP-71 on merge. It has grown from a simple video post into a full playback-metadata format. Notable changes, newest first:

  • 20262026-05Added multiple audio tracks per video: the l language property, the ov original-version flag, and the waveform property.
  • 20262026-01Added the addressable kinds 34235 and 34236, the required d tag, and the origin tag for imported content.
  • 20252025-10Added the duration and bitrate imeta properties.
  • 20252025-01Made video events regular: the original addressable kinds 34235/34236 became kinds 21 and 22.
  • 20242024-05Moved all file metadata into NIP-92 imeta tags; removed the aes-256-gcm tag.
  • 2023-242023-12Early edits: removed the summary tag; renamed the proposal from 44 to 71.
  • Origin2023-12zmeyer44 opened the first draft, "Create NIP 44 for Video Events".

Original Proposal - Credits

Authorzmeyer44
First commit2023-12-07 — “Create NIP 44 for Video Events” (renamed to 71.md on 2023-12-09)
Statusdraft - optional — implement it only in video-oriented clients
Source71.md on GitHub - full change history

8 See Also

  • NIP-01 — the base event format, regular and addressable storage classes, and a tags.
  • NIP-92 — defines the imeta tag this NIP builds on.
  • NIP-94 — file metadata fields (url, m, x, dim, blurhash, …) reused inside imeta.
  • NIP-96 — HTTP file storage; the target of service nip96 hash lookups.
  • NIP-68 — picture-first feeds; the same idea for images instead of video.
  • NIP-53 — live streaming events, for video that is still being broadcast.