mirror of
https://github.com/fxkt-tech/liv
synced 2025-09-26 20:11:20 +08:00
feat: crop
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user