2

I'm new to Pi and Linux. I'm running Raspian on a Pi3 and have managed to play a video from the file explorer by entering omxplayer in the command line option. Now my video is playing but I have no control over it or my system, I can't find a way to stop or kill the video. I can see the left and right edges of the gui (the video is 4:3 centred over the top of it) but have no idea what I can do to regain control.
I'm using a bluetooth mini keyboard/mouse controller but no key combinations seem to have any effect on the omxplayer.
Can someone give me any idea on a) how to kill the video, and/or b) how to launch omxplayer properly so I can control the video playback and quit when I want, and/or c) recommend another player?
Thx, James

  • omxplayer key bindings shows hits. Could you confirm which ones work and which one don't? – joan Apr 22 '17 at 8:18
  • I use VLC for my pi, I never had a problem – Michael Wilcox Apr 22 '17 at 11:52
  • Sorry, I'm not sure what you mean by "key bindings shows hits" ? No keys seem to be having any effect on the omxplayer while the video is playing. – James Clasher Apr 23 '17 at 11:41
2

Late answer, but hopefully still useful:

The problem is that omxplayer needs to be launched from within a terminal window, so that the keyboard input can be directed from the terminal to the player. Therefore, instead of specifying omxplayer itself for the command line, specify something like this:

xterm -e omxplayer -o hdmi -r %f

(If you don't have xterm installed, then install it: sudo apt-get install xterm)

This will launch xterm, and everything after -e will be passed as a command into xterm (%f is replaced with the filename of the video).

There are some other parameters to consider: If the video is a different aspect ratio than your monitor, you'll likely see your desktop showing through the unfilled areas of the video. In this case, you can add:

xterm -fg black -bg black -fullscreen -maximized -e omxplayer -o hdmi -r %f

...which will maximize xterm and fill it with a black background, so that the desktop no longer shows through. Alternatively, you might also try:

xterm -e omxplayer -o hdmi --aspect-mode fill -r %f

...which will zoom the video to fill the width or height of the display, whichever is larger.

0

It seems that you can control omxplayer from the keyboard but only if the terminal window from where you launched it is still active. An inadvertent mouse click or other action can make the terminal window inactive. You can still regain control by doing ctrl-tab multiple times until you have control. For example you can terminate the video by doing alternate ctrl-tab's and esc buttons until it quits finally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.