package main import ( "fmt" ffmpeg "github.com/u2takey/ffmpeg-go" ) func cutoutClipAndTranscode(ut *Utterance) error { err := ffmpeg.Input(ut.FD.AudioPath, ffmpeg.KwArgs{ "ss": ut.LeftTime, "to": ut.RightTime, }, ).Output(ut.OutPath, ffmpeg.KwArgs{ "ar": "22050", "metadata": fmt.Sprintf(`source="%s"`, ut.FD.VttPath), }).OverWriteOutput().ErrorToStdOut().Run() return err }