name: nostr-video-publisher description: Use when an AI agent needs to create, upload, transcode, sign, or publish Nostr video events for NosTube or compatible Nostr video clients. Covers kind 34235/34236 event structure, imeta tags, Blossom uploads and mirrors, BUD-10 PATCH chunked upload, subtitles, thumbnails, origin tags, nak publishing, and ffmpeg transcode guidance. metadata: short-description: Publish NosTube-compatible Nostr video events
Nostr Video Publisher
Use this skill when creating or editing Nostr video posts for NosTube-compatible clients.
Workflow
- Prepare media: inspect codec, duration, dimensions, bitrate, file size, thumbnail, subtitles, and external origin references.
- Transcode if needed: prefer broadly playable MP4/H.264 + AAC; optionally create a 480p fallback or HLS. See Transcode and Upload.
- Upload blobs to Blossom: upload video variants, thumbnail, and subtitles. Keep returned
url,sha256,size, andtype. - Build a NIP-71 addressable video event:
- kind
34235for normal videos - kind
34236for shorts/vertical-first videos - one
imetatag per video variant
- kind
- Sign and publish to write relays. Use exact JSON plus
nak sign ... | nak req -w ...if no project publisher is available. - Optionally publish kind
1063file metadata events for mirrored blobs.
Required Event Shape
The event must have:
content: description textcreated_at: current publish timestamptags:["d", "<stable-identifier>"]["title", "<video title>"]["alt", "<description/accessibility text>"]["published_at", "<unix seconds>"]["duration", "<seconds>"]- at least one
imetatag containingurl,m, and ideallyx,size,dim,image ["L", "ISO-639-1"],["l", "<language>", "ISO-639-1"]["client", "nostube"]when publishing as NosTube-compatible output
Load Event Reference for exact tag schema, examples, and parsing compatibility notes.
NosTube Conventions
- Determine kind from the first publishable variant: portrait/vertical (
height > width) becomes34236; otherwise use34235. - Use
das the addressable identifier. Keep it stable for edits/replacements. - Use multiple
imetatags for variants, not multiple URLs in oneimetaunless they are fallbacks for the same variant. - Put thumbnail URLs in every video
imetaas repeatedimage <url>values. Put thumbnail blurhash inblurhash <value>when available. - Use
fallback <url>for alternate Blossom/mirror URLs. NosTube also parses oldmirror <url>, but new events should emitfallback. - Use
text-tracktags for subtitles:["text-track", "<vtt-or-srt-url>", "<iso-639-1>"]. - Add origin tags for imported media:
["r", "<source-url>"]plus["origin", "<platform>", "<external-id>", "<source-url>"]for known platforms. - Add people as
["p", "<pubkey>", "<relay-hint-if-known>"].
Publishing With nak
Prefer project helpers when working inside NosTube. For standalone agents, write exact event JSON first because imeta is a multi-value tag and shell tag flags can accidentally split it into invalid separate tags.
nak sign --sec "$NSEC" event.json | nak req -w "$RELAY"
Check the installed nak sign --help/nak event --help syntax before scripting; preserve the JSON tag arrays byte-for-byte.
Quality Checklist
Before publishing:
- Video URL opens with
HEADorGET, returns the expected MIME type, and has stable CORS behavior. xis the lower-case SHA-256 of the exact uploaded file.sizeis bytes, not MB.dimisWIDTHxHEIGHT.durationis seconds, rounded or integer-like.- Thumbnail is uploaded and referenced through
image. - For large files, Blossom upload either uses regular
PUT /uploador BUD-10PATCH /uploadafterOPTIONS /uploadcapability negotiation. - Publish to the user's write relays and any relevant video relays.
References
- Event Reference: complete event schema,
imeta, subtitles, origins, mirror announcements, JSON examples. - Transcode and Upload: ffmpeg recipes, Blossom PUT/PATCH/mirror flows, Nostr auth notes, and CLI-oriented steps.