Compare commits

...

13 Commits

Author SHA1 Message Date
Schlaus Kwab 07aa0db973
Merge f5ce18a686 into 7dec812f99 2025-08-12 17:50:16 +02:00
Awiteb 7dec812f99
nip22: fix example type for external URL (#2011) 2025-08-11 17:26:05 -04:00
Yoji Shidara 739f3c5263
NIP-24: Fix heading levels (#2009) 2025-08-11 19:37:53 +09:00
Yoji Shidara 8830525250
NIP-21: Fix markup issue by closing backtick (#2008) 2025-08-11 19:35:36 +09:00
zeSchlausKwab f5ce18a686 Add 'g' tag for geohash in XX.md to enhance geographical precision in stream object specifications and discovery requirements. 2025-07-18 14:38:44 +02:00
zeSchlausKwab 3ec79b5baf Remove 'location' tag from XX.md to simplify geographical discovery requirements and enhance document clarity. 2025-07-18 14:36:58 +02:00
zeSchlausKwab 5a94e5ea45 Remove rationale and overview sections from XX.md to streamline the document and focus on the core specifications of the radio station events. 2025-07-18 14:34:50 +02:00
zeSchlausKwab b4e7f21446 Update language tag in XX.md from 'language' to 'l' for consistency and clarity in stream object specifications. 2025-07-18 14:28:50 +02:00
zeSchlausKwab 9dbc3e6cbe Update reference from NIP-25 to NIP-22 in XX.md for accurate comment protocol documentation. 2025-07-18 14:26:10 +02:00
zeSchlausKwab 15f81522a9 Update 'd' tag requirements in XX.md for improved stability and clarity; change example value to a random identifier and clarify default behavior. 2025-07-18 14:24:40 +02:00
zeSchlausKwab 371fffeea4 Remove privacy, security, backwards compatibility sections, and conclusion from XX.md to streamline content and focus on essential specifications. 2025-07-18 14:19:48 +02:00
zeSchlausKwab e1a3228486 Remove 'client' tag from stream object requirements in XX.md for clarity and privacy considerations. 2025-07-18 14:18:15 +02:00
zeSchlausKwab cbae73be9c nostr internet radio 2025-07-17 18:19:34 +02:00
4 changed files with 157 additions and 13 deletions

2
21.md
View File

@ -21,7 +21,7 @@ The identifiers that come after are expected to be the same as those defined in
### Linking HTML pages to Nostr entities
`<link>` tags with `rel="alternate"` can be used to associate webpages to Nostr events, in cases where the same content is served via the two mediums (for example, a web server that exposes Markdown articles both as HTML pages and as `kind:30023' events served under itself as a relay or through some other relay). For example:
`<link>` tags with `rel="alternate"` can be used to associate webpages to Nostr events, in cases where the same content is served via the two mediums (for example, a web server that exposes Markdown articles both as HTML pages and as `kind:30023` events served under itself as a relay or through some other relay). For example:
```
<head>

8
22.md
View File

@ -143,13 +143,13 @@ A comment on a website's url looks like this:
"tags": [
// referencing the root url
["I", "https://abc.com/articles/1"],
// the root "kind": for an url, the kind is its domain
["K", "https://abc.com"],
// the root "kind": for an url
["K", "web"],
// the parent reference (same as root for top-level comments)
["i", "https://abc.com/articles/1"],
// the parent "kind": for an url, the kind is its domain
["k", "https://abc.com"]
// the parent "kind": for an url
["k", "web"]
]
// other fields
}

13
24.md
View File

@ -8,8 +8,7 @@ Extra metadata fields and tags
This NIP keeps track of extra optional fields that can added to events which are not defined anywhere else but have become _de facto_ standards and other minor implementation possibilities that do not deserve their own NIP and do not have a place in other NIPs.
kind 0
======
### kind 0
These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events:
@ -19,24 +18,22 @@ These are extra fields not specified in NIP-01 that may be present in the string
- `bot`: a boolean to clarify that the content is entirely or partially the result of automation, such as with chatbots or newsfeeds.
- `birthday`: an object representing the author's birth date. The format is { "year": number, "month": number, "day": number }. Each field MAY be omitted.
### Deprecated fields
#### Deprecated fields
These are fields that should be ignored or removed when found in the wild:
- `displayName`: use `display_name` instead.
- `username`: use `name` instead.
kind 3
======
### kind 3
These are extra fields not specified in NIP-02 that may be present in the stringified JSON of follow events:
### Deprecated fields
#### Deprecated fields
- `{<relay-url>: {"read": <true|false>, "write": <true|false>}, ...}`: an object of relays used by a user to read/write. [NIP-65](65.md) should be used instead.
tags
====
### tags
These tags may be present in multiple event kinds. Whenever a different meaning is not specified by some more specific NIP, they have the following meanings:

147
XX.md Normal file
View File

@ -0,0 +1,147 @@
# NIP-XX
## Internet Radio
`draft` `optional`
This NIP defines a standard for publishing and discovering internet radio stations on Nostr, enabling decentralized radio station directories, streaming metadata, social features, and interoperability between radio applications.
## Radio Station Events
Radio stations are published as addressable events of `kind:31237`. These events contain streaming URLs, metadata, and technical specifications needed for playback.
### Event Structure
```json
{
"kind": 31237,
"content": "<JSON metadata>",
"tags": [
["d", "<station-identifier>"],
["name", "<station-name>"],
["t", "<genre>"],
["l", "<ISO-639-1-code>"],
["countryCode", "<ISO-3166-2-code>"],
["location", "<human-readable-location>"],
["g", "<geohash>"],
["thumbnail", "<image-url>"],
["website", "<station-website>"]
]
}
```
### Content Format
The `content` field MUST contain a JSON string with the following structure:
```json
{
"description": "Station description with **markdown** support",
"streams": [
{
"url": "https://stream.example.com/radio.mp3",
"format": "audio/mpeg",
"quality": {
"bitrate": 128000,
"codec": "mp3",
"sampleRate": 44100
},
"primary": true
}
],
"streamingServerUrl": "https://server.example.com"
}
```
#### Required Fields
- `description`: Human-readable description (markdown supported)
- `streams`: Array of stream objects (minimum one required)
#### Optional Fields
- `streamingServerUrl`: Base URL of the streaming server (needed for metadata endpoints when using typical streaming servers like Icecast that provide `/status-json.xsl`, `/admin/stats`, or similar metadata APIs)
#### Stream Object
Each stream object MUST include:
- `url`: Direct URL to the audio stream
- `format`: MIME type (e.g., "audio/mpeg", "audio/aac")
- `quality`: Object with `bitrate`, `codec`, and `sampleRate`
- `primary`: Boolean indicating the default stream (optional)
### Required Tags
- `d`: Unique identifier for the station (used for addressability)
- `name`: Human-readable station name
### Recommended Tags
- `t`: Genre/category tags (multiple allowed)
- `l`: ISO 639-1 language codes (multiple allowed)
- `countryCode`: ISO 3166-2 country code
- `location`: Human-readable location string
- `g`: Geohash for precise geographical coordinates
- `thumbnail`: Station logo/image URL
- `website`: Station's official website
### Example
```json
{
"kind": 31237,
"pubkey": "a1b2c3d4...",
"created_at": 1690000000,
"content": "{\"description\":\"Eclectic mix of jazz, world music, and electronic sounds from France.\",\"streams\":[{\"url\":\"https://icecast.radiofrance.fr/fiprock-hifi.aac\",\"format\":\"audio/aac\",\"quality\":{\"bitrate\":128000,\"codec\":\"aac\",\"sampleRate\":44100},\"primary\":true}]}",
"tags": [
["d", "a7f9d2e1b8c3"],
["name", "FIP Radio"],
["t", "jazz"],
["t", "world"],
["t", "electronic"],
["l", "fr"],
["countryCode", "FR"],
["location", "Paris, France"],
["g", "u09tvw0"],
["thumbnail", "https://example.com/fip-logo.png"],
["website", "https://www.radiofrance.fr/fip"]
]
}
```
## Social Features
Radio stations can leverage existing Nostr social protocols:
### Live Chat Messages
Real-time chat during radio streaming uses existing live chat protocols such as [NIP-53](53.md). Messages should reference the radio station via `a` tag to associate chat with the specific station.
### Station Comments
Persistent discussion threads use existing comment protocols such as [NIP-22](22.md). Comments should reference the radio station event to create threaded discussions about stations.
## Implementation Notes
### Station Identification
- The `d` tag value SHOULD be a random identifier to ensure stability over time
- If no `d` tag is present, it defaults to an empty string
- Multiple stations can be published by the same pubkey using different `d` tags
### Streaming Compatibility
- Support multiple stream formats for broader client compatibility
- Include quality metadata to enable adaptive streaming
- Mark one stream as `primary` for default selection
### Content Indexing
- Use `t` tags for genre/category filtering
- Include `l` tags for internationalization
- Add `g` tags with geohash for precise geographical discovery
## Reference Implementation
A reference implementation is available at [WaveFunc](https://github.com/zeSchlausKwab/wavefunc), demonstrating station publishing, favorites management, and social features.