ffmpeg 命令的 golang binding 工具

1,456 阅读1分钟

项目地址

github.com/u2takey/ffm…

使用例子 

import (
	ffmpeg "github.com/u2takey/ffmpeg-go"
)

split := ffmpeg.Input(TestInputFile1).VFlip().Split()
	split0, split1 := split.Get("0"), split.Get("1")
	overlayFile := Input(TestOverlayFile).Crop(10, 10, 158, 112)
err := ffmpeg.Concat([]*Stream{
    split0.Trim(KwArgs{"start_frame": 10, "end_frame": 20}),
    split1.Trim(KwArgs{"start_frame": 30, "end_frame": 40})}).
        Overlay(overlayFile.HFlip(), "").
        DrawBox(50, 50, 120, 120, "red", 5).
        Output(TestOutputFile1).
        OverWriteOutput().Run()

支持生成 flowchart