theknud
Posts: 5
Joined: Mon Jan 05, 2015 7:28 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Mon Mar 16, 2015 11:31 am

Hi topguy, I copied your buildroot on my Pi and hit this bug systematically within 30 seconds.

Hopefully someone will have insights on how to fix it.

Thanks!

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Wed Mar 18, 2015 8:19 am

I'm currently poking around with this environment with the goal of getting a webgl based slideshow display running on the rpi2.

So far I seem to have even less success than others in this thread, for example the 'qtbrowser --url=https://rawgit.com/sunknudsen/mlbrowser ... index.html' mentioned earlier only produces a white window, with no graphics at all and no errors on the console side.

Running the webgl conformance tests from https://www.khronos.org/registry/webgl/ ... tests.html isn't too promising either, with many of the tests failing and in the end the whole qtbrowser crashing. The main culprit of the tests failing seems to be the webgl running out of memory (tests report OUT_OF_MEMORY errors) but increasing the memory limits for qtbrowser (--pixmap-cache and --object-cache) don't seem to help.

This is all part of a little hobby project, a web controlled multiuser, multi-display slideshow system, mainly currently used on Finnish computer festivals ( https://github.com/depili/isk and https://github.com/iskcrew/iskdpy still work in process but usable...) and we are looking for a simple platform to hook into tvs to serve as displays for the slideshow system.

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Mar 19, 2015 9:42 am

More testing has proven that our old proof-of-concept webgl code runs fine on the qtbrowser and rpi2, so now we need to just figure out what breaks the webgl rendering between that PoC and current production code...

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Mar 19, 2015 12:02 pm

The final boss has proven to be the css styles so now the webgl display component of the ISK infoscreen / digital signage system is running on the rpi2. At 1080p the framerate is about 14fps with a basic crossfade transition done with webgl shaders and cpu utilization is 5-10%

theknud
Posts: 5
Joined: Mon Jan 05, 2015 7:28 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Mar 19, 2015 12:05 pm

@vpalmu

Thanks for your contributions to the project.

Could you please elaborate on "The final boss has proven to be the css styles"?
Did you successfully run "qtbrowser --url=https://rawgit.com/sunknudsen/mlbrowser ... index.html"?

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Mar 19, 2015 12:27 pm

theknud wrote:@vpalmu

Thanks for your contributions to the project.

Could you please elaborate on "The final boss has proven to be the css styles"?
Did you successfully run "qtbrowser --url=https://rawgit.com/sunknudsen/mlbrowser ... index.html"?
The css styles I was referring to are the ones used by our own iskdpy-webgl slideshow displays, the qtbrowser disagreed on their meaning and thus was only displaying a static empty slide background instead of the webgl canvas, so can't help with that mlbrowser-demo as I haven't looked into it.

Curently the rpi2 is looping a 51 slide, 17 minute persentation and has been doing so for little over a hour now and looking stable (fps, cpu utilization, memory usage),

Our application uses 2 triangles for the display surface and two webgl textures, then we use shaders to swap between the textures and load new slides into the inactive texture as needed to minimize the possibilities for memory leaks.

Detailed instructions on using rpi2 as the display component for our ISK project will follow in the nearish future, need to first integrate the webgl stuff better to the command & control web interface and think about a way of using cloned sd-card images for rpi displays and having them fetch their config over the network...

some stuff that might help other experimenters: there are quite many command line switches that can be used with qtbrowser, like the --webkit=2 (which didn't help us, as it broke more stuff than fixed) and the --object-cache and --pixmap-cache settings, still not sure what the three different limits in --object-cache are but the default limits were too low for our usage. The --cookie-storage switch allows the browser to store cookies between runs and helped as it skipped our need to re-authenticate on every run.).

Oh, and finally, we are using the three.js library for our webgl stuff.

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas

Thu Mar 19, 2015 3:02 pm

vitorcarvalhoml wrote: How to activate swap partition?

Code: Select all

# swapon /dev/mmcblk0p3 
swapon: /dev/mmcblk0p3: Function not implemented
The default kernel provided by the buildroot environment doesn't have swap support. You need to edit boards/raspberrypi/linux.config and change the "# CONFIG_SWAP is not defined" to "CONFIG_SWAP=y" and recompile.

rbtsx
Posts: 3
Joined: Fri Aug 03, 2012 4:01 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri Mar 20, 2015 7:39 pm

I am so happy to finally see a non-x accelerated browser for the pi. I'm sure there's been something available since the first days, but what you folks put together is actually accessible. I have some comments and questions for the authors and everyone on this thread.

I tried out this system (https://github.com/Metrological/buildroot.git) on a model b+ Raspberry Pi (version 1). 2d canvas and WebGL performance seemed not good. I've read through this thread a few times and found no evidence (i.e. youtube links) that Qt5WebKit's canvas or WebGL implementations are comparable in performance to native c/c++ (or even python or luajit) OpenGL or OpenVG applications on the pi.

Can someone post a video of Qt5WebKit performing WebGL and/or 2d canvas drawing operations at a decent frame-rate? Specifically, I'm looking for p5.js, three.js, or paper.js examples that work well.

Here are a few examples I've tried:
http://threejs.org/examples/#webgl_animation_cloth (15 FPS, 5s page load)
http://paperjs.org/examples/candy-crash (1.7 FPS, 10s page load)
http://p5js.org/learn/demos/Hello_P5_Flocking.php (0.3 FPS, 90s page load)

Thanks!

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri Mar 20, 2015 8:28 pm

I would be very surprised if the performance was anything close to even decently optimized native code.

In our usage, with only two triangles covering the whole canvas, two textures in 1920x1080 resolution and simple shaders with three.js. The fps is around 40 when outputting 720p resolution and 14ish with 1080p output. What we have noticed is that having other overlapping and possibly transparent html elements on top of the canvas seems to have quite large impact on the performance. But since our application is driving a slideshow display for digital signage we don't need too high fps.

Our app is also doing websocket messaging between the webgl display and the master server while running the presentation, but in the end the computation is really light and on rpi2 the cpu load stays under 10%.

We still have much testing to do on this to better optimize our little application for qtbrowser and also to test the impact of different framebuffer color depths etc. Currently we have mainly been focusing on stability, as that is the biggest sticking point for us (longest run so far has been 9 hours without problems, then I needed the rpi for something else).

rbtsx
Posts: 3
Joined: Fri Aug 03, 2012 4:01 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Sat Mar 21, 2015 12:15 am

Do you think the slowdown is because Qt5WebKit's implementation of canvas/webgl is incomplete or do you imagine that this is the best they're going to do?

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Tue Mar 24, 2015 7:10 pm

Drawing the per-frame time differential via a shader shows that for a slideshow running at steady 40fps average about every other frame takes just a few ms to render and then the next one takes little more than 1/30 seconds, so something strange might be going on...

flyandi
Posts: 9
Joined: Thu Aug 30, 2012 5:18 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu May 07, 2015 4:23 pm

Howdy,

I finally successfully compiled the builtroot environment. Was really happy when the Raspberry Pi 2 actually booted however it seems that I don't have mlbrowser or qtbrowser installed. I followed the instructions and tried both configurations (Which one has actual better performance?). Maybe I did something wrong?

Anyway, running this on the brand new Raspberry Pi 2+

Thx,

Andy

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu May 07, 2015 4:49 pm

the rpi2_wpe_defconfig that is currently the "default" gets you wpe - a wayland based webkit browser, that seems quite capable, it can for example play youtube videos without problems. Only problem with that for me is that the wpe browser seems to lack mouse support.

flyandi
Posts: 9
Joined: Thu Aug 30, 2012 5:18 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu May 07, 2015 5:21 pm

vpalmu wrote:the rpi2_wpe_defconfig that is currently the "default" gets you wpe - a wayland based webkit browser, that seems quite capable, it can for example play youtube videos without problems. Only problem with that for me is that the wpe browser seems to lack mouse support.
I am still trying to understand, so how do you start the browser once booted?

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu May 07, 2015 6:12 pm

qtbrowser --url=http://google.com/

or

wpe http://google.com/

depending on which one you compiled.

flyandi
Posts: 9
Joined: Thu Aug 30, 2012 5:18 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri May 08, 2015 5:24 am

Ok - this is amazing. I just tested the Hello Racer WebGL on wpe .. FPS is nearly 50fps with some struggles when the car gets too close to the camera.

https://www.youtube.com/watch?v=vpWYOu2NSF4

http://helloracer.com/racer-s

george_v
Posts: 1
Joined: Tue May 19, 2015 10:28 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Tue May 19, 2015 10:34 pm

Hello,

I am trying to compile the buildroot distribution, with make rpi2_qt5webkit_defconfig. I have selected a few extra packages for the target, among which omxplayer.
However, I get an error when compiling (something related to omx_subtitles) that breaks the whole process.
Is there any way to update the source used, or perhaps skip the subtitles altogether?

Thank you,

dsrocks
Posts: 3
Joined: Thu Jun 04, 2015 8:27 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Jun 11, 2015 10:31 am

Hi,

at first I appreciate the great work of this project!

Unfortunately building the qt5webkit stops with this error message:

Code: Select all

perl -i /mega/src/metrological-buildroot-qt5wk/output/build/qt5webkit-057f6be8e443f603d383c757bfd735095af5a069/Source/JavaScriptCore/create_jit_stubs --prefix MSVC /mega/src/metrological-buildroot-qt5wk/output/build/qt5webkit-057f6be8e443f603d383c757bfd735095af5a069/Source/JavaScriptCore/jit/JITStubs.cpp > generated/GeneratedJITStubs_MSVC.asm
make[3]: *** No rule to make target 'generated/generated/GeneratedJITStubs_MSVC.asm', needed by '.obj/mega/src/metrological-buildroot-qt5wk/output/build/qt5webkit-057f6be8e443f603d383c757bfd735095af5a069/release/Source/JavaScriptCore/generated/generated/GeneratedJITStubs_MSVC.lo'.  Schluss.


I am on git master as of now, fresh checkout and issued "make rpi2_qt5webkit_defconfig && make" without any modifications.

Any help on this? I successfully built "rpi2_wpe_defconfig" but like to check qtbrowser as well.

If you need more details just let me know. My build host has Ubuntu 15.04 amd64.

Thanks!
dsrocks

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Thu Jun 11, 2015 10:40 am

Did you run make clean before trying to build the second config? buildroot doesn't really handle cases where some packages have already been compiled (maybe with incompatible flags).

It also appears that the qt5webkit browser isn't really supported by metrological anymore with most of the work going towards wpe.

dsrocks
Posts: 3
Joined: Thu Jun 04, 2015 8:27 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri Jun 12, 2015 4:17 pm

Thanks for your reply!

Yes, I did "make clean" and since this didn't work I even did a fresh git clone into a separate directory again - same result.

So it looks that the qt5webkit stuff isn't really supported well anymore. Ok - then I will concentrate my efforts on the wpe build - one choice less, not too bad :)

Thanks!

Yannick88
Posts: 3
Joined: Wed Jun 17, 2015 6:35 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Wed Jun 17, 2015 6:51 am

Hello,

First all, Really thank you for your job. Is just magic :)

I try to connect my rpi2 through USB serial port and I can not to get it working.

I have added on my cmdline.txt this :

Code: Select all

console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
And in the inittab :

Code: Select all

ttyAMA0::respawn:/sbin/getty -L  ttyAMA0 115200 vt100 # GENERIC_SERIAL
But I can't see anything. I have tested with Raspbian and everything works out of the box.

So, I think is missing a configuration in linux-menuconfig or something like that but I don't know exactly what.

Somebody has trying to connect on serial port ?

Thank you.

vpalmu
Posts: 11
Joined: Wed Mar 18, 2015 7:50 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Wed Jun 17, 2015 10:01 am

The kernel config for the metrological environment is really minimal, so its probably missing usb serial support. I have just used ssh to mess around.

So you probably need to edit board/raspberrypi2/linux.config by hand or replace it with suitable configuration from another source.

Yannick88
Posts: 3
Joined: Wed Jun 17, 2015 6:35 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Wed Jun 17, 2015 12:28 pm

Thank you for your replay.

I have made some research about what you say and I see a blogpost : http://longtermcache.blogspot.fr/2013/0 ... -uart.html

It explain how to completly disallow this feature.... And now it's work's :)

davorh
Posts: 1
Joined: Fri Jun 19, 2015 6:59 am

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri Jun 19, 2015 7:03 am

Hi, everything works as intended except keymap. Anyone know how to set up keymap on minimal_wpe, without weston.
If someone expierence segfaults on RPI 1 with javascript webpages, disabling JIT in wpe.mk resolves it.

Xaurrien
Posts: 8
Joined: Fri Jul 10, 2015 3:06 pm

Re: Qt5WebKit + Gstreamer + WebGL + Canvas (RPI + RPI2)

Fri Jul 10, 2015 3:11 pm

Hi,

I have recently built an image with qtwebkit and it works well.

The only thing I haven't succeed yet is playing audio files or audio from videos. Maybe I am missing some configuration with gstreamer ?

Return to “Official Foundation Display”