u2takey / ffmpeg-go

golang binding for ffmpeg
Apache License 2.0
1.75k stars 172 forks source link

How to run "ffmpeg -i a.mp4 -i b.mp4 -filter_complex "[0][1]alphamerge" -vcodec qtrle out.mov" #40

Closed wuchongde closed 2 years ago

u2takey commented 2 years ago

try:

func TestMerge(t *testing.T) {
    in1, in2 := ffmpeg.Input("a.mp4"), ffmpeg.Input("b.mp4")
    cmd := ffmpeg.Filter([]*ffmpeg.Stream{in1, in2}, "alphamerge", ffmpeg.Args{}).
        Output("out.mp4", ffmpeg.KwArgs{"vcodec": "qtrle"})
    cmd.OverWriteOutput().ErrorToStdOut().Run()
}
wuchongde commented 2 years ago

@u2takey great. thanks.