mpv-player/mpv — pull request #752 by kevmitch (2014-04-28 09:55:57+00:00)
Title: autocrop and vf-metadata improvements

The most important thing here is the bugfix to properly handle NULL metadata (libav). I've also enhanced autocrop.lua. It is now suitable to put in ~/.mpv/lua as it does nothing until asked. It also samples the whole file to determine appropriate crop parameters (the only bullet-proof method).
I'll understand though if you'd rather keep that commit out as it makes the script significantly more complex. On the other hand, it demos more of mpv's lua capabilities.