ffmpeg: use one command to stream video/audio

This commit is contained in:
Artem
2024-11-05 18:49:21 +01:00
parent f10e2da534
commit 1f5a56cc5d
8 changed files with 100 additions and 258 deletions

View File

@@ -35,11 +35,8 @@ func main() {
ustreamer.Start()
//go ustreamer.Watch()
} else if cfg.Stream.Source == config.StreamSourceH264 {
ffmpeg := stream.InitFFmpeg(cfg.Video.Path, cfg.Video.FormatArgs())
ffmpeg.Start()
audio := stream.InitPipedCmd(config.Get().Audio)
audio.Start()
v := stream.InitFFmpeg()
v.Start()
} else {
log.Fatalf("unsupported stream source type: %v", cfg.Stream.Source)
}