Kiosk-like project

Moderators: mdrjr, odroid

Kiosk-like project

Unread postby sommers9 » Mon Jan 02, 2017 1:05 am

I'm working on a project where we place a (full HD) display behind a special mirror, so that we can show advertisments through the mirror.
We're using an "web application" for the chromium webbrowser and we need full-HD video playback.

We've tried this using the Raspberry Pi, but the video playback in chromium was stuttery.
I figured that an ODROID is more powerful, for example the C2, has a Mali-450 GPU and H.264 VPU.

I've checked out viewtopic.php?f=112&t=8267 on enabling GPU hardware acceleration, but I believe it doesn't work for video decoding.
My chromium actually recognizes the Mali GPU, but the performance doesn't seem to be improved.

I've found a lot of varying questions and answers on this topic, but my question basically is: "Is it possible to get smooth full-hd video when playing through chromium on an Odroid (C2, if possible)?"

I would like to know which route to take or if I need to look for alternatives.
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby meveric » Mon Jan 02, 2017 1:17 am

The answer is "no" it's not possible to have 1080p playback in chromium on the C2. There are other programs that can do that, but not Chromium.

The GPU acceleration is for browsing, means smooth scrolling, better JPEG and gif support, scaling, such HTML5, that kind of things. It has NOTHING to do with video decoding.
Video decoding is done by the VPU not by the GPU and Chromium has no VPU acceleration on ARM devices under Linux.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 7947
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Kiosk-like project

Unread postby mad_ady » Mon Jan 02, 2017 3:06 am

If your web interface displays video via regular html5 video then my "odroid.c2.video.helper" chrome plugin + crashoverride's c2play can do the job. The only catch is video is played fullscreen (probably what you wanted), but it's played with an external app launched on play from chrome.
User avatar
mad_ady
 
Posts: 2870
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kiosk-like project

Unread postby sommers9 » Mon Jan 02, 2017 5:00 am

Thanks for the answers, it's nice that you guys took a little of your precious time to avoid me wasting time on stuff I don't really get.

@meveric I guess there also aren't any browsers with VPU support?
@mad_ady Nice idea for making the odroid a more viable alternative for PC, but we want to be able to "resize" the video when a person comes in front of it.

Btw I've found your post (viewtopic.php?t=23865) to be spot on and admire your (and others) efforts.
It's quite a shame, good VPU and acceleration support would make the gap between embedded Linux boards and PC's a little smaller. It's interesting to see how Kodi does allow 1080P on an awful lot of devices.

I'm thinking I'll have to rewrite the kiosk software using libraries that do have VPU support (or whatever enables full-hd playback) and allow scaling/positioning (on the go).
I've seen projects like that on the Raspberry Pi using OMXPlayer. Like in this video https://www.youtube.com/watch?v=_KwBLSyYKG4

Are there libraries with VPU support for the C2 that allow showing images and videos (and scaling/moving them)?
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby odroid » Mon Jan 02, 2017 1:33 pm

Hardware accelerated video renderer supports only fullscreen mode.

If you don't use 4K/UHD display, you can try to use the Mali driver.
viewtopic.php?f=136&t=21948
Scaling seem to be possible with OpenGL-ES zoom API.
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kiosk-like project

Unread postby sommers9 » Tue Jan 03, 2017 7:50 pm

Someone mentioned video acceleration in browser: viewtopic.php?f=112&t=8267

It seems that the C1 can do hardware video decoding (a guy posted a screenshot with that)?
Or is it false that that will allow 1080P webvideo?
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby mad_ady » Tue Jan 03, 2017 7:55 pm

This should work on the C1 as well (with crashoverride's c2play): viewtopic.php?t=23865

Without it you will still do software video decoding (via chrome's ffmpeg) and will probably have tearing and overheating.
User avatar
mad_ady
 
Posts: 2870
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kiosk-like project

Unread postby meveric » Tue Jan 03, 2017 10:46 pm

sommers9 wrote:Someone mentioned video acceleration in browser: viewtopic.php?f=112&t=8267

This is GPU acceleration for better browser experience, meaning better scrolling and scaling and such, not Video acceleration for watching videos.

sommers9 wrote:It seems that the C1 can do hardware video decoding (a guy posted a screenshot with that)?

It can not. Video decoing IN browser is always software decoded.
Outside of the browser you can use different tools as mad_ady already explained.

sommers9 wrote:Or is it false that that will allow 1080P webvideo?

It's false, the browser itself can't do this.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 7947
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Kiosk-like project

Unread postby sommers9 » Wed Jan 04, 2017 5:20 pm

Hmm, looking at this screenshot it seems that "video decoding" can also be hardware in Chromium on Odroid Image?

I'll check if the firefox solution will work for me.

But:

odroid wrote:Hardware accelerated video renderer supports only fullscreen mode.


Would mean that I can't size the video to show in the top left corner or anything?
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby mad_ady » Wed Jan 04, 2017 6:07 pm

Apparently accelerated video decoding is not working in linux in general:https://bugs.chromium.org/p/chromium/issues/detail?id=137247
User avatar
mad_ady
 
Posts: 2870
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kiosk-like project

Unread postby sommers9 » Wed Jan 04, 2017 8:36 pm

We'll yeah, it's not on on default, but that doesn't really make it an unviable option?
Since the screenshot seems to indicate otherwise.
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby meveric » Wed Jan 04, 2017 10:06 pm

sommers9 wrote:We'll yeah, it's not on on default, but that doesn't really make it an unviable option?
Since the screenshot seems to indicate otherwise.

It probably just checks if vdpau or other libraries are installed, and if so it assumes that it can do video hardware decoding, doesn't mean it's actually working.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 7947
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Kiosk-like project

Unread postby sommers9 » Thu Jan 05, 2017 7:30 pm

Hmm, okay many thanks!

Sorry for my ignorance, I was just so hoping that it would work ;) not only for my project, but also for making the Odroid more viable as a desktop replacement.
We're going to look at an option to use an Intel compute stick, the I/O may then be done by (USB) MCU.
Another option will be to use a Raspberry Pi and program a service that controls OMXPlayer, but that'll take some development time.

Guess I'll be using the Odroid as a Media centre or small server then, which is should be more than capable of :D
sommers9
 
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2

Re: Kiosk-like project

Unread postby xymantec » Sat Mar 25, 2017 4:00 pm

Hi,

So I've been working on a Kiosk system on the C2 for a few days now at the request of a client. So far here are my findings...

IT IS POSSIBILBE to play 1080 video via browser, I was able to do it by using videojs or jplayer to play the video but you would only get close to 30fpm when in fullscreen, full window is choppy but definitely usable (in Firefox only).

Browsers Tested:
-Chromium (meh...)
-Firefox (surprisingly, video was smoother in full window and fullscreen)
-Midori (fml...)

Javascript Video Players
-VideoJS
-JPlayer
-Afterglow (A Version of VideoJS)

Problems:
1. I write code to initiate the fullscreen onload (body onload="requestFullScreen()") but because of internal browser security this will not work as its not allowed, only actual user gestures are allowed.
2. I tried to write another set of functions that would emulate clicking on an actual url that would then trigger the fullscreen but that that didn't work as well, for the same reason, no programmatic clicks...

There is really only 2 possible solutions at this time (no amount of javascript will save you):
1. Wait for browsers to update their decoding capabilities. (...)
2. Download Firefox source code and remove security functionality that disabled programmatic link clicks or programmatic full screens initiations, essentially compiling a custom version (Which I am already looking into).

Anyone have different results or a different approach to resolving this problem? Anyone with solid C skills (over my head) want to attempt to compile a version of FF with no requestFullScreen() filter?
My signature, something cool and "original" for everyone to admire...
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby mad_ady » Sat Mar 25, 2017 9:18 pm

Did you try the odroid.c2.video.helper + c2play approach?
User avatar
mad_ady
 
Posts: 2870
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kiosk-like project

Unread postby xymantec » Tue Mar 28, 2017 3:21 am

Hey mad_ady, nope where I can find out more about this method? (about to google it...) and thanks for the tip ^_^
My signature, something cool and "original" for everyone to admire...
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby xymantec » Tue Mar 28, 2017 3:23 am

nvm found it http://forum.odroid.com/viewtopic.php?t=23865, unfortunately, this method won't work for my needs, from the test video I saw the method I described looks like it performs better, not as choppy. I'll try to put up a video.
I am already looking into downloading firefox source and removing/editing that requestFullScreen() api filter to allow programmatic clicks :twisted:, any help is much appreciated.
My signature, something cool and "original" for everyone to admire...
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby xymantec » Tue Mar 28, 2017 8:09 am

After a bit more tinkering I got it working legit, I think there's and initial bandwidth/load problems, but once settled it plays smooth. Maybe because I am using the same micsoSD (80mbps) as the OS (I don't have flash card atm, but this could make a difference), I will try in a bit mounting a USB drive and using it as a storage drive, so there is less read load on the primary disk, maybe this will improve the lag at the beginning. Currently, the CPU usage is ~%60 with less than 680MBs of memory in constant use.

I will get a demo and instructions on how to replicate my project in a bit for anyone else interested in building a web-based kiosk application.
My signature, something cool and "original" for everyone to admire...
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby Bagman » Tue Apr 18, 2017 11:07 am

Absolutely Interested in this. Thanks if you can provide demo and instructions on how to replicate!
Bagman
 
Posts: 25
Joined: Fri Jul 29, 2016 1:32 am
languages_spoken: english

Re: Kiosk-like project

Unread postby odroid » Tue Apr 18, 2017 11:59 am

I am really interested in this topic too.
Please consider writing an article for our Magazine.
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kiosk-like project

Unread postby xymantec » Sun Apr 30, 2017 8:38 am

odroid, I would love to. bagman, been super busy but will get to it soon! (~1 week). I'm actually in the process of testing out whether the eMMC or MicroSD works better, surprisingly, as of now I have gotten better performance from MicroSD.
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby xymantec » Wed May 03, 2017 2:41 pm

I've done it, I've gotten mp4 video to play at 1080 through the browser smooth on the C2. Here's a video demo of the video playback in action.

YouTube is being YOUTUBE so if it doesn't work use the second video below.
https://www.youtube.com/watch?v=2fgHSXpFQNo
Last edited by xymantec on Fri May 05, 2017 6:26 am, edited 3 times in total.
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby odroid » Wed May 03, 2017 8:33 pm

I'm waiting the video.
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kiosk-like project

Unread postby xymantec » Thu May 04, 2017 1:38 am

Here is the second video example, this time I used the Matrix as a sample video.
https://drive.google.com/a/websymantecs.com/file/d/0BwCPza51ENBPUmhVX1llbFVFeUk/view?usp=sharing
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby odroid » Thu May 04, 2017 8:20 pm

Great.
How did you make the Firefox can play 1080p video smoothly?
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kiosk-like project

Unread postby xymantec » Fri May 05, 2017 6:04 am

1. VideoJS (open source)
2. Encode at 24/25fps or <6.5 Mbsp, Ideally ~5mpbs
3. Buy me a beer 8-)
User avatar
xymantec
 
Posts: 18
Joined: Fri Mar 24, 2017 5:00 am
Location: Woodland, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: Kiosk-like project

Unread postby odroid » Fri May 05, 2017 9:33 am

Thank you for sharing.
Ah.. software video decoding on VideoJS shows acceptable rendering performance if the video stream is near 5mbps.
User avatar
odroid
Site Admin
 
Posts: 25303
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kiosk-like project

Unread postby sousaplex » Thu Oct 05, 2017 4:58 pm

Have you tried this with an XU4? Also, have you tried with webm?
sousaplex
 
Posts: 1
Joined: Fri Sep 15, 2017 12:20 am
languages_spoken: english
ODROIDs: C2


Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest