occivink / mpv-scripts

Various scripts for mpv
The Unlicense
417 stars 38 forks source link

[crop] Clamp cursor within video dimensions, display crop zone DAR #67

Open stanleyqubit opened 1 year ago

stanleyqubit commented 1 year ago

Previously, the script would allow for the drawing of the crop zone to begin even if the crop cursor was placed outside video dimensions (e.g. the area into which the video is rendered). This would show inaccurate crop zone dimensions when drawing the text for the crop zone.

This PR limits placing of the crop cursor within video dimensions area, and also adds a little quality-of-life feature that displays the aspect ratio of the crop zone before validation.