[SOLVED] Playing video from pocket-home


#1

Hi all, I am trying to play video from the menu screen. I have added an icon that links to a shell script and now my video plays.

But…After 10 seconds it stops and freezes and I have to reboot the Pocket C.H.I.P. I understand that this is normal behaviour and if I play the video file from the terminal everything works fine.

My question: is there any way I can launch the terminal from the script - then play the video file - then quit the terminal and return to the menu screen?

Or can I avoid the freeze issue some other way?

Here is the very simplistic content of my shell script:

#! /bin/sh

exec mplayer /home/chip/Videos/estimote.mp4

I have followed this procedure: [APT] Pocket Home (Marshmallow edition)


#2

the player is either mplayer or mpv, you have to install it:

           sudo apt install mplayer

About exec, it kills the parent shell.


#3

Ah, sorry - I mistyped, will correct now. Am using mplayer :slight_smile:

To be clear: the video starts playing when I touch click the icon, but after abt. ten seconds it freezes, and the only way to quit it to tap the on/off button. I am then taken back to the menu screen.


#4

Alright, made it work, so thought I’d post my solution.

What I want: An icon on the (modified) home screen (see original post) that plays a video file in full screen native resolution (480x272 px) and returns to the home screen after playback has finished.

What I did: installed mplayer with

sudo apt-get install gnome-mplayer

Installed the alternative home screen: Instructions here.

Made a .sh script in the home folder, containing the following:

#!/bin/sh

gnome-mplayer --fullscreen --quit_on_complete /home/chip/Videos/estimote.mp4

Made it executable with

chmod +x ./estimote.sh

And linked to that when adding an icon under the Advanced settings in the menu.

Looks like mph is another option as @anthk mentions in above comment. I found this article on that topic.

Just beginning to experiment with this device, pretty stoked so far!