Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: wrybread on February 22, 2018, 02:33:55 AM
-
I'm working on an emulator that plays a random Southpark, Simpsons, etc. I set up VLC as the "emulator", and it launches the video just fine. And pressing ESC exits the video just fine. It's all *almost* working.
My problem is that VLC's hotkey configuration apparently doesn't work with joystick buttons. So, since my game's control panel is entirely built with joystick buttons, I have no way to exit or seek it the videos without bringing out the keyboard, which I hate doing.
And an additional advantage to this approach is that it could pretty easily be adapted to karaoke, which would be a kind of neat use of an arcade machine.
I don't imagine anyone knows of a video player that works with joystick keys? Is should say I'm using Ubuntu Linux.
-
Preferences -> Hotkeys
If it doesn’t recognize your controls, it’s likely because you have a joystick encoder rather than a keyboard encoder. Keyboard encoder will make life easier.
Another option is a Linux alternative for autohotkey. I’ve used it once. Forgot the name. Google is your friend.
-
Strange, looks like my reply got deleted. Or maybe user error, ha, it's late.
Anyway, yes I was thinking about remapping a joystick button to send a keystroke, and I should probably pursue that. But in the meantime I found that mplayer has excellent joystick support, provided you enable it like this:
https://ubuntuforums.org/showthread.php?t=1053715
Now everything is working *almost* perfectly: I can seamlessly launch whatever video fullscreen, I can seek and control the volume with joystick 1, BUT I still can't exit the video the way I do with games since that's Joystick Button 10 on my system, and apparently there's a bug in mplayer where you can only assign joystick buttons 1 through 9. Ha.
Anyway, more notes here:
https://ubuntuforums.org/showthread.php?t=888953
It's not the end of the world if I need to use a different button to exit videos (I have it set so pressing player 1 start exits), but it'd be nice to get it all working properly. I suppose one way would be to shuffle my buttons around, so my enter/exit button is joystick button 9.
-
Well, with a bit of duct tape, my arcade cabinet now plays videos:
https://www.youtube.com/watch?v=mstfDKev-XA
I made an "emulator" (a python script) that chooses a random video from the selected folder. So click the "South Park" entry on the arcade cabinet and it plays a random South Park. Works great, and my joystick controls volume (up/down), seek (left/right) and the buttons skip to next/prev. Can also play playlists of videos or specific videos. Now I'll have even more trouble concentrating when I should be working...
If anyone has interest I'll clean it up and post it.
-
that is cool,,,,,love it