[crop] use video-crop instead of inserting lavf crop
Depends on: https://github.com/mpv-player/mpv/pull/12246
This will allow cropping while using hardware decoding. I'll clean this up a bit when the mpv PR is merged
That's a cool change, should also be much faster than applying a lavf filter. I think I will only merge the PR after the next mpv release though, since this is a breaking change. Ideally encode.lua should also be adapted in order to consider these video crop parameters
Beware that this breaks one of crop.lua's unique feature – recursive cropping.
After the first crop, any subsequent cropping appears to function on the original uncropped video, rather than the cropped video after the first crop is applied. Perhaps with some mathematical calculation, video-crop can support recursive cropping.
Also, since it's not a lavf filter, you can't remove the recursive crop individually through vf del -1.
Perhaps with some mathematical calculation, video-crop can support recursive cropping. Also, since it's not a lavf filter, you can't remove the recursive crop individually through vf del -1.
It is possible to support in script, but instead stacking vf one needs to maintain history stack of requested crops.