Kiosk-like project

Post Reply
sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Kiosk-like project

Post by sommers9 »

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 http://forum.odroid.com/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.

User avatar
meveric
Posts: 11613
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, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 71 times
Been thanked: 514 times
Contact:

Re: Kiosk-like project

Post by meveric »

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
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Kiosk-like project

Post by mad_ady »

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.

sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sommers9 »

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 (http://forum.odroid.com/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)?

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Kiosk-like project

Post by odroid »

Hardware accelerated video renderer supports only fullscreen mode.

If you don't use 4K/UHD display, you can try to use the Mali driver.
http://forum.odroid.com/viewtopic.php?f=136&t=21948
Scaling seem to be possible with OpenGL-ES zoom API.

sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sommers9 »

Someone mentioned video acceleration in browser: http://forum.odroid.com/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?

User avatar
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Kiosk-like project

Post by mad_ady »

This should work on the C1 as well (with crashoverride's c2play): http://forum.odroid.com/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
meveric
Posts: 11613
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, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 71 times
Been thanked: 514 times
Contact:

Re: Kiosk-like project

Post by meveric »

sommers9 wrote:Someone mentioned video acceleration in browser: http://forum.odroid.com/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.

sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sommers9 »

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?

User avatar
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Kiosk-like project

Post by mad_ady »

Apparently accelerated video decoding is not working in linux in general:https://bugs.chromium.org/p/chromium/is ... ?id=137247

sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sommers9 »

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.

User avatar
meveric
Posts: 11613
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, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 71 times
Been thanked: 514 times
Contact:

Re: Kiosk-like project

Post by meveric »

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.

sommers9
Posts: 6
Joined: Mon Jan 02, 2017 12:25 am
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sommers9 »

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

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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
mad_ady
Posts: 9689
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 609 times
Been thanked: 721 times
Contact:

Re: Kiosk-like project

Post by mad_ady »

Did you try the odroid.c2.video.helper + c2play approach?

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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...

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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...

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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...

Bagman
Posts: 27
Joined: Fri Jul 29, 2016 1:32 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by Bagman »

Absolutely Interested in this. Thanks if you can provide demo and instructions on how to replicate!

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Kiosk-like project

Post by odroid »

I am really interested in this topic too.
Please consider writing an article for our Magazine.

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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.

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

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
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Kiosk-like project

Post by odroid »

I'm waiting the video.

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

Here is the second video example, this time I used the Matrix as a sample video.
https://drive.google.com/a/websymantecs ... sp=sharing

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Kiosk-like project

Post by odroid »

Great.
How did you make the Firefox can play 1080p video smoothly?

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

1. VideoJS (open source)
2. Encode at 24/25fps or <6.5 Mbsp, Ideally ~5mpbs
3. Buy me a beer 8-)

User avatar
odroid
Site Admin
Posts: 38033
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1999 times
Been thanked: 1206 times
Contact:

Re: Kiosk-like project

Post by odroid »

Thank you for sharing.
Ah.. software video decoding on VideoJS shows acceptable rendering performance if the video stream is near 5mbps.

sousaplex
Posts: 20
Joined: Fri Sep 15, 2017 12:20 am
languages_spoken: english
ODROIDs: C2, C4
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by sousaplex »

Have you tried this with an XU4? Also, have you tried with webm?

xymantec
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2
Location: Vancouver, WA
Has thanked: 0
Been thanked: 0
Contact:

Re: Kiosk-like project

Post by xymantec »

sousaplex wrote:Have you tried this with an XU4? Also, have you tried with webm?
I have not tried it on an XU4 but I am assuming it should work as well. If you get around to trying it let us know if it does.
My signature, something cool and "original" for everyone to admire...

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest