{"id":23064634,"url":"https://github.com/laurawebdev/stream-radio","last_synced_at":"2025-10-19T16:35:02.434Z","repository":{"id":263821422,"uuid":"891490866","full_name":"LauraWebdev/stream-radio","owner":"LauraWebdev","description":"A WIP 24/7 livestream radio toolset","archived":false,"fork":false,"pushed_at":"2024-11-20T12:47:16.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-02-08T21:48:23.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LauraWebdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T12:35:48.000Z","updated_at":"2024-12-06T10:05:34.000Z","dependencies_parsed_at":"2024-11-20T13:43:27.626Z","dependency_job_id":"fc0875e1-dbe8-4d9d-a12c-7eb9ab0da641","html_url":"https://github.com/LauraWebdev/stream-radio","commit_stats":null,"previous_names":["laurawebdev/stream-radio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraWebdev%2Fstream-radio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraWebdev%2Fstream-radio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraWebdev%2Fstream-radio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraWebdev%2Fstream-radio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LauraWebdev","download_url":"https://codeload.github.com/LauraWebdev/stream-radio/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961932,"owners_count":20861188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T04:19:07.946Z","updated_at":"2025-10-19T16:35:02.336Z","avatar_url":"https://github.com/LauraWebdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stream Radio\nA WIP 24/7 livestream radio toolset\n\n## Inspiration\nMain inspiration for this project comes from torch2424's [live-stream-radio](https://github.com/torch2424/live-stream-radio), a project I have been contributing for in 2018. Since then, devices got more powerful and toolsets evolved. This project aims to fill the same spot live-stream-radio left, written from the ground up with more streamlined and extended customization options.\n\n## Getting Started\n1. Clone this repo\n2. Run `npm install`\n3. Create a `config.json` file based on the example below within `radio/` and fill it out\n4. Place a valid mp4 video file under `radio/video/video.mp4`\n5. Place your mp3 music files under `radio/audio/`\n6. Run `node .`\n\n## Features\n- [x] Endless streaming\n- [x] Video loop\n- [x] Random music shuffle\n- [x] Dynamic text overlays\n- [x] Basic CLI status output\n- [ ] Image overlays\n- [ ] Repetition guardrails\n- [ ] Logging options (verbosity, logfile)\n- [ ] Custom fonts\n- JSON API\n  - [X] Auth\n  - [X] Current Song Info\n  - [ ] Stream Info\n  - [ ] Skip Song Action\n  - [ ] Stop Radio Action\n\n## Config Documentation\n| Key                                  | Type                   | Variables                                                               | Description                                                                             |\n|--------------------------------------|------------------------|-------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n| stream.url                           | `string`               | {{key}} =\u003e stream.key                                                   | The URL to your rtmp stream.                                                            |\n| stream.key                           | `string`               |                                                                         | A stream key for your stream.                                                           |\n| stream.width                         | `number`               |                                                                         | Output width in pixels, eg: 1280                                                        |\n| stream.height                        | `number`               |                                                                         | Output height in pixels, eg: 720                                                        |\n| stream.fps                           | `number`               |                                                                         | Output fps, eg: 30                                                                      |\n| stream.videobitrate                  | `string`               |                                                                         | Output video bitrate, eg: 6000k                                                         |\n| stream.audiobitrate                  | `string`               |                                                                         | Output audio bitrate, eg: 128k                                                          |\n| stream.audiosamplerate               | `number`               |                                                                         | Output audio samplerate, eg: 44100                                                      |\n| paths.audio                          | `string`               |                                                                         | Path relative to index.js for your mp3 files                                            |\n| paths.video                          | `string`               |                                                                         | Path relative to index.js for your mp4 file                                             |\n| overlay.texts[]                      | `array`                |                                                                         | An array of text overlays                                                               |\n| overlay.texts[].x                    | `number`               |                                                                         | Horizontal position from left, padding is not included                                  |\n| overlay.texts[].y                    | `number`               |                                                                         | Vertical position from top, padding is not included                                     |\n| overlay.texts[].format               | `string`               | {{title}} =\u003e Current song title,\u003cbr/\u003e {{artist}} =\u003e current song artist | Text template                                                                           |\n| overlay.texts[].font.size            | `number`               |                                                                         | Text size, eg: 24                                                                       |\n| overlay.texts[].font.color           | `string`               |                                                                         | Text color, eg: white                                                                   |\n| overlay.texts[].font.opacity         | `number`               |                                                                         | Text opacity in the range of 0.0 to 1.0, eg: 0.6                                        |\n| overlay.texts[].background.color     | `string`               |                                                                         | (Optional) Background color, eg: white                                                  |\n| overlay.texts[].background.opacity   | `number`               |                                                                         | (Optional) Background opacity in the range of 0.0 to 1.0, eg: 0.6                       |\n| overlay.texts[].background.padding[] | `array[number,number]` |                                                                         | (Optional) Background padding, first number is y, second is x                           |\n| intermission.enabled                 | `boolean`              |                                                                         | (Unused) Whether intermissions are enabled                                              |\n| intermission.path                    | `string`               |                                                                         | (Unused) Path relative to index.js to the mp4 video file used for intermissions         |\n| intermission.frequency               | `number`               |                                                                         | (Unused) The amount of songs needed to play the intermission, eg: 5                     |\n| api.enabled                          | `boolean`              |                                                                         | Whether the API is enabled                                                              |\n| api.port                             | `number`               |                                                                         | (Optional) The port used by the API. Defaults to 3000 if not set                        |\n| api.key                              | `string`               |                                                                         | (Optional) The key required for API requests, if not set, no authentication is required |\n\n## Intermissions\n\u003e [!NOTE]\n\u003e Intermissions are currently in development\n\n## API\n\u003e [!NOTE]\n\u003e The API is currently in development\n\nThe JSON api is available on the port set in your `config.json` or `3000`.\n\n### GET `/` - System Status\nGenerally returns `{ \"status\": 200 }` if the API is available.\n\n### GET `/current` - Current Song Info\nReturns information about the current song\n\n#### Example return\n```json\n{\n    \"playing\": false\n}\n```\n```json\n{\n    \"playing\": true,\n    \"title\": \"Poison Jam (Part II)\",\n    \"artist\": \"2 Mello\",\n    \"duration\": 228.466939,\n    \"current\": 144.32682923226474\n}\n```\n\n## Example Config\n```json\n{\n  \"stream\": {\n    \"url\": \"rtmp://a.rtmp.youtube.com/live2/{{key}}\",\n    \"key\": \"YOUR-STREAM-KEY-HERE\",\n    \"width\": 1280,\n    \"height\": 720,\n    \"fps\": 30,\n    \"videobitrate\": \"6000k\",\n    \"audiobitrate\": \"128k\",\n    \"audiosamplerate\": 44100\n  },\n  \"paths\": {\n    \"audio\": \"../radio/audio\",\n    \"video\": \"../radio/video\"\n  },\n  \"overlay\": {\n    \"texts\": [\n      {\n        \"x\": 65,\n        \"y\": 65,\n        \"format\": \"Stream Radio Test\",\n        \"font\": {\n          \"size\": 16,\n          \"color\": \"white\",\n          \"opacity\": 1.0\n        },\n        \"background\": {\n          \"color\": \"black\",\n          \"opacity\": 1.0,\n          \"padding\": [15, 15]\n        }\n      },\n      {\n        \"x\": 65,\n        \"y\": 570,\n        \"format\": \"{{title}}\",\n        \"font\": {\n          \"size\": 24,\n          \"color\": \"white\",\n          \"opacity\": 1.0\n        },\n        \"background\": {\n          \"color\": \"black\",\n          \"opacity\": 1.0,\n          \"padding\": [15, 15]\n        }\n      },\n      {\n        \"x\": 65,\n        \"y\": 615,\n        \"format\": \"{{artist}}\",\n        \"font\": {\n          \"size\": 18,\n          \"color\": \"white\",\n          \"opacity\": 0.8\n        },\n        \"background\": {\n          \"color\": \"black\",\n          \"opacity\": 1.0,\n          \"padding\": [15, 15]\n        }\n      }\n    ]\n  },\n  \"intermission\": {\n    \"enabled\": false,\n    \"path\": \"../radio/intermission.mp4\",\n    \"frequency\": 5\n  },\n  \"api\": {\n    \"enabled\": false,\n    \"port\": 3000,\n    \"key\": \"API-KEY-HERE\"\n  }\n}\n```\n\n## License\nThis project was licensed under the GNU General Public license version 3.\n\n[More information](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurawebdev%2Fstream-radio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurawebdev%2Fstream-radio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurawebdev%2Fstream-radio/lists"}