Kodi Community Forum
Linux ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21] - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Hardware (https://forum.kodi.tv/forumdisplay.php?fid=112)
+--- Thread: Linux ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21] (/showthread.php?tid=194362)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - Sunflux - 2014-12-15

To expand on my previous post... I've noticed something very strange in terms of greyscale reproduction (using the latest STABLE of OpenElec):

#1: OS RGB Full + Kodi Limited + TV Limited + No VAAPI = perfect greyscale reproduction, no banding
#2; OS RGB Full + Kodi Limited + TV Limited + VAAPI = significant black crush, banding

#3: OS RGB Full + Kodi Full + TV Full + No VAPPI = perfect greyscale reproduction, banding
#4: OS RGB Full + Kodi Full + TV Full + VAPPI = perfect greyscale reproduction, banding

#5: OS RGB Limited + TV Limited + No VAPPI = perfect greyscale reproduction, banding
#6: OS RGB Limited + TV Limited + VAPPI = perfect greyscale reproduction, banding

Based on this, the absolute best quality reproduction with my equipment is #1, AKA "RGB full made turned into limited with no VAAPI".

What concerns me, however, is I'm seeing significant black crush in the same environment merely by turning on VAAPI. Essentially, it is IGNORING Kodi's software limited mode setting and changing video levels to reproduce correctly in a "Full RGB" environment. Which is no doubt why if I force the TV into "Full" mode, then the VAAPI greyscale reproduces correctly.

#7: OS RGB Full + Kodi Limited + TV Full + No VAAPI = improper greyscale reproduction (see below 16, above 235), no banding
#8; OS RGB Full + Kodi Limited + TV Full + VAAPI = perfect greyscale reproduction (but GUI colors way elevated), banding

Any idea what's up here? Is it even possible to get VAAPI to not have banding?


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - fritsch - 2014-12-15

Nothing and: this won't change.

Whenever VAAPI Render Method (helix) enabled or Use SW Filter (gotham) disabled. VAAPI will scale the image to full range RGB, this happens with vaPutSurface - we can absolutely do nothing about it, as the API does not give us the chance to receive the NV12 surfaces. With those two settings the "Use Limited Range" has absolutely no effect and VAAPI itself will produce full range RGB we (xbmc) cannot touch. This can only be scaled "back to limited" when using the Output in limited mode (gpu setting, e.g. xrandr).

The only chance to get a Limited Range out of xbmc is:
Helix: Disable "Use VAAPI Render Method" and _don't_ use MCDI or MADI or VAAPI BOB, as they will reenable this Render Method and set "Use Limited Range"
Gotham: "Use SW Filter" enabled and set "Use Limited Range" in xbmc while setting the GPU to full range (xrandr)

Use SW Filter is only an option in OpenELEC 4.x, it was never in mainline.

We hope to get an EGL version of VAAPI going after helix, that won't have this f*cking vaPutSurface needed, cause this also puts high load onto slow GPUs (e.g. Baytrails).


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - Sunflux - 2014-12-15

Thanks for the information.

As you indicate, I was able to get proper Limited greyscale out of VAAPI in situation #6, however I could still see banding. Is this kind of banding inherent to VAAPI and/or whenever dynamic range conversion is required? I only ever saw perfectly smooth greyscales in situations #1 and (although otherwise improper for video reproduction) #7.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - fritsch - 2014-12-15

In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#10: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#$ OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - Sunflux - 2014-12-15

(2014-12-15, 11:37)fritsch Wrote: In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#1: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#3: OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!

So is the banding because VAAPI is *always* expanding the 16-235 video range to 0-255?

Following the 4 scenarios you picked out:

#6 - 16-235 video range is expanded to 0-255 by VAAPI, then recompressed to 16-235 by xrandr, and then expanded to 0-255 by the TV (ouch).
#1 - 16-235 video range is maintained by Kodi, and then expanded to 0-255 by the TV.
#4 - 16-235 video range is expanded to 0-255 by VAAPI, then maintained by the TV.
#3 - 16-235 video range is expanded to 0-255 by Kodi, then maintained by the TV.

So all of those except for #1 involve some kind of Kodi-side range conversion. It looks like the only way to avoid that, is if you can feed VAAPI original 0-255 RGB data that it doesn't touch.

I'm guessing that for the best video quality, the current implementation of VAAPI is flawed... and that even with the Intel VAAPI hanging bug now fixed, there might be a valid reason to keep on using the "Use SW Filter" setting.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - noggin - 2014-12-15

It really is a pity that there is no way of running XBMC with YCrCb Limited preserved from source file to display with no conversion to RGB and no conversion to Full range, and only an upscale to 4:2:2 or 4:4:4 from the 4:2:0 source media. However the complication of the difference BT601 (SD) and BT709 (HD) colourspace would be interesting... If you could somehow engineer a GUI/OSD overlay - allowing these elements to be rendered RGB by XBMC and then converted to YCrCb 4:2:2 or 4:4:4 when feeding YCrCb displays that would be an interesting approach (I think that is how many hardware devices like satellite receivers etc. run - or used to)

But I realise, architecturally, this isn't really an issue.

I guess the approach is either :
Let the OS handle levelspace (which means YCrCb->RGB conversion and Limited->Full and then optionally RGB->YCrCb and optionally Full->Limited)
Fool the OS and cheat it by pretending that Limited levelspace is Full levelspace (which allows you to preserve <16 and >235 levels in Limited content AND avoid the banding caused by the lack of transparent reversibility between YCrCb Limited and RGB Full at 8bits)


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - fritsch - 2014-12-15

(2014-12-15, 12:40)Sunflux Wrote:
(2014-12-15, 11:37)fritsch Wrote: In fact there are those possiblities, that work "somehow":

Limited:
#6: OS RGB Limited + TV Limited + VAPPI (Kodi color setting has no influence)
#1: OS RGB FULL + Kodi Limited + TV Limited + VAAPI with (Prefer Render Method disabled / or Use SW Filter)

Full:
#4: OS RGB Full + TV Full + VAPPI ((Kodi color setting has no influence)
#3: OS RGB Full + Kodi Full + TV Full + VAAPI with Use SWfilter

Edit: Formulated it more clearly. And btw. think of what happens, if you scale a 16.235 image to a 0..255 range. Do a calculation for a: 16,17,18,...,235 gradient!

So is the banding because VAAPI is *always* expanding the 16-235 video range to 0-255?

Following the 4 scenarios you picked out:

#6 - 16-235 video range is expanded to 0-255 by VAAPI, then recompressed to 16-235 by xrandr, and then expanded to 0-255 by the TV (ouch).
#1 - 16-235 video range is maintained by Kodi, and then expanded to 0-255 by the TV.
#4 - 16-235 video range is expanded to 0-255 by VAAPI, then maintained by the TV.
#3 - 16-235 video range is expanded to 0-255 by Kodi, then maintained by the TV.

So all of those except for #1 involve some kind of Kodi-side range conversion. It looks like the only way to avoid that, is if you can feed VAAPI original 0-255 RGB data that it doesn't touch.

I'm guessing that for the best video quality, the current implementation of VAAPI is flawed... and that even with the Intel VAAPI hanging bug now fixed, there might be a valid reason to keep on using the "Use SW Filter" setting.

Please read my posts in detail and don't introduce new problems, that are not existent.

Use SWFilter is the inverse of Prefer VAAPI Render Method.

As long as you have Prefer VAAPi Render Method _disabled_ and don't use MCDI, MADI or VAAPI-BOB (which is only relevant when you want to do deinterlacing anyways). This does exactly what "Use SWFilter" does.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - Sunflux - 2014-12-15

I'm not confused by how the "Prefer VAAPI Render Method" and "Use Sw Filter" settings work... but I'm still on Gotham, so I just pick the one that's staring me in the face. :-)

But, I do know that using VAAPI Rendering offers a noticeable improvement on CPU usage, which is why I had been eagerly waiting for someone to fix the hanging bug... but now, I'm learning there doesn't seem to be any way to use VAAPI Rendering AND avoid banding. Also, that the only way to use it with Limited RGB range involves double range conversion. Is the double conversion transparent (such that the second conversion doesn't make banding worse)?


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - jtadeia - 2014-12-15

Hi all,
Is there a way to change the location for the temporary streaming file?

I'm using a dualboot setup with my Asus Chromebox, I guess I have about 7GB in /storage
Because of space limitations, I'm not able to stream movies bigger than 7GB (using Genesis or xbmctorrent for example).

If there is no way to change this, can I increase the OPENELEC partition without having to format it?

Thanks for your help


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - fritsch - 2014-12-15

(2014-12-15, 13:14)Sunflux Wrote: I'm not confused by how the "Prefer VAAPI Render Method" and "Use Sw Filter" settings work... but I'm still on Gotham, so I just pick the one that's staring me in the face. :-)

But, I do know that using VAAPI Rendering offers a noticeable improvement on CPU usage, which is why I had been eagerly waiting for someone to fix the hanging bug... but now, I'm learning there doesn't seem to be any way to use VAAPI Rendering AND avoid banding. Also, that the only way to use it with Limited RGB range involves double range conversion. Is the double conversion transparent (such that the second conversion doesn't make banding worse)?

It's quite hard to answer. In fact, when we use the vaPutSurface path a Full RGB conversion is done, we can "hint" 701 or 601 color format, which we do. Kodi does not touch this data anymore, as we use the VAAPi Upload to display those.
The OS driver then does the conversion back to "limited range".

We know, that this sucks like hell - and as we both, Fernetmenta and me are running VAAPI at home (Fernet in full RGB) and me (with a clamping AVR) with OS set to limited, really want to solve that by moving towards EGL, but this is not that easy, cause we don't have a Reference Clock for now, though the newly developed DRM Reference Clock could work.

Yeah, there is nothing we can "talk correct" or something - it's just fucked up as is. And the EGL codepath for vaapi is not even yet in the stable vaapi drivers, bleeding edge - nobody cared (on vendor side) for a much too long time.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - christoofar - 2014-12-15

(2014-12-15, 08:45)Matt Devo Wrote:
(2014-12-15, 07:39)christoofar Wrote: Thanks Matt. Well, bummer. Sad

honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - Matt Devo - 2014-12-15

(2014-12-15, 10:15)dmalovic Wrote: I want to gave an option to play with several OS'es, have a dedicated swap partition, maybe even try windows, so I don't want to worry about 3+1 MBR limitation. Worked on this until 4AM this morning, and after waking up remembered I can manually create GPT partition scheme and manually create partitions. Looking forward to your new script, as IIRC, you said you were working on dual OS install with the standalone firmware.

Thanks for all your work and help!

you must have misread, as I don't have any plans to add a non-ChromeOS dual boot setup to my script. Dual (or more) booting with the standalone firmware is no different than a "regular" PC, and there's no need for me to reinvent the wheel there.

(2014-12-15, 14:44)jtadeia Wrote: Hi all,
Is there a way to change the location for the temporary streaming file?

I'm using a dualboot setup with my Asus Chromebox, I guess I have about 7GB in /storage
Because of space limitations, I'm not able to stream movies bigger than 7GB (using Genesis or xbmctorrent for example).

If there is no way to change this, can I increase the OPENELEC partition without having to format it?

Thanks for your help

you shouldn't have any issues streaming files larger than your OE storage partition, if you are, then your streaming add-on is "doing it wrong," but you're not going to get any support for those types of add-ons here.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - quicknir - 2014-12-15

(2014-12-15, 16:49)christoofar Wrote:
(2014-12-15, 08:45)Matt Devo Wrote:
(2014-12-15, 07:39)christoofar Wrote: Thanks Matt. Well, bummer. Sad

honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)

Granted I'm one data point, but Ubuntu is actually pretty solid these days. Last time I did Ubuntu + xbmc was 4 years ago, was much more annoying then. But now HDMI outputs, video and sound, have worked perfectly for me with zero setup on two machines, with and without XBMC. The sole Ubuntu related issue I had was this CPU idling issue, which was trivial to fix with Matt's help (also probably my fault for downloading the LTS Ubuntu instead of the most up to date one). Performance wise it's also quite good, keep in mind that you can (and should) log directly into XBMC. This means that in general Unity is not running at all. Although, even logged into Unity I was only using about 500 MB of memory I believe, and it was quite smooth. So if you ever have a a one-off need that can't easily be addressed in XBMC, you have the advantage that you can just log into Unity and do just about anything.

For me, the biggest plus with Ubuntu is that (from my limited knowledge) it's superior if you also want to setup your htpc as a server. If you want to be able to control torrent downloading, or access your files over ssh, non-locally, Ubuntu has the edge. If you have separate htpc and server machines then this is irrelevant.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - jsp1 - 2014-12-15

I'm sure there is a knowledge or language barrier here somewhere, but I'm more confused than ever about VAAPI and how to deal with it to achieve best picture results.

Here is my situation:

1) I do not need deinterlacing as far as I'm aware (no "i" content)
2) I had perfect greyscale ramp before this improvement with VAAPI
3) I had to significantly change my settings to get almost (but not) perfect ramp after installing the test compile with VAAPI fix

So, since no interlaced content to deal with, should I just disable VAAPI altogether? Is there a significant performance hit, one that may hinder high quality content such as 30Mbps+ 1080p from disabling VAAPI?

Lastly, how do I ensure I do not use MCDI, MADI or VAAPI-BOB ? Is this inherent in disabling VAAPI?

Frankly, I was having almost no freeze ups before, so I'm thinking just roll back and go with my previous setup. However, once VAAPI fix goes mainline and options change, I want to know what to do.


RE: Asus/HP/Acer/Dell ChromeBox EZ Setup (OpenELEC/Linux+Kodi) [v3.4 - 2014/12/10] - christoofar - 2014-12-15

(2014-12-15, 19:43)quicknir Wrote:
(2014-12-15, 16:49)christoofar Wrote:
(2014-12-15, 08:45)Matt Devo Wrote: honestly, with Netflix working now under Ubuntu (and others), and the ability to access it via the NetfliXBMC add-on, the (media center related) reasons for dual booting ChromeOS are pretty minimal IMO
Since I'm not very well versed in Linux (played with some distros a few years back on an old PC laying around, but not much else), I'm a bit leery of going that route.OE pretty much just works "out of the box", with ubuntu, seems there is some general knowledge & tweaking required (audio & other stuff?)

Granted I'm one data point, but Ubuntu is actually pretty solid these days. Last time I did Ubuntu + xbmc was 4 years ago, was much more annoying then. But now HDMI outputs, video and sound, have worked perfectly for me with zero setup on two machines, with and without XBMC. The sole Ubuntu related issue I had was this CPU idling issue, which was trivial to fix with Matt's help (also probably my fault for downloading the LTS Ubuntu instead of the most up to date one). Performance wise it's also quite good, keep in mind that you can (and should) log directly into XBMC. This means that in general Unity is not running at all. Although, even logged into Unity I was only using about 500 MB of memory I believe, and it was quite smooth. So if you ever have a a one-off need that can't easily be addressed in XBMC, you have the advantage that you can just log into Unity and do just about anything.

For me, the biggest plus with Ubuntu is that (from my limited knowledge) it's superior if you also want to setup your htpc as a server. If you want to be able to control torrent downloading, or access your files over ssh, non-locally, Ubuntu has the edge. If you have separate htpc and server machines then this is irrelevant.
I'll be exploring this option at some point. For now, I'm able to use a workaround (my trusty Logitech N5901) which is recognized at bootup, thankfully.