a simple video jukebox for Linux
svp2
This project is the second version of my Linux "video jukebox".
The first version specifically required a Raspberry Pi (or other Linux SBC), since it used the GPIO pins for the control buttons.
In this version, I am eliminating that requirement by using the regular computer keyboard for the control inputs. Thus, the software can run on any normal Linux host, as long as it has HDMI video.
The finished unit will still have custom control buttons for the interface, just like the first version. However, behind the scenes, the control switches will be connected to the "guts" of a regular USB computer keyboard, so that clicking one of the interface buttons is the same as hitting a certain key on the keyboard. Development and testing can be done with a standard keyboard, no special hardware needed.
The software is still a very janky bash shell script (yes, some bash-specific features are used). It is a little bit tricky to get the button presses (keyboard events) to go to the right place (the script), when the other programs (image viewer or video player) are controlling the display. (This was an advantage in the first version of this system: by using hardware switches connected to GPIO pins, there was no contention with other programs grabbing file descriptors and such.)
E.g., "mpv" captures keystrokes itself, such as '1' and '2' controlling the contrast, etc.. The key-mapping can be changed through a config file, but I'd prefer to intercept the keys I want before mpv ever sees them, regardless of how it may be configured. This latter, I don't yet know how to do; but I have managed to get the system working through various script and configuration twists and turns, at least with the specific programs (fim and mpv) that I'm using on my system. This first working prototype (of the second version) is what I'll present here, and then as I make improvements I'll try to keep this blog updated.
Here's the first version, FYI: https://videojukebox-rpi.blogspot.com/ This has more info on the other sysadmin-stuff needed to run this on Linux in "kiosk" mode, i.e., as a dedicated system which boots up directly into this program. Also, there are photos and other info on the hardware interface design (the LED-illuminated input switches). These aspects of the system remain mostly the same in this second version; I've just eliminated the need for a Raspberry Pi in the middle.

Comments
Post a Comment