mirror of
https://github.com/hsnks100/liveflow.git
synced 2025-09-27 04:26:24 +08:00
feat: mp4 interval config
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
@@ -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 {
|
||||||
|
2
main.go
2
main.go
@@ -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),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user