Openelec

Moderators: mdrjr, odroid

Openelec

Unread postby jeroen79 » Thu Mar 03, 2016 3:52 am

Is there a openelec build comming soon?

I know openelec 64bit arm isn't ready, but a 32bit version should work fine for the time being.

Also does the C2 have propper CEC support?

Thanks,
Jeroen
jeroen79
 
Posts: 29
Joined: Fri Jan 23, 2015 3:45 am
languages_spoken: english

Re: Openelec

Unread postby odroid » Thu Mar 03, 2016 10:29 am

32bit & 64bit combined Mali GPU drivers will be available in early April probably.
In that case, we can expect the 32bit version of OE for C2.

Kodi 16 GUI works on our Ubuntu(64bit) FBDEV Mali GPU driver at this moment. It has OpenGL ES acceleration.
But there is no hardware(VPU) accelerated video decoding yet. We may need 1~2 months to enable it.
After that, OE developers can use it. I also heard OE team still have some issues to build it for Aarch64.
So it is not easy to know when we can have an OE 64bit build for C2.

We could use the CEC function with Kodi 17 alpha on Android OS flawlessly.
So we can say the CEC works properly.
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Openelec

Unread postby wrxtasy » Thu Mar 03, 2016 1:05 pm

Yes, the 64bit underlying Linux OS that OE uses is sort of working on the S905 C2 after a bunch of patching.

Aarch64 compatibility is proving a bit of a bitch, especially with Kodi which is having a real hard time with 64bit OE with segmentation faults popping up.
Just like the newly released Aarch64 RPi3, its going to take a little while for Kodi and Aarch64/Linux to catch up.
A 32bit version would be likely to be released first.....

But then we get to the next issue which is the AML S905 Display Mode ID's have all changed in the v3.14.xx S905 Kernel. This breaks Kodi display mode signalling working at all, when using the amcodec decoder. So no Linux / Kodi S905 Hardware accelerated video currently until that is all modded. Basically amcodec decoding is broken for the S9xx's which AML OE/Linux Kodi uses exclusively. :cry:

Mediacodec and hardware accelerated video when using Android Kodi basically works as it uses different Google Android Lollipop OS hooks, but even then mpeg2 Interlaced content will default to ff-mpeg2 software decoding with lousy software deinterlacing.

WeTek are currently re-writing the amcodec decoder to fix a whole bunch of issues with Hardware accelerated video compatibility with OE/Android Kodi on new S9xx hardware. This may take some time, so please be patient.
LibreELEC Krypton C1(+) HERE
LibreELEC Krypton C2 HERE
User avatar
wrxtasy
 
Posts: 1288
Joined: Wed May 13, 2015 1:59 pm
Location: Australia
languages_spoken: english
ODROIDs: C1, C1+, C2

Re: Openelec

Unread postby wrxtasy » Thu Mar 03, 2016 3:10 pm

[b]If any of the Linux or HardKernel Guru's would like to take a look at this OE dmesg Log please and see if a possible Kernel Config modification may be need from the standard HK setup ?

http://sprunge.us/eQYR

Cheers.
LibreELEC Krypton C1(+) HERE
LibreELEC Krypton C2 HERE
User avatar
wrxtasy
 
Posts: 1288
Joined: Wed May 13, 2015 1:59 pm
Location: Australia
languages_spoken: english
ODROIDs: C1, C1+, C2

Re: Openelec

Unread postby OverSun » Thu Mar 03, 2016 4:17 pm

Did you try the unofficial hack for amlibs I did a month ago? https://github.com/Owersun/c2_aml_libs
Works fine for me this month already.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby odroid » Thu Mar 03, 2016 6:43 pm

OverSun wrote:Did you try the unofficial hack for amlibs I did a month ago? https://github.com/Owersun/c2_aml_libs
Works fine for me this month already.

I've overlooked this great treasure.
We will try to build it and share a test result tomorrow.
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Openelec

Unread postby Brian.K » Thu Mar 03, 2016 7:07 pm

OverSun wrote:Did you try the unofficial hack for amlibs I did a month ago? https://github.com/Owersun/c2_aml_libs
Works fine for me this month already.

I tried build your c2_aml_libs. But, it could not be built.
Code: Select all
odroid@odroid64:~$ git clone https://github.com/Owersun/c2_aml_libs.git
odroid@odroid64:~$ cd c2_aml_libs/
odroid@odroid64:~/c2_aml_libs$ make
(......)
audio_out/alsactl_parser.c: In function 'strtrimr':
audio_out/alsactl_parser.c:14:12: warning: implicit declaration of function 'isspace' [-Wimplicit-function-decla]
     while (isspace(pstr[i]) && (i >= 0))
            ^
Makefile:30: recipe for target 'libamadec.so' failed
make[1]: *** [libamadec.so] Error 1
make[1]: Leaving directory '/home/odroid/c2_aml_libs/amadec'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
odroid@odroid64:~/c2_aml_libs$

* c2_aml_libs build log

gcc version is
Code: Select all
odroid@odroid64:~/c2_aml_libs$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.3.1-10ubuntu1' --with-bugurl=file:///usru
Thread model: posix
gcc version 5.3.1 20160224 (Ubuntu/Linaro 5.3.1-10ubuntu1)
User avatar
Brian.K
 
Posts: 246
Joined: Tue Sep 15, 2015 7:30 pm
Location: South Korea
languages_spoken: English, Korean
ODROIDs: XU4, C1+, C2

Re: Openelec

Unread postby OverSun » Thu Mar 03, 2016 9:26 pm

Even you skimmed crucial info, or you have "fail on warnings" enabled, because the one you pasted is a warning, and there are millions in amllibs, I once tried to fix them, but gave up very quickly, there are too many to deal with.
I just verified, I have the same warning as you, but the build doesn't fail for me. That means for sure you have "fail on warning" enabled, and you are not going to build this piece of sh.. great software like this. It has million of warning during the build. And that it works in the end is a matter of pure magic I cannot argue with.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby meveric » Thu Mar 03, 2016 11:43 pm

I've successfully build the aml-libs package and build a new version of Kodi right now.
If everything works, I'll upload a new version to my repo later today :)

Edit:
packages are in my repository for testing.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby elatllat » Fri Mar 04, 2016 5:27 am

meveric wrote:...new version of Kodi...in my repository...


I'm exited to hear about this. :)

The only "Kodi" I see in your "HOWTO/Package List" is for "Debian Wheezy" any idea if there will be a version for (or if it works with) the official ubuntu 16.04 ?
Is that "Kodi" version 16.0 ?
elatllat
 
Posts: 619
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4

Re: Openelec

Unread postby crashoverride » Fri Mar 04, 2016 5:44 am

@Brian.K, the error is here:
https://gist.github.com/bkrepo/ad5a08429f773106c875#file-gistfile1-txt-L715
The development package for asound needs to be installed. If I recall correctly that is "sudo apt-get install libasound2-dev".
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby phoenix73 » Fri Mar 04, 2016 6:03 am

Kodi on C2 is highly awaited :=)

Thanks for your works
phoenix73
 
Posts: 61
Joined: Sun Mar 22, 2015 4:59 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby Brian.K » Fri Mar 04, 2016 9:59 am

crashoverride wrote:@Brian.K, the error is here:
https://gist.github.com/bkrepo/ad5a08429f773106c875#file-gistfile1-txt-L715
The development package for asound needs to be installed. If I recall correctly that is "sudo apt-get install libasound2-dev".


Thank you. aml lib was built successfully after installing libasound2-dev. :-)
User avatar
Brian.K
 
Posts: 246
Joined: Tue Sep 15, 2015 7:30 pm
Location: South Korea
languages_spoken: English, Korean
ODROIDs: XU4, C1+, C2

Re: Openelec

Unread postby meveric » Fri Mar 04, 2016 3:10 pm

elatllat wrote:
meveric wrote:...new version of Kodi...in my repository...


I'm exited to hear about this. :)

The only "Kodi" I see in your "HOWTO/Package List" is for "Debian Wheezy" any idea if there will be a version for (or if it works with) the official ubuntu 16.04 ?
Is that "Kodi" version 16.0 ?

sorry, I forgot to add kodi-odroid in the list for Debian Jessie. It's on there for a long time already, I just forgot to add it.
Anyway. Kodi 16 is available for Debian Jessie in my repo for the C2 and for all other boards.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby OverSun » Fri Mar 04, 2016 4:58 pm

Just tell me someone does it work? =D
I did it like a month ago for myself, and it does work for me for the whole month already. I didn't announce it loud, because I have no idea how this piece of sh.. great software does its job, and all what I did was a rude hack to punch stuff in places where they should be for C2 64-bit kernel 3.14.
I thought it is done already the proper way by the people who wrote the libraries, and almost deleted the git.
So does it work or not? Because "works for me" often doesn't mean anything.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby odroid » Fri Mar 04, 2016 5:53 pm

@meveric,
I added your repo into our Ubuntu image as your howto guide and I did "apt-get update && apt-get dist-upgrade".
I could see "Hit:4 http://oph.mdrjr.net/meveric all InRelease " in that process. So it seems to be okay.

But "apt-get install kodi-odroid" shows "Unable to locate package kodi-odroid".
I think your repo should be compatible with our Ubuntu images as other Odroid boards.
Can you help me?
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Openelec

Unread postby meveric » Fri Mar 04, 2016 5:56 pm

which package list did you add? jessie/main is the one that has the packages.

Not sure if it works on Ubuntu. Could be some libraries are Debian specific. libjpegturbo62 for example.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby odroid » Fri Mar 04, 2016 5:59 pm

Yes.. there are some libraries which don't exist. :(
We will try to build it on our Ubuntu later.
Code: Select all
odroid@odroid64:~$ sudo apt-get install libjpegturbo62                         
Reading package lists... Done                                                   
Building dependency tree                                                       
Reading state information... Done                                               
E: Unable to locate package libjpegturbo62         

                           
odroid@odroid64:~$ sudo dpkg -i kodi-odroid_16.0-2+deb8_arm64.deb               
Selecting previously unselected package kodi-odroid.                           
(Reading database ... 183730 files and directories currently installed.)       
Preparing to unpack kodi-odroid_16.0-2+deb8_arm64.deb ...                       
Unpacking kodi-odroid (16.0-2+deb8) ...                                         
dpkg: dependency problems prevent configuration of kodi-odroid:                 
 kodi-odroid depends on libjpeg62-turbo (>= 1.3.1); however:                   
  Package libjpeg62-turbo is not installed.                                     
 kodi-odroid depends on libpcrecpp0 (>= 7.7); however:                         
  Package libpcrecpp0 is not installed.                                         
 kodi-odroid depends on libtag1c2a (>= 1.4); however:                           
  Package libtag1c2a is not installed.                                         
 kodi-odroid depends on libtag1c2a (>= 1.9.1); however:                         
  Package libtag1c2a is not installed.                                         
 kodi-odroid depends on libtinyxml2.6.2; however:                               
  Package libtinyxml2.6.2 is not installed.                                     
 kodi-odroid depends on mali450-odroid (>= 20160215-r5p1-1); however:           
  Package mali450-odroid is not installed.                                     
 kodi-odroid depends on libtag1-vanilla (>= 1.9.1-2.1); however:               
  Package libtag1-vanilla is not installed.                                     
                                                                               
dpkg: error processing package kodi-odroid (--install):                         
 dependency problems - leaving unconfigured                                     
Errors were encountered while processing:                                       
 kodi-odroid


BTW, does OverSun's lib work with Kodi on your C2 Debian Aarch64?
User avatar
odroid
Site Admin
 
Posts: 25057
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Openelec

Unread postby meveric » Fri Mar 04, 2016 6:03 pm

try to find out which packages are missing i can upload them separately so you can test.
mali450-odroid might be an issue, that's the GPU drivers from my repository, they probably conflict with yours.
The rest should either be part of Ubuntu repository, or I can upload it from Debian so you can try it.

And yes the libs from Oversun work. I watches a couple of h264 and h265 videos.
One or two videos were having issues, but others were working fine with HW acceleration.

But I need a second ODROID C2 to finish up my Debian Image. I can't test very well on the same machine that I use for building.
I still have issues with sound and would rather try to solve that on another image and not where I build packages.
I also want to investigate, why I have alpha issues on desktop using 32bit. 24bit works fine though.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby OverSun » Fri Mar 04, 2016 9:48 pm

yay! finally I did something that works for someone else. =D =D =D

PS. The sound from Kodi didn't work for me also, I had to patch the kernel swiping out all the 32-bit/96kHz modes, because Kodi tries to use something that produces only silence. But that one was a real brute hack, I'm not an audiophile and my TV doesn't have a Hi-Fi audio system, so 24-bit/44kHz is totally fine for me while it works. But this is not the way to do it definitely, so I didn't share that anywhere.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby meveric » Fri Mar 04, 2016 11:10 pm

I mostly have permission issues.
root user is normally not allowed to use pulse audio, so I had to force it with pulseaudio --system that way at some point I had sound in Kodi which was working fine.

The odroid user, seems to have permission issues with everything -.-
He can't even start amcodecs for some reason..
But as I said, I don't want to debug this on a image that's made for building packages.. I rather test this next week when I have my second C2 and can build packages on on ODROID and test them on another.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby OverSun » Sat Mar 05, 2016 7:05 pm

I've updated the amlibs fixing all the warning, just for fun, if it is in the end useful for someone else also.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby crashoverride » Sun Mar 06, 2016 12:11 pm

meveric wrote:I mostly have permission issues.

I am getting permission too. The permission for the include folder is incorrectly set by the installer. It does not set the "execute" bit which is required to list the files in a directory.
Code: Select all
sudo chmod -R a+x /usr/include/amcodec
sudo chmod -R a+x /usr/include/amports
sudo chmod -R a+x /usr/include/ppmgr


[Edit]
The above is not correct because it sets +x on files too.

[Edit 2]
All the device entries also have incorrect permissions
Code: Select all
$ ls -l /dev/am*
crw------- 1 root root 266, 10 Mar  5 21:27 /dev/amaudio0
crw------- 1 root root 266,  0 Mar  5 21:27 /dev/amaudio_ctl
crw------- 1 root root 266,  1 Mar  5 21:27 /dev/amaudio_utils
crw------- 1 root root 253,  0 Mar  5 21:27 /dev/amhdmitx0
crw------- 1 root root 236,  0 Mar  5 21:27 /dev/amremote
crw------- 1 root root 255,  1 Mar  5 21:27 /dev/amstream_abuf
crw------- 1 root root 255,  8 Mar  5 21:27 /dev/amstream_hevc
crw------- 1 root root 255,  3 Mar  5 21:27 /dev/amstream_mpps
crw------- 1 root root 255,  2 Mar  5 21:27 /dev/amstream_mpts
crw------- 1 root root 255,  4 Mar  5 21:27 /dev/amstream_rm
crw------- 1 root root 255,  5 Mar  5 21:27 /dev/amstream_sub
crw------- 1 root root 255,  6 Mar  5 21:27 /dev/amstream_sub_read
crw------- 1 root root 255,  7 Mar  5 21:27 /dev/amstream_userdata
crw------- 1 root root 255,  0 Mar  5 21:27 /dev/amstream_vbuf
crw------- 1 root root 241,  0 Mar  5 21:27 /dev/amsubtitle
crw------- 1 root root 237,  0 Mar  5 21:27 /dev/amvecm
crw------- 1 root root 243,  0 Mar  5 21:27 /dev/amvenc_avc
crw------- 1 root root 264,  0 Mar  5 21:27 /dev/amvideo

A udev rule needs to be added to set the 'video' group with rw permission.
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby crashoverride » Sun Mar 06, 2016 2:32 pm

OverSun wrote:Just tell me someone does it work? =D

I am unable to get anything displayed. I tried https://github.com/Owersun/mymfc/tree/c1_aml and my own code. I am not getting any errors, just nothing displayed.

For my own code, I created an EGL/GLES fbdev window and cleared it to transparent black (0, 0, 0, 0). Its my understanding that should allow the video layer to show through the frame buffer. However, I do not know if this assumption holds true for C2. I will need to test code on a C1 and see if it works any better.
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby OverSun » Sun Mar 06, 2016 7:09 pm

Give it a try with this one: https://github.com/Owersun/mymfc/tree/c1_aml, it should display you any video right on the screen through the console or whatever.
Try under root, in case of any permissions.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby meveric » Sun Mar 06, 2016 10:21 pm

crashoverride wrote:
meveric wrote:I mostly have permission issues.

I am getting permission too. The permission for the include folder is incorrectly set by the installer. It does not set the "execute" bit which is required to list the files in a directory.
Code: Select all
sudo chmod -R a+x /usr/include/amcodec
sudo chmod -R a+x /usr/include/amports
sudo chmod -R a+x /usr/include/ppmgr


[Edit]
The above is not correct because it sets +x on files too.

[Edit 2]
All the device entries also have incorrect permissions
Code: Select all
$ ls -l /dev/am*
crw------- 1 root root 266, 10 Mar  5 21:27 /dev/amaudio0
crw------- 1 root root 266,  0 Mar  5 21:27 /dev/amaudio_ctl
crw------- 1 root root 266,  1 Mar  5 21:27 /dev/amaudio_utils
crw------- 1 root root 253,  0 Mar  5 21:27 /dev/amhdmitx0
crw------- 1 root root 236,  0 Mar  5 21:27 /dev/amremote
crw------- 1 root root 255,  1 Mar  5 21:27 /dev/amstream_abuf
crw------- 1 root root 255,  8 Mar  5 21:27 /dev/amstream_hevc
crw------- 1 root root 255,  3 Mar  5 21:27 /dev/amstream_mpps
crw------- 1 root root 255,  2 Mar  5 21:27 /dev/amstream_mpts
crw------- 1 root root 255,  4 Mar  5 21:27 /dev/amstream_rm
crw------- 1 root root 255,  5 Mar  5 21:27 /dev/amstream_sub
crw------- 1 root root 255,  6 Mar  5 21:27 /dev/amstream_sub_read
crw------- 1 root root 255,  7 Mar  5 21:27 /dev/amstream_userdata
crw------- 1 root root 255,  0 Mar  5 21:27 /dev/amstream_vbuf
crw------- 1 root root 241,  0 Mar  5 21:27 /dev/amsubtitle
crw------- 1 root root 237,  0 Mar  5 21:27 /dev/amvecm
crw------- 1 root root 243,  0 Mar  5 21:27 /dev/amvenc_avc
crw------- 1 root root 264,  0 Mar  5 21:27 /dev/amvideo

A udev rule needs to be added to set the 'video' group with rw permission.


That's not the issues I'm talking of.
First: I have my own packages for aml-libs which already have corrected permissions for the folders, so I don't need to care about this.
And same as on the C1, I already have a chmod 666 /dev/am* to take care of the second issue.. But still that's not enough.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby crashoverride » Sun Mar 06, 2016 11:55 pm

I posted that info here because I was not sure where else to post it. Its something that needs to be fixed in the official Ubuntu image. I noticed there is an issue for the "includes" on the aml_libs github:
https://github.com/mdrjr/c1_aml_libs/issues/2

While not related to Openelec, I really didnt know where to post the second part about udev rules that needs to be fixed in Ubuntu. I opened a new topic for discussion about an issue tracker because of this, the debug patch, and the XEN/KVM topics which are spinning off topic.
http://forum.odroid.com/viewtopic.php?f=135&t=19280

I am finding it increasingly difficult to keep track of what is going on with forum postings. Its easy to miss when something was resolved via an apt-get update unless you are watching everything it updates every time.

[Edit]
While I am on the topic of apt-get update, I should point out that I often can not use it. This is because I have a custom modification to something like the kernel or a library which an update will wipe out. I need to be notified that an issue has been resolved/merged and then I can apt-get update.
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby meveric » Mon Mar 07, 2016 4:32 am

yeah I know what you mean.. I created my own issue tracker to keep track on all the changes and tasks I have open on my images and things I want to try.
It's getting harder and harder to keep track on everything.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby crashoverride » Mon Mar 07, 2016 10:30 am

OverSun wrote:Give it a try with this one: https://github.com/Owersun/mymfc/tree/c1_aml, it should display you any video right on the screen through the console or whatever.

I tested on a C1+

Code: Select all
$ git log
commit f87d09109198f1908cd022ead62bf8648bde67d5
Author: Owersun <owersun@gmail.com>
Date:   Sat Mar 5 01:43:24 2016 +0100

    Kodi 16 files


Code: Select all
$ sudo ./mymfc ../cxplayer/test.h264
Main::main - video file: ../cxplayer/test.h264
[h264 @ 0x1ef40] Estimating duration from bitrate, this may be inaccurate
Main::main - Video stream in the file is stream number 0
Main::main - AVCodec: h264, id 28
Main::main - Header of size 136416
CBitstreamConverter::Open avcC data too small or missing
CLinuxC1Codec::OpenDecoder
CDVDVideoCodecC1: Failed to open C1 Amlogic Codec
CLinuxC1Codec::CloseDecoder
CLinuxC1Codec::SetViewport Setting viewport to 0 0 0 0


cxplayer is the source tree for my own test program. test.h264 is the same as from here
https://github.com/OtherCrashOverride/XU4VideoCube/tree/master/bin

I tried different media files but always get the error "CDVDVideoCodecC1: Failed to open C1 Amlogic Codec". (using official Ubuntu image)
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby OverSun » Mon Mar 07, 2016 4:12 pm

I've extended this program some time ago, the file to be played can be any video right now, it uses ffmpeg to extract the video stream on the fly.
Secondly, there was one guy on the git who was writing something like this to me, the problem turns out to be that he had one of the video dimension to be detected as 0.
Try to compile the stuff with '#define _DEBUG 1' in LinuxC1Codec.h, it will give you more output, look at the size of the video detected, width and height.
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby crashoverride » Mon Mar 07, 2016 6:18 pm

I tracked down the issue. It is the same as reported with width==0. I have seen this behavior with ffmpeg/libav before so I knew exactly what to look for. The summary is there are header version mismatches:
Code: Select all
$ find /usr -name "avcodec.h"
/usr/include/libavcodec/avcodec.h
/usr/local/include/libavfilter/avcodec.h
/usr/local/include/libavcodec/avcodec.h


Removing the /usr/local/include/libav* folders and modifying the program to remove all references to HEVC (which do not exist in the ubuntu eversion) fixes the program and it does indeed work.

[Edit]
The reason for the 0 is that the struct field offsets change with different versions of libav. The public ABI is not stable between versions and this causes problems like this one. There is an extra int_32 before width in the AVCodecContex struct causing all offsets after it to be off by 4 bytes.
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby OverSun » Mon Mar 07, 2016 7:06 pm

Good, I'll know what to tell people next time they hit the problem. Sounds like it is going to be very common while using ffmpeg.
I use git master ffmpeg, probably that's why it work for me quite nice.
What about HEVC I didn't get it, what doesn't exists? The amcodec lib works pretty nice with HEVC and shows everything...
User avatar
OverSun
 
Posts: 1262
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english

Re: Openelec

Unread postby crashoverride » Mon Mar 07, 2016 7:12 pm

There is no enum/define for AV_CODEC_ID_HEVC in /usr/include/libavcodec/avcodec.h version of the file. I do not think the old version of libav supplied with Ubuntu 14.04 had support for HEVC.
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Openelec

Unread postby meveric » Mon Mar 07, 2016 8:00 pm

I think HEVC started with ffmpeg version 2.6.x probably .3 or .4 or so.
I know it was working on ffmpeg version from deb multimedia on Debian Jessie, which right now is version 2.6.8. It also works with backport version of ffmpeg directly from Debian Jessie (currently ffmpeg 2.8.6).

I was able to use this already on the C2. When there was no HW acceleration for Kodi yet.
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: 7877
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: ODROID-X2,ODROID-U2,ODROID-U3,ODROID-XU-Lite, ODROID-XU3, ODROID-XU3-Lite, ODROID-C1, ODROID-XU4, ODROID-C2

Re: Openelec

Unread postby crashoverride » Tue Mar 08, 2016 6:05 pm

I did finally manage to get my own code version working on C1. Will try it on a C2 soon. I am contemplating making a "HelloVideo" sample to post to GitHub. The key to getting everything working was in this example that is not part of our aml_libs:
https://github.com/osmc/libamcodec/blob/master/examples/esplayer.c

Instead of doing the OSD voodoo, I am simply creating a GLES window and clearing it to transparent black.

[Edit]
If I knew it was actually this easy, I would have done this a long time ago. The VPU handles all the work. I don't even have to parse NAL units.

[Edit 2]
Tried it on C2 and the program does not fail, but I can not see the video. Just a black screen. This suggests either the libMali we have behaves different, or the video layer behavior of the hardware is different. Since the mymfc player does not show video for me either, it suggests the latter since it does not use libMali.

[edit 3]
dmesg log on C2
Code: Select all
[  920.473594] codec:vdec_clock_set-----2
[  920.473615] codec:vdec1_set_clk 0, 1
[  920.473621] codec:vdec_clock_set 2 to 500
[  920.473683] codec:Video stbuf alloced at 0000000060700000, size = 15728640
[  920.473695] codec:vdec_dev_reg.mem[0x0 -- 0x0]
[  920.473701] codec:vdec base memory alloced 0000000061600000
[  920.478421] codec:amvdec_h264 mem-addr=61600000,buff_offset=60600000,buf_start=6173e000
[  920.478428] codec:H264 sysinfo: 0x0 duration=4000, pts_outside=1,
[  920.478428] codec:sync_outside=1, use_idr_framerate=0
[  920.478598] codec:264 ucode swap area: phyaddr 000000005fc78000, cpu vaddr ffffff8009e7d000
[  920.478600] codec:start load orignal firmware ...
[  920.478648] codec:loading firmware vh264_mc to vdec ram  ok!
[  920.478840] tv_vout: vout [tv_set_vframe_rate_hint] duration = 4000, policy = 1!
[  920.478842] tv_vout: vout [framerate_automation_process] duration = 4000
[  920.478844] tv_vout: framerate_automation_process[1046] fps_playing_flag = 0
[  920.478845] tv_vout: fr_vsource = 2400
[  920.478852] tv_vout: mode_target=12,is_receiver_supported=1
[  920.479257] codec:video first pts = 0
[  920.479536] codec:frame_mbs_only_flag 1, crop_bottom 4,  frame_height 1080,
[  920.479536] codec:mb_height 68,crop_right 0, frame_width 1920, mb_width 68
[  920.479587] codec:H.264: timing_info not present
[  920.480732] codec:vdec_clock_set-----166
[  920.480745] codec:vdec1_set_clk 0, 3
[  920.480752] codec:vdec_clock_set 2 to 166
[  920.480756] codec:vdec1 video changed to 1920 x 1080 24 fps clk->166MHZ
[  920.570730] switch_vpu_mem_pd: di_pre ON
[  920.580762] pre_de_buf_config: source change: 0x0/0/0/0=>0x9000/1920/1080/0
[  920.612819] codec:video first pts = ea6
[  920.612843] codec:[video4osd] first  picture {1920,1080} pts:ea6,
[  920.612853] switch_vpu_mem_pd: viu_vd1 ON
[  920.612857] switch_vpu_mem_pd: afbc_dec ON
[  920.612861] switch_vpu_mem_pd: di_post ON
[  920.629491] codec:VsyncEnableVideoLayer
[  920.679485] recycle_keep_buffer recycle keep cur di_buf 2 (
[  920.679489]  6
[  920.679494]  7
[  920.679495] )
[  933.800927] codec:DisableVideoLayer()
[  933.801114] tv_vout: vout [tv_set_vframe_rate_end_hint] return mode = 12, policy = 1!
[  933.801231] codec:DisableVideoLayer()
[  933.801238] codec:free_alloced_keep_buffer           (null).          (null).          (null)
[  933.801243] codec:keep exit is di
[  933.801248] codec:video first pts = 0
[  933.801259] di_uninit_buf keep cur di_buf 5 (0 1 -1)
[  933.801270] switch_vpu_mem_pd: di_pre OFF
[  933.801280] codec:vdec_clock_set-----0
[  933.801286] codec:vdec1 video changed to 0 x 0 0 fps clk->166MHZ
[  933.812825] codec:VsyncDisableVideoLayer
[  935.462831] switch_vpu_mem_pd: viu_vd1 OFF
[  935.462841] switch_vpu_mem_pd: afbc_dec OFF
[  935.462845] switch_vpu_mem_pd: di_post OFF

This present another option: maybe the video codec hardware behavior has changed.

[edit4]
After waiting awhile, my console blanked. Instead of black its showing green. I ran my program and the video was seen. (running from SSH so the console remains blanked)

[edit 5]
I recall reading that there were changes to the display controller to "fix" x11 alpha issues. This is probably an artifact of that because it behaves as if alpha=0xff all the time. So how do we change the display mode to re-enable alpha? My image boots to X11 first, so if there is a custom script somewhere that does "fbset" or something, please let me know.

[edit 6]
I found c2_init.sh, but there is nothing obvious that sets a RGBX mode instead of a RGBA mode.
Code: Select all
root@odroid64:/etc/initramfs-tools/scripts/local-top# cat c2_init.sh
#!/bin/sh

for x in $(cat /proc/cmdline); do
        case ${x} in
                m_bpp=*) export bpp=${x#*=} ;;
                hdmimode=*) export mode=${x#*=} ;;
        esac
done

HPD_STATE=/sys/class/amhdmitx/amhdmitx0/hpd_state
DISP_CAP=/sys/class/amhdmitx/amhdmitx0/disp_cap
DISP_MODE=/sys/class/display/mode

echo $mode > $DISP_MODE

common_display_setup() {
                M="0 0 $(($X - 1)) $(($Y - 1))"
                Y_VIRT=$(($Y * 2))
                fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
        fbset -fb /dev/fb1 -g 32 32 32 32 32
        echo $mode > /sys/class/display/mode
        echo 0 > /sys/class/graphics/fb0/free_scale
        echo 1 > /sys/class/graphics/fb0/freescale_mode
        echo $M > /sys/class/graphics/fb0/free_scale_axis
        echo $M > /sys/class/graphics/fb0/window_axis
        echo 0 > /sys/class/graphics/fb1/free_scale
}

case $mode in
                480*)
                        export X=720
                        export Y=480
                        ;;
                576*)
                        export X=720
                        export Y=576
                        ;;
                720p*)
                        export X=1280
                        export Y=720
                        ;;
                1080*)
                        export X=1920
                        export Y=1080
                        ;;
                2160p*)
                        export X=3840
                        export Y=2160
                        ;;
                smpte24hz*)
                        export X=3840
                        export Y=2160
                        ;;
                640x480p60hz*)
                        export X=640
                        export Y=480
                        ;;
                800x480p60hz*)
                        export X=800
                        export Y=480
                        ;;
                800x600p60hz*)
                        export X=800
                        export Y=600
                        ;;
                1024x600p60hz*)
                        export X=1024
                        export Y=600
                        ;;
                1024x768p60hz*)
                        export X=1024
                        export Y=768
                        ;;
                1280x800p60hz*)
                        export X=1280
                        export Y=800
                        ;;
                1280x1024p60hz*)
                        export X=1280
                        export Y=1024
                        ;;
                1360x768p60hz*)
                        export X=1360
                        export Y=768
                        ;;
                1366x768p60hz*)
                        export X=1366
                        export Y=768
                        ;;
                1440x900p60hz*)
                        export X=1440
                        export Y=900
                        ;;
                1600x900p60hz*)
                        export X=1600
                        export Y=900
                        ;;
                1680x1050p60hz*)
                        export X=1680
                        export Y=1050
                        ;;
                1920x1200p60hz*)
                        export X=1920
                        export Y=1200
                        ;;
esac

common_display_setup

# Console unblack
echo 0 > /sys/class/graphics/fb0/blank
echo 0 > /sys/class/graphics/fb1/blank


[edit 7]
Disabling X11 makes the display mode work properly. After running X11 and exiting, the display mode is changed somehow and alpha is disabled.
Code: Select all
systemctl set-default multi-user.target

to re-enable
Code: Select all
systemctl set-default graphical.target


[edit 8]
This was solved here:
http://forum.odroid.com/viewtopic.php?f=136&t=19349#p129045
crashoverride
 
Posts: 3104
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1


Return to Other OS

Who is online

Users browsing this forum: No registered users and 2 guests