转码api

This commit is contained in:
banshan
2024-09-25 12:18:26 +08:00
parent 1e31cccf50
commit 2a879651d1
3 changed files with 155 additions and 8 deletions

View File

@@ -99,14 +99,14 @@ func (t *Transformer) Start() (err error) {
}
}
t.To[i] = enc
if to.Overlay != "" {
args = append(args, "-i", to.Overlay)
}
if to.Filter != "" {
args = append(args, "-filter_complex", strings.ReplaceAll(to.Filter, "\n", ""))
args = append(args, "-map", "[out]")
args = append(args, "-map", "0:a")
}
//if to.Overlay != "" {
// args = append(args, "-i", to.Overlay)
//}
//if to.Filter != "" {
// args = append(args, "-filter_complex", strings.ReplaceAll(to.Filter, "\n", ""))
// args = append(args, "-map", "[out]")
// args = append(args, "-map", "0:a")
//}
args = append(args, strings.Fields(enc.Args)...)
var targetUrl *url.URL
targetUrl, err = url.Parse(to.Target)