Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tabmk/ffmpeg-stream-radio
Endless stream radio like "lofi hip hop"
https://github.com/tabmk/ffmpeg-stream-radio
ffmpeg hacktoberfest stream
Last synced: 4 months ago
JSON representation
Endless stream radio like "lofi hip hop"
- Host: GitHub
- URL: https://github.com/tabmk/ffmpeg-stream-radio
- Owner: TABmk
- License: mit
- Created: 2020-09-06T15:29:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T16:10:19.000Z (over 4 years ago)
- Last Synced: 2024-10-14T19:26:31.390Z (4 months ago)
- Topics: ffmpeg, hacktoberfest, stream
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 12
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
#### Endless stream radio like "lofi hip hop"
### Usage
Install `ffmpeg` and `mbuffer`
```
sudo apt update
sudo apt install ffmpeg mbuffer -y
```Edit variables in `stream.sh` and run it
- `MUSIC_FOLDER` music folder
- `VIDEO` background video
- `RTMP_SERVERS` rtmp servers for stream. You can add extra server by appending `|[f=flv]rtmp://server2` to stringRun `sh stream.sh`
#### RTMP_SERVERS
**Youtube**: https://www.youtube.com/live_dashboard
Example: `rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx`
**vk.com**: https://vk.com/video
Example: `rtmp://stream2.vkuserlive.com:443/vlive.123.XXXXXXX/KEY`
**Twitch**: https://stream.twitch.tv/ingests
Example: `rtmp://live-hel.twitch.tv/app/{stream_key}`
### How it works
This bash-script is endless loop. Each iteration gets random file from `MUSIC_FOLDER` and with help of ffmpeg piping it to 20M buffer. Then buffer from `mbuffer` piping music to main `ffmpeg` process.
Video input for `ffmpeg` is `VIDEO`, audio input is pipe from buffer. Output is 1080p/30FPS stream to `RTMP_SERVERS`
### TODO
- [ ] check loop leaks
- [ ] check ffmpeg settings
- [ ] optimization