User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Running omxplayer inside X11??

Tue Jan 28, 2014 9:34 pm

Omxplayer can run inside X11 but it does not hide the desktop fully if the video clips do not have the same aspect ratio as the screen.

Is there a way to hide the desktop while omxplayer is running without resorting to cheap tricks like overlaying a large black box underneath it??

I've also noticed that omxplayer appears to flout my overscan settings, is this because overscan mode only applies to the console and gui window but not video playback??

Richard S.

gkreidl
Posts: 5729
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Running omxplayer inside X11??

Wed Jan 29, 2014 10:38 am

omxplayer -b filename
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Running omxplayer inside X11??

Wed Jan 29, 2014 10:51 am

I think I'm going to need glasses I did have a quick check at the command line options but missing -b somehow. :)

cheers,

Richard S.

JustThisGuy
Posts: 114
Joined: Thu Jan 05, 2012 11:22 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 12:33 am

Well, the current source on github doesn't have a -b option.

But I believe the answer is that omxplayer writes directly to the screen/frame buffer using the openmax api in the gpu, bypassing X. I'm unclear about overscan handling in openmax.

So to get rid of the underlying cruft, yes you have to blank it out yourself. I run omxplayer from the command line with a script that first clears the terminal background and moves the cursor to the center of the screen where it will be behind the player.
Any conversation about a sufficiently complex subject is indistinguishable from babble.

dynamitemedia
Posts: 30
Joined: Sun Dec 01, 2013 9:12 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 5:34 am

JustThisGuy wrote:Well, the current source on github doesn't have a -b option.

But I believe the answer is that omxplayer writes directly to the screen/frame buffer using the openmax api in the gpu, bypassing X. I'm unclear about overscan handling in openmax.

So to get rid of the underlying cruft, yes you have to blank it out yourself. I run omxplayer from the command line with a script that first clears the terminal background and moves the cursor to the center of the screen where it will be behind the player.

can you show us the script for more help? i keep getting that darn black screen when using liverstreamer or anyth shell exec like i described here and trying to figure it out...

http://www.raspberrypi.org/phpBB3/viewt ... 68#p495968

gkreidl
Posts: 5729
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 8:05 am

JustThisGuy wrote:Well, the current source on github doesn't have a -b option.
Sorry, but this is nonsense. I'm using the latest version from omxplayer.sconde.net (Build date: Thu, 23 Jan 2014) and there have been no source code changes since this version was compiled. It has the "-b" option built in and it does work.

And the OP was asking for running omxplayer inside X11; your terminal script solutions might no be what he was asking for.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

dynamitemedia
Posts: 30
Joined: Sun Dec 01, 2013 9:12 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 9:11 am

i did see he has a -b option here

https://github.com/huceke/omxplayer/issues/22

trying to see if one of these solutions helps me with my issues of that black screen!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20697
Joined: Sat Jul 30, 2011 7:41 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 9:19 am

JustThisGuy wrote:Well, the current source on github doesn't have a -b option.

But I believe the answer is that omxplayer writes directly to the screen/frame buffer using the openmax api in the gpu, bypassing X. I'm unclear about overscan handling in openmax.

So to get rid of the underlying cruft, yes you have to blank it out yourself. I run omxplayer from the command line with a script that first clears the terminal background and moves the cursor to the center of the screen where it will be behind the player.
The way the GPU works is that is has a set of bitmaps that it composites and send to the video output in real time (really!). One of the bitmaps is the Linux frame buffer. Another is the camera preview, another is the output from OMXplayer, another might be an EGL windows used for 3D.

This is all done outside Linux, so the Linux frame buffer knows nothing of the OMXplayer output. There's no copying of data to and from for example.

AFAIK, the Linux FB is the one that uses the overscan settings. The others one ignore it (they could be modified to use it of course)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

dynamitemedia
Posts: 30
Joined: Sun Dec 01, 2013 9:12 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 9:34 am

that -b option works awesome and fixed my issues!!

thanks Guenter!

JustThisGuy
Posts: 114
Joined: Thu Jan 05, 2012 11:22 pm

Re: Running omxplayer inside X11??

Thu Jan 30, 2014 10:58 pm

I was looking at the wrong source file.

I should not have tried to explain anything yesterday.

Clearly, I'm gonna have to recheck everything I did on Wednesday, sorry 'bout that.
Any conversation about a sufficiently complex subject is indistinguishable from babble.

Return to “General discussion”