feat: crop

This commit is contained in:
Justyer
2023-11-08 23:00:21 +08:00
parent a133c8e481
commit a16c847fdf

View File

@@ -126,6 +126,17 @@ func Scale(name string, w, h int32) Filter {
}
}
func Crop(name string, x, y, w, h int32) Filter {
return &CommonFilter{
name: name,
content: fmt.Sprintf(
"crop=%d:%d:%d:%d",
x, y, w, h,
),
counts: 1,
}
}
func SetPTS(name string, expr string) Filter {
return &CommonFilter{
name: name,