https://github.com/thor77/rtmp2hls
Simple rtmp server with hls output
https://github.com/thor77/rtmp2hls
hls rtmp
Last synced: about 1 year ago
JSON representation
Simple rtmp server with hls output
- Host: GitHub
- URL: https://github.com/thor77/rtmp2hls
- Owner: Thor77
- License: mit
- Created: 2019-11-24T00:14:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T13:18:46.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T04:11:25.314Z (about 1 year ago)
- Topics: hls, rtmp
- Language: Go
- Homepage:
- Size: 84 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rtmp2hls
Simple rtmp server with hls output based on [joy4](https://github.com/nareix/joy4)
## Build
```
go build .
```
## Usage
```
./rtmp2hls []
```
If config path not provided, config will be read from `config.toml` in the current directory.
`.ts` segments and `.m3u8` playlist are written to the current directory.
### Streaming
Using [ffmpeg](https://ffmpeg.org/)
```
ffmpeg -i -f flv "rtmp://localhost/stream01"
```
## Configuration
| key | type | default | description |
|-----|------|---------|-------------|
| Addr | `string` | `":1935"` | RTMP server listen address |
| Key | `string` | | Expected value of `key` query parameter for connecting clients (disabled if unset) |
| MsPerSegment | `int64` | `15000` | Milliseconds of video/audio written to one segment file |
| LogLevel | `log.Level` | `"info"` | Level for the internal logger |
| HLSDirectory | `string` | `"."` | Directory to write playlist/segment files into
| BaseURL | `string` | | Base URL to use as a prefix for segment files in playlist file |