installed!

Finally got the chance to install this system in its planned location, our house in San Diego.  As in every other case when I've deployed these klugy script-based video players on Linux systems, a considerable amount of twiddling around was required to make it work.  This is the opposite of trouble-free portability!  But oh well, it's all based on free software, and I didn't have to write any of the "hard" stuff.  Which is good, because the "easy" stuff is plenty annoying on its own.

The basic overview: I had to install "fim" and "mpv", I had to install .config/mpv/input.conf and mpv.conf, I had to edit these config files, I had to (of course) install svp2.sh in /usr/local/bin, and I had to edit the IMG_CMD and VID_CMD variables in the script to pass the right options to fim and mpv.

Then, I had to figure out how to change the Ubuntu system into console (text) mode instead of X Windows (this involves using "systemctl" commands since Ubuntu no longer uses SysV init "runlevels", instead it uses "targets" -- but as usual with Linux, there is plenty of documentation covering how to do this, once you find it...).  The svp2.sh script is designed to work in console mode, not X mode.  I tried for a while to make it work in X, but this is its own can of worms.  The fim and mpv programs require a different cocktail of options, and I wasn't able to figure out how to make both programs handle the keyboard inputs from my custom pushbutton panel correctly, since this stuff is all different under an X window manager.

So, it's clunky, but it more or less works now.  Actually, less, because something is still wrong: when videos finish playing, it doesn't jump back to fim displaying the "thumbnail" images in the "choose-video" loop; instead, it just leaves a bunch of technical text on the screen, messages from the video codec, etc..  It's as if the mpv program doesn't terminate, but rather just hangs at the end, causing the script to still see its PID as active.  But, I haven't had time to diagnose this yet; there's some kind of error reported about a race condition concerning an input lock or something; something about my klugy input-polling loop is not quite working on this particular Linux system.  But, the workaround is to simply hit one or more of the pushbuttons, this pops it back into the choose-video thumbnail images.  Ugly, but sufficiently intuitive that our daughter seems to have no trouble making it work.  Standard computer trouble-fixing technique: keep hitting buttons until it does what you want!

Frankly, rather than work hard to get this klugy and obviously not-very-portable script working better on this one particular Linux system, I'd be more inclined to put effort into integrating fim and mpv more tightly into a single compiled executable, using Unix C code to do the input polling.






Comments

Popular posts from this blog

keyboard interface

software (svp2.sh)