4K Ambilight with hyperion and AML - dream or possibility?

Post Reply
Anthrax
Posts: 7
Joined: Wed Sep 05, 2018 8:50 pm
languages_spoken: english
ODROIDs: ODROID C2
Contact:

4K Ambilight with hyperion and AML - dream or possibility?

Unread post by Anthrax » Wed Sep 19, 2018 7:01 pm

Hello everybody,

I just joined this forum and wanted to thank all of you for the time and effort you spent/d on keeping ambilight for the odroid-c2 a possibility.

After I bought a new 4k tv i decided to retire my trusty ambilight setup (Raspberry Pi 3B, Aduino Teensy with Adalight, 116 WS2801 LEDs, Hyperion classic) and go for a shiny new Odroid-C2 with 16GB eMMC...
I was really happy how well this little thing performed when playing 2160p content. But the second I tried to get hyperion up and running all went downhill ;-(

After hours of research on a handful of forums I figured that there was once again a rift going through the Open/Libre/Core-Elec community and the best best for Odroid support would be Coreelec because most devs seemed to have flocked there.

After much trial and error with different builds (LE, milhouse, CE) and hyperion versions I'm on the verge of sending my Odroid back (sadly without any viable ambilight alternative) :-(

So my question is:
Is there any known configuration/combination of *ELEC-build & hyperion that does 4k without issue?

best regards
Anthrax

PS: I'm currently trying to make sense of all the different kernel, hyperion and *ELEC patches that float around between forums to possibly be able to build something myself - but the info is to cluttered for me to grasp at the moment...
Is there anybody who could point me in the right direction an give some advice?

alex240188
Posts: 135
Joined: Thu Oct 01, 2015 12:46 am
languages_spoken: english
ODROIDs: C1+, C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by alex240188 » Mon Oct 15, 2018 4:25 am

Not sure what you mean.
Hyperion works fine on c2 using coreelec straight from the source.
I downloaded the Hyperion.ng add-on from repository.
Copied it to /storage and created some python scripts to start stop which can be run from main menu as I don't want it on all the time.
4k h264 works perfectly out of the box.
H265 requires a tweak.
I do

Code: Select all

echo 3 | tee /sys/module/amvdec_h265/parameters/double_write_mode
In autostart.sh which works fine for me in 4k h265

Odroid C2
196x ws2812b LEDs
Arduino Uno (fastled)
5v20a PSU

Blokmeister
Posts: 3
Joined: Sun Jun 26, 2016 6:48 pm
languages_spoken: English, Dutch
ODROIDs: C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Blokmeister » Fri Oct 26, 2018 6:47 pm

Could you tell me how I would set that up, and maybe share your config file? Every time I start playing a 4k file, my ambilight system shuts down. I'm using the amlogic internal grabber. I also have problems with the infamous video slowdown after a few minutes.

Anthrax
Posts: 7
Joined: Wed Sep 05, 2018 8:50 pm
languages_spoken: english
ODROIDs: ODROID C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Anthrax » Sun Nov 04, 2018 7:47 pm

Blokmeister wrote:Could you tell me how I would set that up, and maybe share your config file? Every time I start playing a 4k file, my ambilight system shuts down. I'm using the amlogic internal grabber. I also have problems with the infamous video slowdown after a few minutes.
Exactly my problem as well...

Anthrax
Posts: 7
Joined: Wed Sep 05, 2018 8:50 pm
languages_spoken: english
ODROIDs: ODROID C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Anthrax » Tue Nov 06, 2018 5:38 pm

Well, I'll be damned...

I just got my hands on an used Odroid C2 again and gave it another try.

Using completely pristine CoreELEC 8.95.4.3, the Hyperion.NG addon from the repo and the fix from alex240188 "echo 3 | tee /sys/module/amvdec_h265/parameters/double_write_mode" I now have a working 4K Ambilight with 160LEDs!

Thank you all who made this a reality...

best regards
Anthrax

User avatar
odroid
Site Admin
Posts: 29994
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by odroid » Tue Nov 06, 2018 5:46 pm

Glad to hear you made it finally with the latest CoreELEC.
BTW, do you use the Teensy LED drive with C2 board too?

jrdallas
Posts: 1
Joined: Tue Nov 06, 2018 7:47 pm
languages_spoken: english
ODROIDs: c2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by jrdallas » Tue Nov 06, 2018 7:49 pm

@Those who have it working, would you mind sharing your config file? Thanks in advance!

Blokmeister
Posts: 3
Joined: Sun Jun 26, 2016 6:48 pm
languages_spoken: English, Dutch
ODROIDs: C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Blokmeister » Tue Nov 06, 2018 9:49 pm

Okay @Anthrax, I followed your lead and also got it to work. Just like you said. Clean install of CoreELEC, install hyperion.ng, enter

Code: Select all

echo 3 | tee /sys/module/amvdec_h265/parameters/double_write_mode
through SSH and BOOM! Working Ambilight at 4K! Now I backed up the data, and am going to restore a previous backup to see if that still works. I'll report back!

My hyperion config file can be found here: https://1drv.ms/u/s!AobCq5ze7nsqgbglCTcutpMgz2AMOg see below:

My setup is as follows:
  • Odroid C2 running hyperion.ng to capture images straight from the internal grabber (aml I think). It directly drives 2 atmoorb devices next to my TV and also forwards the data to a raspberry pi 2.
  • The RPI2 runs LibreELEC and 3 hyperion instances. The data from the Odroid is forwarded to the first instance.
  • Instance one drives the IO pins that are connected to a LED strip that is taped to my TV, it also forwards the data to the two other instances.
  • Instance two drives two Hue lamps on the wall behind my TV
  • Instance three drives three Hue lamps on the wall behind my couch.

Code: Select all

{
	"backgroundEffect": {
		"color": [
			0,
			0,
			0
		],
		"effect": "Warm mood blobs",
		"enable": true,
		"type": "color"
	},
	"blackborderdetector": {
		"blurRemoveCnt": 1,
		"borderFrameCnt": 50,
		"enable": true,
		"maxInconsistentCnt": 10,
		"mode": "default",
		"threshold": 5,
		"unknownFrameCnt": 600
	},
	"boblightServer": {
		"enable": false,
		"port": 19333,
		"priority": 201
	},
	"color": {
		"channelAdjustment": [
			{
				"backlightColored": false,
				"backlightThreshold": 0,
				"black": [
					0,
					0,
					0
				],
				"blue": [
					0,
					0,
					255
				],
				"brightness": 100,
				"brightnessCompensation": 100,
				"cyan": [
					0,
					255,
					200
				],
				"gammaBlue": 1.5,
				"gammaGreen": 1.5,
				"gammaRed": 1.5,
				"green": [
					0,
					255,
					0
				],
				"id": "default",
				"leds": "*",
				"magenta": [
					255,
					0,
					200
				],
				"red": [
					255,
					0,
					0
				],
				"white": [
					255,
					255,
					150
				],
				"yellow": [
					255,
					230,
					0
				]
			}
		],
		"imageToLedMappingType": "multicolor_mean"
	},
	"device": {
		"colorOrder": "rgb",
		"latchTime": 1,
		"numLeds": 24,
		"orbIds": "1,2",
		"output": "239.15.18.2",
		"port": 49692,
		"rewriteTime": 5000,
		"type": "atmoorb",
		"useOrbSmoothing": true
	},
	"effects": {
		"disable": [
			""
		],
		"paths": [
			"$ROOT/custom-effects",
			"/storage/.kodi/addons/service.hyperion.ng/effects"
		]
	},
	"foregroundEffect": {
		"color": [
			0,
			0,
			255
		],
		"duration_ms": 5000,
		"effect": "Rainbow swirl fast",
		"enable": true,
		"type": "effect"
	},
	"forwarder": {
		"enable": true,
		"json": [
			"192.168.1.51:19444"
		],
		"proto": [
			"192.168.1.51:19445"
		]
	},
	"framegrabber": {
		"cropBottom": 0,
		"cropLeft": 0,
		"cropRight": 0,
		"cropTop": 0,
		"device": "/dev/fb0",
		"display": 0,
		"enable": true,
		"frequency_Hz": 24,
		"height": 45,
		"horizontalPixelDecimation": 8,
		"priority": 250,
		"type": "amlogic",
		"useXGetImage": false,
		"verticalPixelDecimation": 8,
		"width": 80
	},
	"general": {
		"name": "My Hyperion Config",
		"showOptHelp": true
	},
	"grabberV4L2": [
		{
			"blueSignalThreshold": 5,
			"cropBottom": 0,
			"cropLeft": 0,
			"cropRight": 0,
			"cropTop": 0,
			"device": "auto",
			"enable": false,
			"frameDecimation": 2,
			"greenSignalThreshold": 5,
			"height": 0,
			"input": 0,
			"priority": 240,
			"redSignalThreshold": 5,
			"sDHOffsetMax": 0.75,
			"sDHOffsetMin": 0.25,
			"sDVOffsetMax": 0.75,
			"sDVOffsetMin": 0.25,
			"signalDetection": false,
			"sizeDecimation": 8,
			"standard": "PAL",
			"width": 0
		}
	],
	"jsonServer": {
		"port": 19444
	},
	"ledConfig": {
		"bottom": 0,
		"edgegap": 0,
		"glength": 0,
		"gpos": 0,
		"hdepth": 8,
		"left": 1,
		"overlap": 0,
		"position": 0,
		"reverse": false,
		"right": 1,
		"top": 0,
		"vdepth": 5
	},
	"leds": [
		{
			"hscan": {
				"maximum": 1,
				"minimum": 0.95
			},
			"index": 0,
			"vscan": {
				"maximum": 1,
				"minimum": 0
			}
		},
		{
			"hscan": {
				"maximum": 0.05,
				"minimum": 0
			},
			"index": 1,
			"vscan": {
				"maximum": 1,
				"minimum": 0
			}
		}
	],
	"logger": {
		"level": "debug"
	},
	"protoServer": {
		"port": 19445
	},
	"smoothing": {
		"continuousOutput": true,
		"enable": true,
		"time_ms": 200,
		"type": "linear",
		"updateDelay": 0,
		"updateFrequency": 25
	},
	"udpListener": {
		"address": "239.255.28.01",
		"enable": false,
		"port": 2801,
		"priority": 200,
		"shared": false,
		"timeout": 10000
	},
	"webConfig": {
		"document_root": "",
		"enable": true,
		"port": 8090
	}
}
There is one thing that I'm missing. I don't have the option to choose what I want to capture. I only want to capture video, nothing else. Is there something I can change so that it only captures video?

Anthrax
Posts: 7
Joined: Wed Sep 05, 2018 8:50 pm
languages_spoken: english
ODROIDs: ODROID C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Anthrax » Wed Nov 07, 2018 1:10 am

Hey Blokmeister,

glad you got it working as well!

I use this litte addon to have kodi events control hyperion:

https://github.com/hyperion-project/hyp ... issues/474

just install the zipped addon from the first post and you should be goood to :-)

best regards
Anthrax

Anthrax
Posts: 7
Joined: Wed Sep 05, 2018 8:50 pm
languages_spoken: english
ODROIDs: ODROID C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by Anthrax » Wed Nov 07, 2018 1:12 am

odroid wrote:Glad to hear you made it finally with the latest CoreELEC.
BTW, do you use the Teensy LED drive with C2 board too?
yes, i carried that part over from my first Windows based HTPC. It's connected via USB and makes connecting/disconnecting the Odroid easier as well.

Anthrax

kban
Posts: 4
Joined: Sun Nov 18, 2018 6:22 pm
languages_spoken: english, spanish
ODROIDs: odroid-c2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by kban » Sun Nov 18, 2018 6:32 pm

Anthrax wrote:Hello everybody,

I just joined this forum and wanted to thank all of you for the time and effort you spent/d on keeping ambilight for the odroid-c2 a possibility.

After I bought a new 4k tv i decided to retire my trusty ambilight setup (Raspberry Pi 3B, Aduino Teensy with Adalight, 116 WS2801 LEDs, Hyperion classic) and go for a shiny new Odroid-C2 with 16GB eMMC...
I was really happy how well this little thing performed when playing 2160p content. But the second I tried to get hyperion up and running all went downhill ;-(

After hours of research on a handful of forums I figured that there was once again a rift going through the Open/Libre/Core-Elec community and the best best for Odroid support would be Coreelec because most devs seemed to have flocked there.

After much trial and error with different builds (LE, milhouse, CE) and hyperion versions I'm on the verge of sending my Odroid back (sadly without any viable ambilight alternative) :-(

So my question is:
Is there any known configuration/combination of *ELEC-build & hyperion that does 4k without issue?

best regards
Anthrax

PS: I'm currently trying to make sense of all the different kernel, hyperion and *ELEC patches that float around between forums to possibly be able to build something myself - but the info is to cluttered for me to grasp at the moment...
Is there anybody who could point me in the right direction an give some advice?
I have the exact same setup, and im not able to make it work on the new hyperion-ng.

Right now i have this setup up and running:
Aduino Teensy with Adalight, 150 WS2801 LEDs, Hyperion classic, libreelec 8.2.5
but with the know problem wich makes ambilight and video lost sync after 10-15 minutes, i ve tried overclocking the DRAM, etc, nothing makes this problem goes away.

After reading that some people have ambilight working without issues using corelec, i decided to give it a try, i installed coreelec 8.95.5 in another microSD, hyperionNG using the previously working config on hyperion classic, and the same hardware setup that was working with libreelec+hyperion classic, but the ambilight goes flickering and making random things as soon as i start the service.

Any idea or advice? I mean, it can't be a hardware problem, as this exact setup is working with LE+Hyperion Classic.

this is an extract of my hyperion config:

Code: Select all

{
	// DEVICE CONFIGURATION 
	"device" :
	{
		"name"       : "Odroid",
		"type"       : "adalight",
		"output"     : "/dev/ttyACM0",
		"rate"     : 460800,
		"delayAfterConnect"     : 0,
		"colorOrder" : "brg"
	},

	// COLOR CALIBRATION CONFIG
	"color" :
	{
		"channelAdjustment" :
		[
			{
				"id"   : "default",
				"leds" : "*",
				"pureRed" :
				{
					"redChannel"		: 199,
					"greenChannel"		: 0,
					"blueChannel"		: 0
				},
				"pureGreen" :
				{
					"redChannel"		: 0,
					"greenChannel"		: 255,
					"blueChannel"		: 0
				},
				"pureBlue" :
				{
					"redChannel"		: 0,
					"greenChannel"		: 0,
					"blueChannel"		: 255
				}
			}
		],
		"temperature" :
		[
			{
				"id"   : "default",
				"leds" : "*",
				"correctionValues" :
				{
					"red" 	: 255,
					"green"	: 255,
					"blue" 	: 255
				}
			}
		],
		"transform" :
		[
			{
				"id"   : "default",
				"leds" : "*",
				"hsl" :
				{
					"saturationGain"	: 1.0000,
					"luminanceGain"		: 1.0000,
					"luminanceMinimum"		: 0.0000
				},
				"red" :
				{
					"threshold" 	: 0.0000,
					"gamma"     	: 2.5000
				},
				"green" :
				{
					"threshold" 	: 0.0000,
					"gamma"     	: 2.5000
				},
				"blue" :
				{
					"threshold" 	: 0.0000,
					"gamma"     	: 2.5000
				}
			}
		],
	// SMOOTHING CONFIG
		"smoothing" :
		{
			"type"            : "linear",
			"time_ms"         : 120,
			"updateFrequency" : 10.0000,
			"updateDelay"     : 0
		}
	},

	// NO V4L2 GRABBER CONFIG
	// AML GRABBER CONFIG
	"amlgrabber" : 
	{
		"width" : 64,
		"height" : 64,
		"frequency_Hz" : 100.0,
		"priority" : 880
	},

	// BLACKBORDER CONFIG
	"blackborderdetector" : 
	{
		"enable" : true,
		"threshold" : 0.0,
		"unknownFrameCnt" : 600,
		"borderFrameCnt" : 50,
		"maxInconsistentCnt" : 10,
		"blurRemoveCnt" : 1,
		"mode" : "classic"
	},

	// KODI CHECK CONFIG
	"xbmcVideoChecker" : 
	{
		"xbmcAddress" : "127.0.0.1",
		"xbmcTcpPort" : 9090,
		"grabVideo" : true,
		"grabPictures" : true,
		"grabAudio" : true,
		"grabMenu" : false,
		"grabPause" : true,
		"grabScreensaver" : true,
		"enable3DDetection" : false
	},

	// BOOTEFFECT CONFIG
	"bootsequence" : 
	{
		"color" : [0,0,0],
		"effect" : "Rainbow swirl",
		"duration_ms" : 3000,
		"priority" : 700
	},

	// JSON SERVER CONFIG
	"jsonServer" : 
	{
		"port" : 19444
	},

	// PROTO SERVER CONFIG
	"protoServer" : 
	{
		"port" : 19445
	},

	// WEBCONFIG SERVER
	"webConfig" : 
	{
		"document_root" : "/storage/.kodi/addons/service.hyperion/webconfig",
		"port" : 8099
	},

	// EFFECT PATH
	"effects" : 
	{
		"paths" : 
		[
			"/storage/.kodi/addons/service.hyperion/effects",
			"/usr/share/hyperion/effects"
		]
	},

	// NO FRAME GRABBER CONFIG
	// NO BOBLIGHT SERVER CONFIG
	// NO JSON/PROTO FORWARD CONFIG

	// LED CONFIGURATION
	"leds" : 
	[
		{
			"index" : 0,
			"hscan" : { "minimum" : 0.4792, "maximum" : 0.5000 },
			"vscan" : { "minimum" : 0.9300, "maximum" : 1.0000 }
		},

Philos
Posts: 10
Joined: Tue Feb 28, 2017 3:40 am
languages_spoken: german; english
ODROIDs: Odroid C2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibility?

Unread post by Philos » Mon Jan 07, 2019 1:33 am

Did you try

Code: Select all

		"output"     : "/dev/ttyUSB0",
		"rate"     : 115200,
instead of ttyACM0?

kban
Posts: 4
Joined: Sun Nov 18, 2018 6:22 pm
languages_spoken: english, spanish
ODROIDs: odroid-c2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibility?

Unread post by kban » Mon Jan 07, 2019 2:47 am

i didn't try ttyUSB0 because i don't have that device, im using an arduino uno and the dev that is created when plugged in is ttyACM0, am i missing anything?

Righ now, i've bee able to achive some more time between slow downs tweaking a bit the config, these parts exactly:

Code: Select all

// SMOOTHING CONFIG
		"smoothing" :
		{
			"type"            : "linear",
			"time_ms"         : 100,
			"updateFrequency" : 10.0000,
			"updateDelay"     : 0
		}
	},

	 "amlgrabber" : 
	 {
	 	"width" : 64,
	 	"height" : 64,
	 	"frequency_Hz" : 10.0,
	 	"priority" : 890
	 },


cert_
Posts: 22
Joined: Sun Mar 20, 2016 9:16 pm
languages_spoken: english
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibilit

Unread post by cert_ » Fri Jan 11, 2019 6:43 pm

Blokmeister wrote:
Tue Nov 06, 2018 9:49 pm
Okay @Anthrax, I followed your lead and also got it to work. Just like you said. Clean install of CoreELEC, install hyperion.ng, enter

Code: Select all

echo 3 | tee /sys/module/amvdec_h265/parameters/double_write_mode
through SSH and BOOM! Working Ambilight at 4K!
No "BOOM" here! Video still slows down after a few minutes :roll: :cry: :roll: :cry:

kban
Posts: 4
Joined: Sun Nov 18, 2018 6:22 pm
languages_spoken: english, spanish
ODROIDs: odroid-c2
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibility?

Unread post by kban » Tue Feb 19, 2019 4:34 am

Looks like the problem has gone away after installing the new Libreelec 9 version, maybe it is too soon, but i 've been able to watch 2 complete movies without any slow down!! the last one HEVC, about 2 hours lenght.

User avatar
rooted
Posts: 6435
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: 4K Ambilight with hyperion and AML - dream or possibility?

Unread post by rooted » Tue Feb 19, 2019 4:41 am

Well that's good news, knock wood that it stays that way.

Post Reply

Return to “LibreELEC - Kodi Project for C1/C2”

Who is online

Users browsing this forum: No registered users and 3 guests