Browse Source

Default config like example in the readme

pull/90/head
Ruben Cid 6 years ago
parent
commit
11761cac58
  1. 7
      README.md
  2. 4
      configure/liveconfig.go
  3. 2
      livego.yaml

7
README.md

@ -20,7 +20,7 @@ Simple and efficient live broadcast server:
#### Supported encoding formats #### Supported encoding formats
- H264 - H264
- AAC - AAC
- sMP3 - MP3
## Installation ## Installation
After directly downloading the compiled [binary file](https://github.com/gwuhaolin/livego/releases), execute it on the command line. After directly downloading the compiled [binary file](https://github.com/gwuhaolin/livego/releases), execute it on the command line.
@ -48,8 +48,9 @@ Usage of ./livego:
--write_timeout int write time out (default 10) --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; 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; 3. Get a channelkey `curl http://localhost:8090/control/get?room=movie` and copy data like your channelkey.
4. Downstream playback: The following three playback protocols are supported, and the playback address is as follows: 4. Upstream push: Push the video stream to `rtmp://localhost:1935/live/movie`(`rtmp://localhost:1935/{appname}/{channelkey}`) through the` RTMP` protocol, for example, use `ffmpeg -re -i demo.flv -c copy -f flv rtmp://localhost:1935/live/movie` push;
5. Downstream playback: The following three playback protocols are supported, and the playback address is as follows:
-`RTMP`:`rtmp://localhost:1935/live/movie` -`RTMP`:`rtmp://localhost:1935/live/movie`
-`FLV`:`http://127.0.0.1:7001/live/movie.flv` -`FLV`:`http://127.0.0.1:7001/live/movie.flv`
-`HLS`:`http://127.0.0.1:7002/live/movie.m3u8` -`HLS`:`http://127.0.0.1:7002/live/movie.m3u8`

4
configure/liveconfig.go

@ -65,7 +65,7 @@ var defaultConf = ServerCfg{
ReadTimeout: 10, ReadTimeout: 10,
GopNum: 1, GopNum: 1,
Server: []Application{{ Server: []Application{{
Appname: "livego", Appname: "live",
Live: true, Live: true,
Hls: true, Hls: true,
StaticPush: nil, StaticPush: nil,
@ -108,7 +108,7 @@ func LoadConfig() {
Config.AddConfigPath(".") Config.AddConfigPath(".")
err := Config.ReadInConfig() err := Config.ReadInConfig()
if err != nil { if err != nil {
log.Error(err) log.Warning(err)
log.Info("Using default config") log.Info("Using default config")
} }

2
livego.yaml

@ -17,6 +17,6 @@
# api_addr: ":8090" # api_addr: ":8090"
server: server:
- appname: livego - appname: live
live: true live: true
hls: true hls: true

Loading…
Cancel
Save