7

Let's say I have a Rpi (B+) and want it to act as Kiosk, where a video will play on a loop in fullscreen. The video will change programatically, so I need an API to control it. I've done this before, in x86 machines, with no problem, in a web based application (Javascript and HTML5).

The problem I'm having is that NO browser is (apparently) using the GPU to decode the video. Event their Web Browser that should support "Hardware-accelerated video decoding" can't play videos. I just installed Raspbian (NOOBS) and the browser should at least play the same video as they do on the video.

Omxplayer runs it well, but flickers when it loops and shows some text ("Seek ...").

As this would be a project that will involve around 400 Raspberry PI (if it can do what I need) on different locations, I really need a solid solution.

Is there a way have a looping video, gpu accelerated, on a browser on RPi?

EDIT: I tried embedded mp4/h.264 videos with a regular tag. Every browser fails to play the video. Epiphany and Chromium only show a black "area" and the controls. No video. Midori gets some frames, but the cpu tops. Youtube/Vimeo also fails to play.

EDIT 2: After I did a fresh install and set the GPU memory to 128MB instead of the default 64MB I managed to play a video, smoothly, on Epiphany. The CPU didn't reach 100% (70%-95%). Although, when I tried a full hd video, the performance dropped severely (< 1 FPS) but the CPU was only at 50%, the bottleneck was probably the memory. I'll pick a RPI2 and test it.

  • You need to be more specific about exactly what the video source is here -- how it is encoded and how you've embedded it. "Hardware-accelerated video decoding" I am sure does not apply to every possible encoding method, since the GPU itself cannot do that. – goldilocks May 12 '15 at 15:19
  • I'll take any video format/codec that will run smoothly on a web browser. The source is just a file, the way the file gets to the disk is another story. – Mario Cesar May 12 '15 at 15:42
  • What bothers me the most is that they can play a video on a browser, and, theoretically the same video, and the same browser can't on my machine. Could the problem be that I'm using RPI 1(B+) and they could be using a RPI 2? – Mario Cesar May 12 '15 at 15:48
  • There was no 2 at that time. If you really believe you've duplicated the test case and it doesn't measure up, you're probably out of luck. I would think that .h264 played via HTML5 on Raspbian epiphany would engage "hardware-accelerated video decoding" if anything will. – goldilocks May 12 '15 at 16:01
  • 1
    Try and use nginx to host your video files and then you should be able to embed the src as an HTML5 video tag on the browser. I thought hardware rendering was solved a long time ago. I don't use X at all so no further comment. I am sure you can turn off OSD on omxplayer. The flicker part is a shame though , not sure how to overcome that with omx. Its to do with the driver reloading and rebuffering of files. – Piotr Kula May 12 '15 at 17:25
5

Yes, it is possible, I started this project some time ago but I had to stop because of insufficient time.

This is the best result I could get (1080p): https://youtu.be/fVM1GRDhXGw. It is based on this open library: https://github.com/carlonluca/pi. Some more info here.

The demo uses that library with WebKit1 in QtWebKit, all running without X11. It seems much more difficult to do it with WebKit2. Unfortunately the quality was not perfect, I don't know if it is possible to improve it. However I don't see why using a browser in the first place if the desire is just to play a fullscreen video.

Note that I'm the author of the project, so I'm reporting it just because I know it. There may be a million other approaches.

  • Thank you for sharing! Would you like to join our upcoming community blog :) – Ghanima Jan 19 '16 at 12:40

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.