I have a project that is using a Pi and omxplayer to play a specific video file in a public video kiosk of sorts. Up until now I've used a program called Pikeyd to launch omxplayer upon one keypress of a switch connected to gpio, and stop the playback through another switch attached to a separate gpio input.
For reason's I won't get in to I can only use one switch moving forward and I need to launch omxplayer when the switch is closed and maintain the playback as long as the switch remains closed. Once the switch is released I need omxplayer to quit and return to the command line, ready to launch from the beginning of the video file again if the switch is again pressed.
I'm assuming a python script could handle something like this, but I am not really a programmer and don't have a lot of time to figure it out right now. This thread about triggering a camera from gpio looks like it might have some useful tips but Istill wouldn't know how to kill omxplayer upon release of the switch: [url removed, login to view]
I understand there's something called Pexpect that can control other programs to a certain extent but I looked at it and it's beyond my abilities without some help. I will pay somebody to quickly write a python script that can do this.