guage
Posts: 2
Joined: Wed Jan 29, 2014 11:25 pm
Location: Canada
Contact: Website

video & picture render - browser to use GPU?

Wed Jan 29, 2014 11:52 pm

Hi, I'm new to the Pi and have been trying to develop a kiosk using the pi as it seems to be the perfect board for it. However I've run into a few snags. Images don't render that well and the midori browser doesn't play video content from the video element in html5. There seems to be issues with video in general.

However, I've noticed how xbmc is able to run on the Pi without issue and full movies are played with HD quality no problem. I am assuming that the issues surrounding image and video rendering from the web browser is because its processed by the ARM processor as opposed the the GPU? (not sure if that's correct)

Finally my question. I know its possible - how can I get my website to output video and clean images the way xbmc does it? Also, to get these features that I am looking for am I going to have to learn python and make a whole new program to substitute for the php website i've already built?

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

Re: video & picture render - browser to use GPU?

Thu Jan 30, 2014 7:39 am

There are ways of using the acceleration, but you might want to take a look at 'Minimal Kiosk Browser' which is software than does the kiosk thing. That does what you need.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: video & picture render - browser to use GPU?

Thu Jan 30, 2014 9:06 am

What do you mean by "cleaner images"? If you've noticed ruptures in color runs that's a problem of the default 16bit colour resolution of the RPi. Use 24 bit colour (32 bit with alpha disabled) and they are gone.

Image display is not enhanced by the GPU in any browser right now, so you still might have a speed problem here.

Minimal Kiosk Browser can display HTML5 video full screen (using hw accelerated omxplayer), but this requires user interaction, so it might not be, what you are looking for. But if you put a direct link to a video file (http://example.com/myvideo.mkv) into the scr of an (otherwise invisible, if you like) iframe, full screen video playback will be started automatically.
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
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: video & picture render - browser to use GPU?

Thu Jan 30, 2014 9:46 am

There are also some EGL based WebKit implementations.

https://github.com/WebKitNix/webkitnix is a new one but I havent checked if it works on RPi yet.

Then we have the work mentioned in this thread: http://www.raspberrypi.org/phpBB3/viewt ... 38&t=43087

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

Re: video & picture render - browser to use GPU?

Thu Jan 30, 2014 12:43 pm

topguy wrote:There are also some EGL based WebKit implementations.

https://github.com/WebKitNix/webkitnix is a new one but I havent checked if it works on RPi yet.

Then we have the work mentioned in this thread: http://www.raspberrypi.org/phpBB3/viewt ... 38&t=43087
OpenGL ES is supported in all newer webkitgkt versions and can be enabled or disabled at compile time. You don't need something special for it. The problem is, that these newer versions need lots of other packages to be updated and that's not possible without breaking the rules of a stable Debian version (and also requires a lot of work).

The quoted thread is a work in progress and cannot be installed without breaking lots of debian Wheezy dependencies. I think that a migration to Jessie is needed, before something like this can be done in a clean way (it already contains all the newer package versions needed).
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

guage
Posts: 2
Joined: Wed Jan 29, 2014 11:25 pm
Location: Canada
Contact: Website

Re: video & picture render - browser to use GPU?

Thu Jan 30, 2014 7:28 pm

Thank you All so much for your contributions. It has been very helpful and I've made huge advancements by the grace of the Almighty, your help and a little reading. So here's what i've done - lets hope it helps someone else trying to achieve a similar end.

First off I changed the default bufferframe depth to fix the image quality by adding the following to /boot/config.txt
framebuffer_depth=32
framebuffer_ignore_alpha=1
That worked beautifully.

I installed Minimal Kiosk Browser with the following steps:
wget http://steinerdatenbank.de/software/kweb_1.3.tar.gz
tar -xzf kweb_1.3.tar.gz
cd kweb-1.3
./check.py
That worked beautifully but needed some added installs

These were needed:
sudo apt-get install xterm
sudo apt-get install youtube-dl
then run this 2x
sudo youtube-dl -U
then finally install vlc
sudo apt-get install vlc
Then to get this to load on plugging the device in I changed the config with:
sudo raspi-config
So that it would automatically log in to the desktop.

The following changes were made to autostart kweb (the browser)
sudo nano /etc/xdg/lxsession/LXDE/autostart

#comment out everything and add the following lines.
@xset s off
@xset -dpms
@xset s no blank
@kweb -JFK http://your-start-address.com
Then I was able to create a work around in php to have an invisible iframe present on the screen and only load on clicking by passing the trigger to the url.. here's that php code.

Code: Select all

<?php
echo '<a href=index.php?id='.$id.'&playvid=1>Click here for video</a>';
    		
if (isset($_GET['playvid'])) {
   echo '
	    <iframe src="http://link-to-my-video.com/video.mp4" height="0" width="0" frameborder="0"> 
	   		</iframe>';
    }	
?>
That's what I've done and it all worked great :) Hope it can help someone else!
Thanks again to those who replied.

Return to “General discussion”