From 1a5c7b331ff0c7c91ac9bb842855f1e56bbfac59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EA=B2=BD=EC=88=98?= Date: Sun, 20 Jul 2025 19:02:39 +0900 Subject: [PATCH] feat: mp4 interval config --- config.toml | 1 + config/config.go | 3 ++- main.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) 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), })) }