Issue title: Record a video by GPIO event
 Issue body: Hello everyone,

I'd like to use MotionEyeOS on a raspberry PI. My objective is to be able to record a video during a specific time when a GPIO pin change state.
For example I detect the edge, I record the minute passed before the edge and the minute after on the same video.
Do you know if it is possible to do that with MotionEyeOS ?

Thank you in advance for your help,

Best regards
 Comments: 
 Comment 0: See https://github.com/ccrisan/motioneye/issues/31
{'source': 'GithubIssues', 'repo_name_with_owner': 'ccrisan/motioneye', 'issue_id': 478385288, 'repo_stars': 2880.0}