Created
June 20, 2018 21:44
-
-
Save saml/64c4e59b6f86a8cf370dc02a84e38802 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local mouseX = 0; | |
| local mouseY = 0; | |
| local function onTick(event) | |
| local x; | |
| local y; | |
| x, y = mp.get_mouse_pos(); | |
| if x ~= mouseX or y ~= mouseY then | |
| print(x, y); | |
| mouseX, mouseY = x, y; | |
| mp.command('vf-command xcrop x ' .. mouseX .. '"'); | |
| end | |
| end | |
| mp.register_event('tick', onTick); | |
| mp.set_property('lavfi-complex', '[vid1][vid2]scale2ref[main][ref]; [main]crop@xcrop=w=200:x=0:y=0:keep_aspect=1[cropped]; [ref][cropped]overlay[vo]'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment