diff --git a/CHANGELOG.md b/CHANGELOG.md index ed6243af..460529fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,3 +48,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Using method `.Get(queryParamName)` to get an url query param. - Replaced `errors.New(...)` to `fmt.Errorf(...)`. - Replaced types string on config params `liveon` and `hlson` to booleans `live: true/false` and `hls: true/false` +- Using viper for config, allow use file, cloud providers, environment vars or flags. +- Using yaml config by default. diff --git a/README.md b/README.md index a9e01602..15cdfc25 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,24 @@ Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -d --name livego gwuhaoli #### Compile from source 1. Download the source code `git clone https://github.com/gwuhaolin/livego.git` -2. Go to the livego directory and execute `go build` or `make run` +2. Go to the livego directory and execute `go build` or `make build` ## Use -2. Start the service: execute the livego binary file to start the livego service; +```bash +./livego -h +Usage of ./livego: + --api_addr string HTTP manage interface server listen address (default ":8090") + --config_file string configure filename (default "livego.yaml") + --flv_dir string output flv file at flvDir/APP/KEY_TIME.flv (default "tmp") + --gop_num int gop num (default 1) + --hls_addr string HLS server listen address (default ":7002") + --httpflv_addr string HTTP-FLV server listen address (default ":7001") + --level string Log level (default "info") + --read_timeout int read time out (default 10) + --rtmp_addr string RTMP server listen address (default ":1935") + --write_timeout int write time out (default 10) +``` +2. Start the service: execute the livego binary file or `make run` to start the livego service; 3. Upstream push: Push the video stream to `rtmp://localhost:1935/live/movie` through the` RTMP` protocol, for example, use `ffmpeg -re -i demo.flv -c copy -f flv rtmp://localhost:1935/live/movie` push; 4. Downstream playback: The following three playback protocols are supported, and the playback address is as follows: -`RTMP`:`rtmp://localhost:1935/live/movie`