aik
Posts: 20
Joined: Mon Jul 27, 2015 9:59 pm

yet another omxplayer gui

Sat Aug 01, 2015 4:53 pm

Got RPI2B with ubuntu 14.04.02 on it. Tried a bunch of gui wrappers on top of omxplayer, do not like any (kweb is the closest but still far away from the simplicity I am after). So I tried writing my own in python3 (very basic knowledge), the script is there (cannot attach here - this forum does not like _any_ file extension I tried). The script starts dbus daemon, omxplayer and implements very basic gui with very simple hotkeys. It works, I am almost happy, there are few problems.

1. How to know the actual TV resolution? It is 1920*1080*60p - TV, config.txt (hdmi_group=2, hdmi_mode=82), XFCE "display" widget (which does not let to choose the mode) and my eyes confirm that. But root.winfo_screenwidth()/height() returns 1366*768 and "xrandr" reports the same. Tk() is broken on Pi?

2. When we start omxplayer in full screen, we also want "--blank" if the video clip aspect ratio is different that the display has. But there is no way to dynamically manipulate with it, is this correct or I missed it? If I want to switch from fullscreen to a window and back - I cannot use "--blank" OR I need to restart omxplayer (with "--pos") which is a bit ugly. Or recompile omxplayer to provide dbus interface to blank_background() (I'd like not to though if anyone ever decides on using my script :) ).

3. Is "--win" with exact coordinates the only way to control the aspect ratio? Without "--blank", that means visible parts of XFCE desktop on top/bottom or left/right sides if the ratio is different from the display.

aik
Posts: 20
Joined: Mon Jul 27, 2015 9:59 pm

Re: yet another omxplayer gui

Mon Aug 03, 2015 4:58 am

I fixed 2 and 3 by switching the main frame to fullscreen and setting its "bg" to "black". The issue #1 still remains and I got a new one: sometime for no good reason, the omxplayer either
- refreshes the screen (I can tell it from the TV reports - it shows new screen resolution which never changes)
- just goes blank: a movie is playing and then - oops - black screen. The Pi is still running and from remote ssh console I can run another omxplayer but the desktop is blank. "fbset -depth 16" helps sometime but sometime it sticks in the kernel and never exits.

Any idea where are these issues from?

Return to “Graphics programming”