This application implements NIP-71 video events for short-form looping video content, using Kind 34236 for addressable short videos.
The event kind 34236 is used for addressable short-form video content as defined in NIP-71. Being in the 30000-39999 range makes these events addressable, allowing for updates and preventing duplicates.
{
"kind": 34236,
"content": "Video description/caption text",
"tags": [
["d", "unique-vine-id"], // REQUIRED: Unique identifier for addressability
["title", "Video Title"], // REQUIRED by NIP-71
["published_at", "1672531200"], // REQUIRED by NIP-71
["imeta", "url", "https://videos.host/video.mp4", "m", "video/mp4", "dim", "480x480", "blurhash", "eNH_0EI:${M{%LRjWBaeoLofR*", "image", "https://videos.host/thumb.jpg"],
["client", "divine-web"] // Client attribution
]
}title: Video titlepublished_at: Unix timestamp (stringified) of first publicationduration: Video duration in seconds (typically "6" for classic vines)alt: Accessibility descriptiont: Hashtags for categorizationloops: Original loop count from classic Vine importslikes: Original like count from classic Vine importsh: Group/community identification
Implementations should use liberal URL parsing following Postel's Law, checking these sources in order:
imetatag with url key-value pairurltag valuertag with type annotationetag if contains valid video URLitag if contains valid video URL- Any unknown tag containing valid video URL
- Content text regex parsing (fallback)
The imeta tag structure follows NIP-92 with these properties:
["imeta",
"url", "video_url", // Primary video URL
"m", "video/mp4", // MIME type
"dim", "480x480", // Dimensions
"blurhash", "hash", // Blur hash for placeholder
"image", "thumb_url", // Thumbnail URL
"duration", "6", // Duration in seconds
"x", "sha256_hash", // File hash
"size", "12345" // File size in bytes
]
Multiple imeta tags may be used to specify different video variants (resolutions, formats).
Reposts of Kind 34236 videos use standard Kind 16 events:
{
"kind": 16,
"content": "",
"tags": [
["a", "34236:original_pubkey:d-tag-value"],
["p", "original_author_pubkey"],
["k", "34236"]
]
}- NIP-71 Compliance: Uses the official NIP-71 kind for addressable short videos
- Addressable Range (30000-39999): Allows videos to be updated/replaced using the same
dtag - Standardized: Part of the official Nostr protocol specification
- Interoperability: Compatible with other NIP-71 compliant clients
- Auto-loop Playback: Videos should automatically loop seamlessly
- Preloading: Clients should preload the next video in feeds
- Thumbnail Display: Show thumbnail until user interaction
- Attribution: Always include
["client", "divine-web"]tag
This implementation follows NIP-71 for maximum interoperability with other Nostr video clients while maintaining compatibility with existing video content.