ffmpeg-go
ffmpeg-go copied to clipboard
how to support multi pipe input
- u2takey not support multi pipe input
ffmpeg -i pipe:0-i pipe:1-i pipe:2...
such as
in1 := ffmpeg.Input("pipe:0", inArgs)
overlay := ffmpeg.Input("pipe:1", inArgs).Filter("scale", ffmpeg.Args{"128:-1"}).WithInput(bytes.NewReader([]byte(testSdp)))
e := ffmpeg.Filter(
[]*ffmpeg.Stream{
in1,
overlay,
}, "overlay", ffmpeg.Args{"10:10"}, ffmpeg.KwArgs{"enable": "gte(t,1)"}).
WithInput(bytes.NewReader([]byte(ffmpegSdp))).
Output(*output, outArgs).OverWriteOutput().ErrorToStdOut().Run()
pipe:1: Invalid data found when processing input
no way, and try to put content into http-server, and ffmpeg input with http-protocol:
in1 := ffmpeg.Input("http://xxx", inArgs)
overlay := ffmpeg.Input("http://yyy", inArgs).Filter("scale", ffmpeg.Args{"128:-1"})
e := ffmpeg.Filter(
[]*ffmpeg.Stream{
in1,
overlay,
}, "overlay", ffmpeg.Args{"10:10"}, ffmpeg.KwArgs{"enable": "gte(t,1)"}).
Output(*output, outArgs).OverWriteOutput().ErrorToStdOut().Run()
- how to support multi pipe input with perfect way?