{"id":25317770,"url":"https://github.com/mrboombastic/fmradiostreamer","last_synced_at":"2025-10-28T21:30:54.987Z","repository":{"id":37893645,"uuid":"200371894","full_name":"MrBoombastic/FmRadioStreamer","owner":"MrBoombastic","description":"RPi based FM radio streamer with OLED, buttons and LEDs support.","archived":false,"fork":false,"pushed_at":"2024-10-04T21:20:11.000Z","size":15383,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T03:46:14.626Z","etag":null,"topics":["fm","radio","radio-station","raspberry-pi","raspberrypi","stream","youtube"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrBoombastic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-08-03T12:15:50.000Z","updated_at":"2024-07-09T18:52:08.000Z","dependencies_parsed_at":"2024-06-20T06:08:12.966Z","dependency_job_id":null,"html_url":"https://github.com/MrBoombastic/FmRadioStreamer","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrBoombastic%2FFmRadioStreamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrBoombastic%2FFmRadioStreamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrBoombastic%2FFmRadioStreamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrBoombastic%2FFmRadioStreamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrBoombastic","download_url":"https://codeload.github.com/MrBoombastic/FmRadioStreamer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238725865,"owners_count":19520115,"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":["fm","radio","radio-station","raspberry-pi","raspberrypi","stream","youtube"],"created_at":"2025-02-13T19:54:57.587Z","updated_at":"2025-10-28T21:30:52.974Z","avatar_url":"https://github.com/MrBoombastic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FmRadioStreamer\n\nRaspberry Pi based FM streamer with OLED, buttons and LEDs support.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/MrBoombastic/FmRadioStreamer.svg)](https://pkg.go.dev/github.com/MrBoombastic/FmRadioStreamer)\n[![CodeFactor](https://www.codefactor.io/repository/github/mrboombastic/fmradiostreamer/badge)](https://www.codefactor.io/repository/github/mrboombastic/fmradiostreamer)\n[![Go Report Card](https://goreportcard.com/badge/github.com/MrBoombastic/FmRadioStreamer)](https://goreportcard.com/report/github.com/MrBoombastic/FmRadioStreamer)\n\n## Building (optional)\n\nClone this repository, run `go get` and then `go build`. Of course, you have to install `Go` first.\n\nIf you want to build for other device (e.g. build on Windows and run on RaspberyPi), use cross-compilation!\n\nEnvironmental variables for RPi Zero: `GOOS=linux;GOARCH=arm;GOARM=5`. For other RPis, `GOARM` field may be unnecessary.\n\n## Installation\n\nBuild or copy binary from `releases` tab. Copy `install.sh` to your directory, type `chmod +x install.sh`,\nthen `sudo ./install.sh`.\n\n\u003e [!CAUTION]\n\u003e This script may install some unwanted dependencies. Review the script if you want.\n\nCopy `config.json.example`, rename to `config.json` aned edit.\n\nHere you can get your [YouTube API Key](https://developers.google.com/youtube/v3/getting-started).\n\n\u003e [!IMPORTANT]  \n\u003e You have to add `gpu_freq=250` in `/boot/firmware/config.txt` and also enable I2C in `raspi-config`.\n\n## Running\n\nRename `config.json.example` to `config.json`. Then type `sudo node index.js`. You can change RDS in `config.json` file.\nGo to API Docs section for more.\n\n## Functions\n\n- RDS and other options rendering on screen\n- LEDs blinking when everything is OK\n- Yellow LED blinking if frequency is out of limits\n- Blue LED blinking if music is being processed (downloading, converting)\n- Downloading music from YouTube\n- Changing frequency with buttons\n- Web dashboard\n\n## API docs\n\nNone. Please reverse-engineer pkg/dashboard for that. :(\n\n## Dependencies note\n\nThis project uses PiFmAdv, FFmpeg, libsndfile1-dev, youtube-dl and other stuff listed in go.mod.\n\n## Optional hardware\n\nSSD1306 screen, 4 THT buttons, ~400 Ohm resistors, ~20k Ohm resistors, LEDs, female-male and male-male wires. Tested on\nRaspberry Pi Zero W Rev 1.1.\n\n## What if I don't have that hardware?\n\nThe minimum requirement is the RaspberryPi. FmRadioStreamer SHOULD work without any other peripherals.\n\n## Gallery\n\nIn the `docs` directory there are pictures of first version of this project. Watch on your own risk!\n![Image](docs/hwv2rev2_1.jpg?raw=true \"Image\")\n![Image](docs/hwv2rev2_2.jpg?raw=true \"Image\")\n![Image](docs/dashboard_new.png?raw=true \"Dashboard screenshot\")\n![Image](docs/sdrsharp.png?raw=true \"SDR# screenshot\")\n\n## GPIO\n\n- 1 - 3V3 Power\n- 3 - GPIO 2 - screen\n- 5 - GPIO 3 - screen\n- 6 - GND - for screen\n- 7 - GPIO 4 - antenna\n- 26 - GPIO 7 - blue LED (audio conversion in progress)\n- 29 - GPIO 5 - yellow LED (frequency out of limits)\n- 31 - GPIO 6 - green LED\n- 32 - GPIO 12 - button (screen color inversion)\n- 33 - GPIO 13 - green LED\n- 35 - GPIO 19 - green LED\n- 36 - GPIO 16 - button (frequency multiplier switch)\n- 37 - GPIO 26 - green LED\n- 38 - GPIO 20 - button (frequency up)\n- 39 - GND - for LEDs\n- 40 - GPIO 21 - button (frequency down)\n\n## Which format should I choose?\n\nDownloading and converting benchmark:\n\n- Song URL: https://www.youtube.com/watch?v=SaoBbCC66I4\n- Results:\n\n| Format | Converting time | File size |\n|--------|-----------------|-----------|\n| MP3    | 6:17            | 12 431 KB |\n| WAV    | 4:20 hehe       | 6 499 KB  |\n| Opus   | 3:32            | 69 891 KB |\n\nFor pretty good audio quality, low file size and best conversion time, use Opus. If for\nsome reason you can't use Opus format and have outdated `libsndfile1-dev` package, use WAV.\nUse MP3 if you don't want to re-encode your existing music library.\n\n## MP3 support (pre-bookworm)\n\n1. Update your RPi (optional, but recommended).\n\n```bash\nsudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'\n```\n\n2. Edit `/etc/apt/sources.list` file using your favourite editor, for example `sudo vim /etc/apt/sources.list`. In my\n   case, the file looks like this:\n\n```bash\ndeb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi\n# Uncomment line below then 'apt-get update' to enable 'apt-get source'\n#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi\n```\n\nReplace `bullseye` with `bookworm`.\n\n```bash\ndeb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi\n```\n\n3. Run `sudo apt update`. It wil say that 69420 packages can be updated - ignore that.\n4. Run `sudo apt install libsndfile1-dev`. It will update only this package and its dependencies.\n5. Confirm that `libsndfile1-dev` is now version 1.1.0 or later. Run `sudo apt-cache policy libsndfile1-dev`. My output:\n\n```bash\nlibsndfile1-dev:\n  Installed: 1.1.0-2 \n(...)\n```\n\n5. Repeat step 1, but now revert `bookworm` to `bullseye`. Done. 🎉\n\n## JSON settings\n\n| Option            | Description                                                                  | Type (additional info) | Default                                  | Notes                                                                                                                      |\n|-------------------|------------------------------------------------------------------------------|------------------------|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| freq              | Frequency in MHz                                                             | number (float64)       | 108.0                                    |                                                                                                                            |\n| format            | Audio format for saved files                                                 | string                 | opus                                     | formats limited by `libsndfile1-dev` and by its version, more [here](https://libsndfile.github.io/libsndfile/formats.html) |                       | \n| multiplier        | Frequency multiplier (used when using physical buttons)                      | number (float64)       | 0.1                                      |                                                                                                                            |\n| PS                | RDS station name                                                             | string (len: 8)        | FmRadStr                                 |                                                                                                                            |\n| RT                | RDS station text                                                             | string (len: 64)       | RPi based radio streamer. It is working! |                                                                                                                            |\n| PI                | RDS station ID                                                               | string (len: 4, hex)   | FFFF                                     |                                                                                                                            |\n| TP                | RDS traffic programme                                                        | string                 | (empty string)                           | I don't know the type of this setting.                                                                                     |\n| PTY               | RDS programme type                                                           | number (uint)          | 0                                        | Warning: different meaning in EU and US! Range: 0-31.                                                                      |\n| ytApiKey          | YouTube API V3 Key                                                           | string                 | (empty string)                           |                                                                                                                            |\n| port              | Web dashboard port                                                           | number (uint16)        | 80                                       |                                                                                                                            |\n| power             | RaspberryPi output power                                                     | number (uint8)         | 5                                        | Refer to PiFmAdv for more info.                                                                                            |\n| mpx               | Mpx output power (\"volume\")                                                  | number (uint)          | 30                                       | See above.                                                                                                                 |\n| preemph           | pre-emphasis                                                                 | string                 | eu                                       | Possible values: \"eu\", \"us\".                                                                                               |\n| antennaGPIO       | GPIO antenna header                                                          | number (uint8)         | 4                                        | Possible values: 4, 20, 32, 34                                                                                             |\n| ssd1306           | OLED screen type SSD1306 enabled                                             | bool                   | true                                     |                                                                                                                            |\n| dynamicRT         | Switching RT between that saved in config and current playing audio filename | bool                   | true                                     |                                                                                                                            |\n| dynamicRTInterval | Dynamic RT switching interval in seconds                                     | number (uint)          | 20                                       |                                                                                                                            |\n| verbose           | Additional logs in console                                                   | bool                   | false                                    |                                                                                                                            |\n| ytdlp             | Check if yt-dlp is installed and install, if not                             | bool                   | true                                     | If you have yt-dlp installed and always up-to-date, set to false.                                                          |\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrboombastic%2Ffmradiostreamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrboombastic%2Ffmradiostreamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrboombastic%2Ffmradiostreamer/lists"}