# VidStr — Decentralized Video Platform **URL**: https://vidstr.shakespeare.wtf **Version**: 2026.07.13.0 **Changelog**: https://vidstr.shakespeare.wtf/changelog **Code Repository**: nostr://npub14rg4vrt2v374q95ezeeydu3hkdhmzglcj950mggacap4x0lv0gyq04wun7/git.shakespeare.diy/vidstr **Author Nostr npub**: npub14rg4vrt2v374q95ezeeydu3hkdhmzglcj950mggacap4x0lv0gyq04wun7 --- ## Description VidStr is a decentralized, censorship-resistant video sharing platform built on the Nostr protocol. It enables users to upload, share, and discover videos without central authority control. Videos are stored on Blossom servers with metadata distributed across multiple Nostr relays. --- ## Technology Stack | Layer | Technology | |---|---| | Framework | React 18.x | | Language | TypeScript | | Styling | TailwindCSS 3.x | | UI Components | shadcn/ui (Radix UI primitives) | | Routing | React Router v6 | | State / Data | TanStack Query | | Build Tool | Vite | | Nostr Library | Nostrify + @nostrify/react | | Payments | WebLN + Nostr Wallet Connect (@getalby/sdk) | | Utilities | nostr-tools v2.13+, zod, date-fns | | Storage | IndexedDB via idb | | Deployment | Static site — no backend required | --- ## Nostr Protocol Support (NIPs) | NIP | Description | |---|---| | NIP-01 | Basic protocol flow, event signing and verification | | NIP-04 | Encrypted Direct Messages (legacy AES-256-CBC) | | NIP-05 | DNS-based identity verification | | NIP-07 | Browser extension signers (Alby, nos2x, Flamingo) | | NIP-17 | Private Direct Messages with gift-wrapping (metadata protection) | | NIP-19 | Bech32-encoded identifiers (npub, note, naddr, nevent, nprofile) | | NIP-25 | Reactions (like / dislike / custom emoji on videos) | | NIP-36 | Content warnings | | NIP-31 | "alt" tag for custom event kinds | | NIP-50 | Full-text search | | NIP-51 | Lists and playlists (kind 30005) | | NIP-57 | Lightning zaps | | NIP-65 | Relay list metadata | | NIP-71 | Video events (kinds 21, 22, 34235, 34236) | | NIP-92 | Media attachments | | NIP-94 | File metadata | | NIP-96 | File storage servers | --- ## Video Events (NIP-71) NIP-71 defines four event kinds for video content. **The `url` field in an NIP-71 event MUST be a direct link to an actual video file** (e.g. an mp4, webm, or mkv file hosted on a Blossom server or similar). | Kind | Name | Type | Editable | |---|---|---|---| | 21 | Regular Horizontal Video | Regular event | No | | 22 | Regular Vertical Video | Regular event | No | | 34235 | Addressable Horizontal Video | Addressable event | Yes (requires `d` tag) | | 34236 | Addressable Vertical Video | Addressable event | Yes (requires `d` tag) | ### Legacy Format Support VidStr is backwards-compatible with older NIP-71 events that use separate top-level tags (`url`, `m`, `x`, `thumb`, `dim`, `duration`) instead of the modern `imeta` tag format. ### imeta Tag Format (Modern NIP-71) ``` ["imeta", "url https://example.com/video.mp4", "m video/mp4", "image https://example.com/thumb.jpg", "duration 120", "dim 1920x1080" ] ``` --- ## IPFS URL Handling Some NIP-71 events include `ipfs://` URIs as the video URL. VidStr automatically converts these to HTTPS URLs via the public IPFS gateway: ``` ipfs://QmFoo… → https://ipfs.io/ipfs/QmFoo… ``` A blue informational notice is shown above the video player to indicate that the video is being served through the IPFS gateway rather than a direct media URL. > **Note for publishers**: While `ipfs://` links are better than YouTube links (see > below), the recommended approach is still to use a direct HTTPS media URL hosted on > a Blossom server, so that VidStr and other clients can play the video without relying > on any specific gateway. --- ## YouTube Link Handling (NON-COMPLIANT!) Some NIP-71 events incorrectly use YouTube URLs (`youtube.com`, `youtu.be`, `yt.be`) as the video URL. **This is NOT how NIP-71 works and is strongly discouraged.** NIP-71 is a protocol for decentralised, censorship-resistant video sharing. Embedding a YouTube link completely defeats this purpose by: - Depending on a central, corporate, for-profit platform. - Being subject to YouTube's censorship, geo-blocking, and takedowns. - Exposing viewers to YouTube's tracking and advertising. - Breaking the decentralized architecture of the Nostr ecosystem. VidStr handles these malformed events gracefully by showing an embedded YouTube player **together with a prominent, unmissable warning banner** that explains the non-compliance. Supported YouTube URL patterns include: - `https://www.youtube.com/watch?v=` - `https://youtu.be/` - `https://yt.be/` - `https://www.youtube.com/embed/` - `https://www.youtube.com/shorts/` - `https://www.youtube.com/live/` - `https://m.youtube.com/watch?v=` The embed uses `www.youtube-nocookie.com` to reduce tracking. > **Publishers**: Please host your video files on a Blossom server and publish a proper > NIP-71 event with a direct mp4/webm URL. > See the NIP-71 specification: https://github.com/nostr-protocol/nips/blob/master/71.md --- ## File Storage — Blossom Protocol - Videos are uploaded to Blossom decentralized file servers. - Default upload server: `https://blossom.primal.net/` - Authentication: NIP-96 event signatures. - Content addressing: SHA-256 hashing. - Anonymous uploads are supported via ephemeral keypairs. --- ## Relay Network ### Strategy | Operation | Behaviour | |---|---| | Read | Query ALL read-enabled relays in parallel | | Write | Publish to ALL write-enabled relays | | Deduplication | Automatic by event ID | | Query limit | 100 events per relay | | Display limit | 20 events per page | | Timeout | 5 seconds per relay | ### Default Relays | URL | Purpose | |---|---| | wss://relay.damus.io | General purpose, high availability | | wss://nos.lol | Community-focused relay | | wss://relay.primal.net | Primal infrastructure | | wss://relay.snort.social | Snort relay | | wss://relay.ditto.pub | Media-focused relay | | wss://nostr.wine | Content relay | | wss://nostr.mom | Community relay | | wss://relay.mostr.pub | Bridge relay | | wss://nostr21.com | Bitcoin-focused relay | ### Search Relays (NIP-50) - wss://search.nos.today - wss://relay.noswhere.com - wss://gleasonator.dev/relay --- ## Feature List - Upload videos anonymously or with Nostr identity - Multi-relay architecture (9 default relays) - Full-text search via NIP-50 relays - Create and manage playlists (NIP-51, kind 30005) - Lightning payments (zaps) to creators - Encrypted direct messages (NIP-04 legacy and NIP-17 modern) - Like, dislike, and custom emoji reactions (NIP-25) - Comment system with nested replies - Content warnings for sensitive material (NIP-36) - Edit addressable videos (kinds 34235/34236) - Profile pages with bio and links (kind 0) - Multiple account support - Theme customization (light / dark / system) - Real-time updates via WebSocket subscriptions - Client-side encryption for privacy - IPFS URL resolution to HTTPS gateway - YouTube URL fallback player with non-compliance warning --- ## Security & Privacy | Topic | Details | |---|---| | Identity | Nostr cryptographic keypair (secp256k1) | | Event signing | Schnorr signatures | | Event verification | All events verified before display | | DM encryption (legacy) | NIP-04 AES-256-CBC | | DM encryption (modern) | NIP-44 XChaCha20-Poly1305 | | Key exchange | ECDH on secp256k1 | | File integrity | SHA-256 content addressing | | Private key storage | Browser extension signers recommended | | Data storage | Browser IndexedDB (local only) | | No tracking | No central server, no analytics | | Anonymous posting | Generate ephemeral keypairs | | Metadata protection | NIP-17 gift-wrapped DMs | | No email required | ✓ | | No KYC | ✓ | | Client-side only | ✓ | --- ## Playlists - Kind: 30005 (NIP-51) - Supported video kinds: 21, 22, 34235, 34236 - Features: Create, Edit, Delete, Add videos, Cover images, Descriptions - Reference types: `e` tags for regular events; `a` tags for addressable events --- ## Reactions - Kind: 7 (NIP-25) - Types: like (`+`), dislike (`-`), custom emoji, custom text - Max custom reaction length: 20 characters --- ## Comments - Kind: 1 (reply events with `e` and `p` tags) - Nested replies: ✓ - Real-time updates: ✓ --- ## Direct Messages | Feature | NIP-04 (Legacy) | NIP-17 (Modern) | |---|---|---| | Encryption | AES-256-CBC | XChaCha20-Poly1305 (NIP-44) | | Metadata protection | ✗ | ✓ (gift-wrapped) | | File attachments | ✓ | ✓ | | Real-time | ✓ | ✓ | --- ## User Flows ### Sign Up / Login 1. Option A: Generate new Nostr keypair 2. Option B: Connect browser extension signer (NIP-07) 3. Option C: Import existing keys (nsec or hex) 4. Option D: Use anonymously (no account) ### Upload a Video 1. Click the Upload button 2. Select a video file 3. Add metadata (title, description, hashtags) 4. Optionally add a thumbnail 5. Choose upload type (anonymous or authenticated) 6. File is uploaded to Blossom server 7. NIP-71 event is published to configured relays ### Discover Videos - **Global feed** — all videos from all configured relays - **Following feed** — videos from followed users - **Search** — full-text search via NIP-50 relays - **Hashtags** — browse by topic - **Profiles** — view a specific creator's videos --- ## Known Limitations - Content availability depends on relay uptime. - Decentralized nature means no global content moderation. - Individual relays may have their own policies. - File size limited by individual Blossom server configuration. - Multiple relay queries increase bandwidth usage. - Browser storage limited by IndexedDB quota. --- ## Roadmap - Live streaming support - Video transcoding - Subtitle support (WebVTT) - Advanced playlist features - Community features - Relay health monitoring - Improved search algorithms --- ## Browser Requirements Chrome 90+ · Firefox 88+ · Safari 14+ · Edge 90+ Requires JavaScript and WebSocket support. --- *Vibed with [Shakespeare](https://shakespeare.diy)*