Open f1748x opened 1 year ago
func ComplexFilterExample(testInputFile, music, testOutputFile string) ffmpeg.Stream { // ffmpeg. png := ffmpeg.Input(testInputFile, ffmpeg.KwArgs{ "r": "15", "loop": 1, "f": "image2", }) mp3 := ffmpeg.Input(music) return ffmpeg.Concat([]ffmpeg.Stream{ png, mp3, }). Output(testOutputFile, ffmpeg.KwArgs{ "pix_fmt": "yuv420p", "vcodec": "libx264", "s": "320x240", "t": "15", }). OverWriteOutput() }
ffmpeg -f image2 -loop 1 -r 15 -i ./1.png -i ./1.mp3 -pix_fmt yuv420p -s 320x240 -t 15 -vcodec libx264 w.mp4 -y
func ComplexFilterExample(testInputFile, music, testOutputFile string) ffmpeg.Stream { // ffmpeg. png := ffmpeg.Input(testInputFile, ffmpeg.KwArgs{ "r": "15", "loop": 1, "f": "image2", }) mp3 := ffmpeg.Input(music) return ffmpeg.Concat([]ffmpeg.Stream{ png, mp3, }). Output(testOutputFile, ffmpeg.KwArgs{ "pix_fmt": "yuv420p", "vcodec": "libx264", "s": "320x240", "t": "15", }). OverWriteOutput() }