Lets face it, if you just want a simple way to watch local video files… Kodi isn’t the greatest option on the Gameshell… it takes a while to download over apt, and there’s a bunch of menu configurations and re-themeing that needs to take place before it’s even readable.
I was playing around with mplayer and devised the following solution:
SSH into your device.
sudo apt update sudo apt install mplayer mkdir ~/movies mkdir ~/apps/Menu/26_MoviePlayer wget -O ~/launcher/skin/default/Menu/GameShell/MoviePlayer.png https://i.imgur.com/VJsn9ra.png
[You only need this 2nd PNG file if you hav the OP1 skin… like on the latest OS Firmware] wget -O ~/skins/OP1/Menu/GameShell/MoviePlayer.png https://i.imgur.com/CkfZ2k1.png nano ~/apps/Menu/26_MoviePlayer/action.config
[paste the following lines into the editor, then CTRL+X answer Y to Save]
That’s it, Reload your UI and you should see a MoviePlayer Icon next to Music Player.
Put any movie files you’d like to carry with you in /home/cpi/movies and you’re good to go.
Protip… since the Gameshell internal screen only Displays at 320x240, if you’re never planning on hooking up to a larger display via HDMI… you might want to re-encode your files before you put them in ~/movies to save space. You can use something like ffmpeg on Mac/PC/Linux to do this with a command like: ffmpeg -i INPUTFILE.wmv -vf scale=320:240 -c:v libx264 -crf 21 -preset fast -c:a copy OUTPUTFILE.mkv
Just a quick note, if you want to resize your video to full screen, you want to add -zoom -fs in LAUNCHER config. The result looks like LAUNCHER=/usr/bin/mplayer -framedrop -zoom -fs.
heads up everyone that’s upgraded to OS 5.x
it looks like the Lima driver (experimental GPU Rendering) does not like mplayer… so switching to FBTurbo driver (Software Rendering) should resolve any issues of videos not playing if you’ve followed this tutorial on 5.x and it’s not playing the videos.
Then I followed the instructions at github and built it. I may have needed to install some dependencies but I don’t remember. The resulting mpv binary ended up in /usr/local/bin.
Then I did something similar to what was mentioned above, except put mpv in the action.config file, along with a parameter it needed, as below:
It is in my backlog as I was finishing uptating BatMon to the new os, and porting it to Qt5 as well as code cleaning and optimizing, I just finished yesterday https://github.com/Mihaylov93/BatMon I will create the release and post it.
When I started the player, it was for fb driver, now with the new os and lima I might have to redo some parts.
It might! I was just in the middle of building other stuff when I decided to install it, so I made my own, thinking maybe it would be better optimized for GameShell that way.
It plays videos that I’ve thrown at it fine. The built in player controls are not very useful though. I planned to go back and investigate keyboard controls and mappings, but I haven’t gotten around to it yet.
at my eyes default controls are sufficient for use it, pad to slow&fast jump upward/backward, others are not really necessary on the gs device,
maybe map multimedia volume keys and “q” for exit the player but this one auto quit at the video end, that’s fine at the except of large streamed movies who may need a big load when fast upward to reach end
as default OS is not multitasked you still could xmodmap like you do with box86 titles
You’re still connected via SSH, right? Good. Run the following:
nano ~/movies/input.conf
Paste the following lines into the editor, then CTRL+X answer Y to Save
ESC quit-watch-later
BS quit
SPACE ignore
- add volume -2
ENTER cycle pause
+ add volume 2
LEFT seek -5
RIGHT seek 5
UP seek 60
DOWN seek -60
j no-osd cycle-values osd-level 3 1
h cycle sub-visibility
k cycle mute
l cycle audio
u frame-step
y frame-back-step
i cycle-values video-aspect-override “16:9” “4:3” “2.35:1” “-1”
o screenshot
HOME ignore
PGUP frame-step
PGDWN ignore
END ignore
All done!
The full keybindings can be found here, if you want to customize them.
Note that screenshots will be saved in ~/cpi/movies as mpv-shot####.jpg. When quitting with the Menu button, your video progress will be saved in ~/cpi/movies/watch_later and resumed the next time you watch that video. If you quit with Shift + Menu, your progress won’t be saved.
Be careful not to delete ~/cpi/movies/input.conf because you won’t be able to control the player with the GameShell’s buttons until you replace it.