-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build, usage and configuration instructions
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
# rtmp2hls | ||
Simple rtmp server with hls output based on [joy4](https://github.com/nareix/joy4) | ||
|
||
## Build | ||
``` | ||
go build . | ||
``` | ||
|
||
## Usage | ||
``` | ||
./rtmp2hls [<path to config file>] | ||
``` | ||
If config path not provided, config will be read from `config.toml` in the current directory. | ||
|
||
`<streamname><segment index>.ts` segments and `<streamname>.m3u8` playlist are written to the current directory. | ||
|
||
### Streaming | ||
Using [ffmpeg](https://ffmpeg.org/) (assuming `Key` set to `key`) | ||
``` | ||
ffmpeg -i <input file> -f flv "rtmp://localhost/stream01?key=key" | ||
``` | ||
|
||
## Configuration | ||
| key | type | default | description | | ||
|-----|------|---------|-------------| | ||
| Addr | `string` | `":1935"` | RTMP server listen address | | ||
| Key | `string` | | Expected value of `key` query parameter for connecting clients | | ||
| MsPerSegment | `int64` | `15000` | Milliseconds of video/audio written to one segment file | | ||
| LogLevel | `log.Level` | `"info"` | Level for the internal logger | |