feat: mp4 interval config

This commit is contained in:
한경수
2025-07-20 19:02:39 +09:00
parent 617029aaba
commit 1a5c7b331f
3 changed files with 4 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ disk_ram = true
mode=false mode=false
[mp4] [mp4]
record=true record=true
split_interval_ms=3000
[ebml] [ebml]
record=false record=false

View File

@@ -25,7 +25,8 @@ type DockerConfig struct {
} }
type MP4 struct { type MP4 struct {
Record bool `mapstructure:"record"` Record bool `mapstructure:"record"`
SplitIntervalMS int `mapstructure:"split_interval_ms"`
} }
type EBML struct { type EBML struct {

View File

@@ -139,7 +139,7 @@ func main() {
if conf.MP4.Record { if conf.MP4.Record {
starters = append(starters, mp4.NewMP4(mp4.MP4Args{ starters = append(starters, mp4.NewMP4(mp4.MP4Args{
Hub: sourceHub, Hub: sourceHub,
SplitIntervalMS: 3000, SplitIntervalMS: int64(conf.MP4.SplitIntervalMS),
})) }))
} }