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: @@ -20,7 +20,7 @@ Simple and efficient live broadcast server:
#### Supported encoding formats
- H264
- AAC
- sMP3
- MP3
## Installation
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: @@ -48,8 +48,9 @@ Usage of ./livego:
--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:
3. Get a channelkey `curl http://localhost:8090/control/get?room=movie` and copy data like your channelkey.
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`
-`FLV`:`http://127.0.0.1:7001/live/movie.flv`
-`HLS`:`http://127.0.0.1:7002/live/movie.m3u8`

4
configure/liveconfig.go

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

2
livego.yaml

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

Loading…
Cancel
Save