diff --git a/config.toml b/config.toml index ba272f5..201a205 100644 --- a/config.toml +++ b/config.toml @@ -8,6 +8,7 @@ disk_ram = true mode=false [mp4] record=true +split_interval_ms=3000 [ebml] record=false diff --git a/config/config.go b/config/config.go index cb3cfdb..c7cae5b 100644 --- a/config/config.go +++ b/config/config.go @@ -25,7 +25,8 @@ type DockerConfig struct { } type MP4 struct { - Record bool `mapstructure:"record"` + Record bool `mapstructure:"record"` + SplitIntervalMS int `mapstructure:"split_interval_ms"` } type EBML struct { diff --git a/main.go b/main.go index 198ff81..411f064 100644 --- a/main.go +++ b/main.go @@ -139,7 +139,7 @@ func main() { if conf.MP4.Record { starters = append(starters, mp4.NewMP4(mp4.MP4Args{ Hub: sourceHub, - SplitIntervalMS: 3000, + SplitIntervalMS: int64(conf.MP4.SplitIntervalMS), })) }