please choosego to mobile | Continue to access the PC version
Author: swordfish6975

Openelec Build for OPI PC and 2 now with HW decoding

  [Copy link]

4

threads

1118

posts

9144

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9144
Published in 2015-12-13 05:50:59 | Show all floors
I have an idea how to fix this green stripe. I will try in the following days. At weekends, I don't have much time... Can someone please check width and heights of the videos with green stripe problems? I suspect that those numbers are rounded to be divisible with 16 by VPU.

@lymon,
about IR: Search for "lirc devinput". It seems that this kind of IR is automatically used by kodi. Only mapping of the keys must be set. Currently I've got focus more on codecs and display. Care to research and post a tutorial?

About PVR plugins: Kodi 16 has changes in PVR API, so all plugins must be updated. Maybe most of them are already, I didn't check them yet. It's not hard to build them with OpenELEC build system. There are even tutorials how to do that on net.

About sound: There are a lot of strange things about sound here. Is someone here expert on ALSA and would like to help?

About post processing: Everything is done with CPU and GPU and it is stock kodi code. Those things will work better once direct display (zero copy) and HW deinterlacing is implemented. H3 display driver can do some kind of post processing. We will see when we will get there.

0

threads

41

posts

213

credits

Intermediate member

Rank: 3Rank: 3

credits
213
Published in 2015-12-13 08:29:33 | Show all floors
jernej replied at 2015-12-13 05:50
I have an idea how to fix this green stripe. I will try in the following days. At weekends, I don't  ...

Mmm i'm pretty sure that i had green stripes with videos with exact resolution of 1280*720.
So this doesn't seem to be the problem. By the way tomorrow i will test again.


About the problems with lirc and PVR: they shouldn't be too difficult to solve.
I think you can leave these problems to be solved by us so you can focus on difficult things

Just a note about passthrough.
As i already said, when you start a movie with passthrough enabled there is a strange noise (bzzzz).
This same problem is present in Kodi for Android too. So i think is more a Kodi problem than a Linux problem.
Another interesting thing is that passthrough hasn't this problem with MXPlayer for Android.
So i'm pretty sure it's only a matter to fix Kodi for our device..

1

threads

90

posts

761

credits

Senior member

Rank: 4

credits
761
Published in 2015-12-13 18:32:15 | Show all floors

,

Edited by lymon at 2015-12-14 00:13

I have got my ir-remote working, but the sunxi-ir driver sucks balls and looks like it only supports the NEC protocol
So if you have a remote that uses the NEC protocol, you are in luck.

small howto:
log in via ssh and kill kodi:
  1. systemctl stop kodi
Copy code
check to see if your remote is supported/seen by the sunxi-ir driver:
  1. ir-keytable -t --sysdev=devinput -d /dev/input/event1
Copy code
press some buttons on your remote and if you get any output you are in business.

Now we will map the buttons from the remote to kodi-events by  using irrecord:
  1. irrecord /storage/lircd.conf -H devinput -d /dev/input/event1
Copy code
Follow the instructions as shown on the screen and map kodi events to buttons.
eg. name of button: KEY_UP
press ENTER and press up button on remote
name of button: KEY_LEFT
press ENTER and press left button on remote
name of button: KEY_RIGHT
press ENTER and press right button on remote
name of button: KEY_SELECT
press ENTER and press select or ok button on remote
etc.

Once finished exit out of irrecord and open the newly created lircd.conf:
  1. nano /storage/lircd.conf
Copy code

You will have to manually edit the scancodes as these won't exactly match actual scancodes.

eg.
KEY_UP                   0x0001000500000001 0x0000000000000000
needs to be:
KEY_UP                   0x0001000500000001

KEY_RIGHT                  0x0001000900000001 0x0000000000000000
needs to be:
KEY_RIGHT                0x0001000900000001

etc.

(so you basically remove all trailing "0x0000000000000000"from the scancodes)

After editing/correcting the scancodes, also change the text (at the top of the file)  "name /storage/lircd.conf" to "name devinput" and save the file (CTRL + X)

Next thing to do is to create an autostart file in /storage/.config:
  1. nano /storage/.config/autostart.sh
Copy code
copy/paste :
  1. #!/bin/sh

  2. killall lircd
  3. lircd -H devinput -d /dev/input/event1 /storage/lircd.conf
Copy code
save the file (CTRL + X)

and change permissions:
  1. chmod +rx /storage/.config/autostart.sh
Copy code

Reboot and after kodi has restarted your ir-remote should work.

0

threads

41

posts

213

credits

Intermediate member

Rank: 3Rank: 3

credits
213
Published in 2015-12-13 23:20:44 | Show all floors
Edited by runnerway at 2015-12-13 23:29
lymon replied at 2015-12-13 18:32
I have got my ir-remote working, but the sunxi-ir driver sucks balls and looks like it only supports ...

Thank you. Good guide It should go to the first post.


I did a little edit to make my remote works.
When we need to manually edit lircd.conf i had to change for example:


  1. KEY_UP                   0x01004000000001 0x00000000000000
Copy code

to

  1. KEY_UP                   0x01004000000001
Copy code

Making as you said doesn't work for me.







By the way i have to confirm that videos with green stripe are normal 1280*720 pixels.
So probably it's not caused by numbers not divisible with 16.

1

threads

90

posts

761

credits

Senior member

Rank: 4

credits
761
Published in 2015-12-13 23:52:41 | Show all floors
runnerway replied at 2015-12-13 23:20
Thank you. Good guide It should go to the first post.

yes, I just tried with a second remote and noticed you only have to remove the trailing "0x00000000000000" from every scancode and then it will work also.
(I have just changed my howto with this new info)

1

threads

90

posts

761

credits

Senior member

Rank: 4

credits
761
Published in 2015-12-14 00:23:28 | Show all floors
Edited by lymon at 2015-12-14 00:53

H265:
green stripe: yuv420p(tv), 1280x720
no green stripe: yuv420p(tv, bt709), 1920x960 [SAR 1:1 DAR 2:1]

H264
"transparent" stripe: yuv420p, 720x302 [SAR 1:1 DAR 360:151]
"transparent" stripe: yuv420p, 720x404 [SAR 404:405 DAR 16:9]
"transparent" stripe: yuv420p(tv, bt709/unknown/unknown), 720x404 [SAR 1:1 DAR 180:101]
no stripe: yuv420p, 544x576 [SAR 32:17 DAR 16:9]


0

threads

2

posts

385

credits

Intermediate member

Rank: 3Rank: 3

credits
385
Published in 2015-12-14 14:18:39 | Show all floors
Hello! How to enable analog video output for old TV? My device is OrangePI-PC with latest OpenELEC.

0

threads

29

posts

204

credits

Intermediate member

Rank: 3Rank: 3

credits
204
Published in 2015-12-14 20:51:03 | Show all floors
Keep the good work. I installed the OPI PC version on my OPI PC and it works. Tried with an FullHD tv and the speed of kodi is way faster than on Rpi 1B+. Video acceleration seems to work.
I noticed that the HDMI CEC feature is still missing - any plans for this features?

1

threads

90

posts

761

credits

Senior member

Rank: 4

credits
761
Published in 2015-12-15 01:36:30 | Show all floors
Edited by lymon at 2015-12-15 01:59
andrejb replied at 2015-12-14 20:51
Keep the good work. I installed the OPI PC version on my OPI PC and it works. Tried with an FullHD t ...
I don't think there's a (working) hdmi_cec driver available for kernel 3.4.39...so you will probably have to wait until there's a newer kernel available for the OrangePi. (which will probably be never)


Question: can anyone give me a few hints on how to include (PVR) addons when compiling openelec from source ? I searched everywhere but can't find a working answer for kodi 16.
the (PVR) addons are in the folder OpenELEC-OPi2/packages/mediacenter/kodi-binary-addons/ , but how do I include these ?

I tried to compile openelec with the following flags " PROJECT=OPi2 PVR=yes ARCH=arm make image" - doesn't work ..no extra addons
I tried to compile openelec with the following flags " PROJECT=OPi2 ADDONS="pvr.hts pvr.iptvsimple pvr.pctv" ARCH=arm make image" - doesn't work ..no pvr addons
I tried adding the line ADDONS="pvr.hts pvr.iptvsimple pvr.pctv" to the options file @  OpenELEC-OPi2/distributions/OpenELEC/ -  doesn't work ..addons are not there





4

threads

1118

posts

9144

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9144
Published in 2015-12-15 02:25:09 | Show all floors
Edited by jernej at 2015-12-16 18:08

I added all HW accelerated codecs. Can someone test them as much as possible? Be aware that there is more than one option for one codec. For example, H264 has multiple profiles and not all might work. In this patch all supported codecs can be seen:
https://github.com/jernejsk/Open ... di-003-cedarx.patch

Latest orange pi 2 image can be found here:
EDIT: not the latest anymore

I have found workaround for kswapd bug. Just open and close few movies after a few seconds and hopefully kswapd will go to 0%. Does anybody have a clue what is going on?

@destruct0r,
currently there is a way via kernel arguments, described page or two back. You can also compile openelec from source and change display options in orange_pi2.fex. In future, when I will have time, I might implement switching between HDMI and TV output directly from kodi.

@andrejb,
there is some code about CEC available but I don't know if it's working, because it is commented out. Also it is not on my priority list, because I do not own TV. I have only HDMI display.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list