{"id":"70565d5ce490f611a0fffc2085d2a4a01ec4e75857959e911926b58416c10c57","pubkey":"de7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645","created_at":1748799104,"kind":30817,"tags":[["d","sharing-m3u-playlists-via-event-content"],["title","Sharing .m3u Playlists via Event Content"],["client","nostrnips.com"]],"content":"# NIP-XX — Sharing `.m3u` Playlists via Event Content\n\n**Author:** Melvin Carvalho\n**Status:** Draft\n**Type:** Standard\n**Created:** 2025-05-30\n**License:** Public Domain\n\n---\n\n## Abstract\n\nThis NIP proposes a convention for embedding `.m3u` (or `.m3u8`) playlist data directly in the content field of a Nostr event, enabling lightweight media playlist sharing and interoperability across Nostr clients.\n\n---\n\n## Motivation\n\nMusic and media curation is a core part of internet culture. By supporting `.m3u` playlists in Nostr events, clients can display or play a stream of media from a user without additional protocol complexity. It enables community radio, shared mixtapes, curated video queues, and more — all within Nostr's existing event model.\n\n---\n\n## Event Kind\n\nThis NIP recommends a new kind value:\n\n- `32100` — M3U Playlist Event (ephemeral or persistent)\n\n> Alternatively, clients MAY use a generic kind (e.g. `1`) if playlists are mixed with textual commentary.\n\n---\n\n## Content Format\n\nThe `content` field MUST contain a valid `.m3u` or `.m3u8` text format. Clients SHOULD treat it as UTF-8. It MAY begin with `#EXTM3U` and include lines of metadata and media URLs.\n\n### Example\n\n```json\n{\n  \"kind\": 32100,\n  \"content\": \"#EXTM3U\\n#EXTINF:123, Sample artist - Sample title\\nhttp://www.example.com/music/sample.mp3\\n#EXTINF:321, Another track\\nhttps://ipfs.io/ipfs/QmExample\",\n  \"tags\": [\n    [\"d\", \"lofi-mixtape\"],\n    [\"alt\", \"M3U playlist\"]\n  ]\n}\n```\n\n---\n\n## Tags\n\nThe following tags are RECOMMENDED:\n\n- `d` (descriptor): A short name or label for the playlist.\n- `alt`: Human-readable description.\n- `t` (optional): Tags/keywords (e.g. genre).\n- `u` (optional): Source URL if playlist is mirrored elsewhere (e.g. NosDAV, Blossom, HTTP).\n\n---\n\n## Client Behavior\n\nClients that support this NIP:\n\n- MAY detect if the content is valid `.m3u` and render a \"Play Playlist\" button or embedded player.\n- SHOULD sanitize and filter URLs before autoplaying.\n- MAY cache or prefetch media responsibly.\n- MAY provide export options to `.m3u` files.\n- MAY expand nevent strings.\n\n---\n\n## Extensions\n\n- **Live updates**: Combine with other kinds for real-time, collaborative playlist editing.\n- **IPTV**: Compatible with IPTV\n\n---\n\n## Security Considerations\n\n- Clients MUST validate and sandbox media URLs to avoid unsafe redirects or autoplay abuse.\n- Events SHOULD NOT be used to store large media files directly; only references (e.g. URLs or IPFS hashes) are recommended.\n- Respect copyright and licensing of referenced media.\n\n---\n\n## Compatibility\n\nThis format is compatible with `.m3u`-aware players and can be exported for use in VLC, Winamp, and web-based streamers. Clients without media support will still display the raw text or a download link.\n\n---\n\n## Copyright\n\nThis NIP is released into the public domain.","sig":"ca98b1d95ec6044454b8de72b1203aadfc3965885b5786a939f2db0d5494b4a1370ed79d20b29fb593f99caa1127f329381618aa33479c41f24d5485929a5865"}