https://github.com/connerdouglass/livestream-rtmp
Live streaming RTMP server with realtime HLS playback
https://github.com/connerdouglass/livestream-rtmp
Last synced: 2 months ago
JSON representation
Live streaming RTMP server with realtime HLS playback
- Host: GitHub
- URL: https://github.com/connerdouglass/livestream-rtmp
- Owner: connerdouglass
- Created: 2021-09-18T15:14:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-18T15:14:59.000Z (over 3 years ago)
- Last Synced: 2025-03-18T01:51:29.301Z (3 months ago)
- Language: Go
- Size: 70.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# livestream-rtmp
Live streaming RTMP server written in Go.
This server accepts inbound RTMP connections (from apps like OBS), and then serves the uploaded media to viewers as HLS in realtime.
## Development
To develop this project locally, you'll need to have Go 1.16 or newer installed on your local machine.In the root directory of the project, create a file named `.env` with the following contents:
```env
API_PASSCODE=3454f56ygfdsertyuio076rseryui76
```These are just example values. The passcode can be any string, as long as it matches the passcode required by the `livestream-api` server you're running.
Once you've got a `.env` file, just run this to start the server:
```sh
go run .
```## Streaming via RTMP
To stream into the RTMP server, you first need to have a stream ready-to-go on your `livestream-api` database. Then, take the **stream key** associated with your stream, and point your OBS stream to this URL:
```
rtmp://127.0.0.1/
```## Playback via HLS (HTTP Live Streaming)
When you created your stream on the `livestream-api`, your stream was given an **identifier** value. The identifier is public (unlike the stream key), and you'll need this to view your stream.
By default, in development mode, you can view your stream at this URL:
```
https://127.0.0.1:8081/play/
```## Notes
You need a running `livestream-api` instance in order for this RTMP server to run correctly. Make sure you've set that up and it's working first.