Open focusjava opened 5 months ago
func VideoAddWatermark(videoFileName, watermarkFileName, outFileName string) error { // show watermark with size 128:-1 in the bottom right corner after seconds 1 overlay := ffmpeg.Input(watermarkFileName). Filter("scale", ffmpeg.Args{"128:-1"}) err := ffmpeg.Filter( []*ffmpeg.Stream{ ffmpeg.Input(videoFileName), overlay, }, "overlay", ffmpeg.Args{"W-w-10:H-h-10"}, ffmpeg.KwArgs{"enable": "gte(t,1)"}). Output(outFileName, ffmpeg.KwArgs{"c:a": "copy"}). GlobalArgs("-loglevel", "error"). OverWriteOutput().ErrorToStdOut().Run() return err }
After adding image watermark to the video, there is no sound left, Could you please help me check where the problem is? Thank you very much
func VideoAddWatermark(videoFileName, watermarkFileName, outFileName string) error { // show watermark with size 128:-1 in the bottom right corner after seconds 1 overlay := ffmpeg.Input(watermarkFileName). Filter("scale", ffmpeg.Args{"128:-1"}) err := ffmpeg.Filter( []*ffmpeg.Stream{ ffmpeg.Input(videoFileName), overlay, }, "overlay", ffmpeg.Args{"W-w-10:H-h-10"}, ffmpeg.KwArgs{"enable": "gte(t,1)"}). Output(outFileName, ffmpeg.KwArgs{"c:a": "copy"}). GlobalArgs("-loglevel", "error"). OverWriteOutput().ErrorToStdOut().Run() return err }
After adding image watermark to the video, there is no sound left, Could you please help me check where the problem is? Thank you very much