From ae56b8d237be4cff44b3a92c5d2eeb44e3fda694 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Sat, 26 Apr 2014 10:25:02 -0700 Subject: TOOLS: move autocrop.lua to TOOLS/lua in anticipation of more lua scripts --- TOOLS/autocrop.lua | 11 ----------- TOOLS/lua/autocrop.lua | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 TOOLS/autocrop.lua create mode 100644 TOOLS/lua/autocrop.lua (limited to 'TOOLS') diff --git a/TOOLS/autocrop.lua b/TOOLS/autocrop.lua deleted file mode 100644 index e5292eee18..0000000000 --- a/TOOLS/autocrop.lua +++ /dev/null @@ -1,11 +0,0 @@ -mp.command('vf add @autocrop.cropdetect:lavfi=graph="cropdetect=limit=24:round=2:reset=0"') - -function update_crop_handler() - cropdetect_metadata=mp.get_property_native("vf-metadata/autocrop.cropdetect") - mp.command(string.format('vf add @autocrop.crop:crop=%s:%s:%s:%s', - cropdetect_metadata['lavfi.cropdetect.w'], - cropdetect_metadata['lavfi.cropdetect.h'], - cropdetect_metadata['lavfi.cropdetect.x'], - cropdetect_metadata['lavfi.cropdetect.y'])) -end -mp.add_key_binding("C","update_crop",update_crop_handler) diff --git a/TOOLS/lua/autocrop.lua b/TOOLS/lua/autocrop.lua new file mode 100644 index 0000000000..e5292eee18 --- /dev/null +++ b/TOOLS/lua/autocrop.lua @@ -0,0 +1,11 @@ +mp.command('vf add @autocrop.cropdetect:lavfi=graph="cropdetect=limit=24:round=2:reset=0"') + +function update_crop_handler() + cropdetect_metadata=mp.get_property_native("vf-metadata/autocrop.cropdetect") + mp.command(string.format('vf add @autocrop.crop:crop=%s:%s:%s:%s', + cropdetect_metadata['lavfi.cropdetect.w'], + cropdetect_metadata['lavfi.cropdetect.h'], + cropdetect_metadata['lavfi.cropdetect.x'], + cropdetect_metadata['lavfi.cropdetect.y'])) +end +mp.add_key_binding("C","update_crop",update_crop_handler) -- cgit v1.2.3