An open API service indexing awesome lists of open source software.

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

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 |