Lightweight Video Viewer [Not Kodi] for viewing local Video Files

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]

ROM=/home/cpi/movies/
ROM_SO=/usr/bin/mplayer
EXT=mpeg,mpg,avi,mp4,asf,wmv,mp2,mov,mkv,flv,webm
LAUNCHER=/usr/bin/mplayer -framedrop
TITLE=MoviePlayer

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

happy hacking

2 Likes

note:

wget -O ~/launcher/skin/default/Menu/GameShell/MoviePlayer.png https://i.imgur.com/VJsn9ra.png

is all one line.

I edited your your post for better visibility :slight_smile:

You can use the blockquote tag for this.

1 Like

Thank you very much!sooooo wonderful!!!

i got it!

1 Like

thank you it’s very coooool!!!

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.

try using mpv instead of mplayer

I started making a native player but the player controls are still not implemented

3 Likes

How would go about doing this method? I’d be willing to try it out. I’d just need instructions on what to do to get mpv installed.

Any updates on the progress on your native player?

It’s been a while since I installed it, but I got mpv working. I remember I had to build the source.

So it was something like:
git clone --recurse-submodules https://github.com/mpv-player/mpv.git

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:

ROM=/home/cpi/movies
EXT=mpeg,mpg,avi,mp4,asf,wmv,mp2,mov,mkv,flv,webm
LAUNCHER=cd /home/cpi/movies && mpv --fs
TITLE=MoviePlayer
1 Like

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.

1 Like

isn’t one from official debian repo worked ?

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. :wink:

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.

better optimized and more fresh for sure :slight_smile:

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

How to install mpv
(many steps taken from @WidgetPhreak’s original post)

  • SSH into your device and run the following:

sudo apt update
sudo apt install mpv
mkdir ~/movies
mkdir ~/apps/Menu/27_MoviePlayer
wget -O ~/launcher/skin/default/Menu/GameShell/MoviePlayer.png https://i.imgur.com/VJsn9ra.png
wget -O ~/skins/OP1/Menu/GameShell/MoviePlayer.png https://i.imgur.com/CkfZ2k1.png
nano ~/apps/Menu/27_MoviePlayer/action.config

  • Paste the following 4 lines into the editor, then CTRL+X answer Y to Save

ROM=/home/cpi/movies
EXT=mpeg,mpg,avi,mp4,asf,wmv,mp2,mov,mkv,flv,webm
LAUNCHER=cd /home/cpi/movies && mpv --config-dir /home/cpi/movies --fs
TITLE=MoviePlayer

  • 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.

The controls mapped in the input.conf above are:

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.

1 Like

GStreamer doesn’t work with lima :frowning: