diff --git a/README.md b/README.md
index 192f339..c0098a5 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@
"audio_bitrate": "128k",
"audio_sample_rate": 44100,
"output_format": "flv",
- "custom_args": ""
+ "custom_args": []
},
"output": {
"rtmp_server": "rtmp://live-push.example.com/live",
diff --git a/config/config.go b/config/config.go
index f742af1..7b7a32a 100644
--- a/config/config.go
+++ b/config/config.go
@@ -24,18 +24,18 @@ type InputItem struct {
}
type PlayConfig struct {
- VideoCodec string `json:"video_codec"`
- Preset string `json:"preset"`
- CRF int `json:"crf"`
- MaxRate string `json:"max_rate"`
- BufSize string `json:"buf_size"`
- Scale string `json:"scale"`
- FrameRate int `json:"frame_rate"`
- AudioCodec string `json:"audio_codec"`
- AudioBitrate string `json:"audio_bitrate"`
- AudioSampleRate int `json:"audio_sample_rate"`
- OutputFormat string `json:"output_format"`
- CustomArgs string `json:"custom_args"`
+ VideoCodec string `json:"video_codec"`
+ Preset string `json:"preset"`
+ CRF int `json:"crf"`
+ MaxRate string `json:"max_rate"`
+ BufSize string `json:"buf_size"`
+ Scale string `json:"scale"`
+ FrameRate int `json:"frame_rate"`
+ AudioCodec string `json:"audio_codec"`
+ AudioBitrate string `json:"audio_bitrate"`
+ AudioSampleRate int `json:"audio_sample_rate"`
+ OutputFormat string `json:"output_format"`
+ CustomArgs []string `json:"custom_args"`
}
type LogConfig struct {
diff --git a/main.go b/main.go
index 6819764..d461b53 100644
--- a/main.go
+++ b/main.go
@@ -28,8 +28,8 @@ func main() {
GlobalStreamer = streamer.NewStreamer(config.GlobalConfig.VideoList)
go startWatcher()
go input()
- GlobalStreamer.Stream()
- GlobalStreamer.Close()
+ GlobalStreamer.Start()
+ select {}
}
func input() {
diff --git a/server/static/index.html b/server/static/index.html
index 3c28ea8..7b6b98f 100644
--- a/server/static/index.html
+++ b/server/static/index.html
@@ -367,6 +367,7 @@