ITCooky Recipes

Lets cooky it yammy things!

Let’s install Kodi Home Media Center on the RaspberryPi 4 in the Flirc case!

дата December 2, 2019

CAUTION: February 2020: Google completely blocks work of Yotube in Kodi!

For example, if you have an old TV, not Smart, and how do you see Youtube (see disclaimer) on it? Of course, any mini computer will be for thid, i used a Raspberry Pi 3B in RetroPi with passive cooling systrema, but I decided to make a dandy (a SNES clone usual in Russia in the 90-th years) with it, for a new player video I chose the most elegant option!

DISCLAIMER: Add-on Youtube for Kodi
Well, Yotube in Kodi is not like a smartTV, here are all the oddities, decide if you need it or not!
– There is no official YouTube add-on for Kodi, just like for the Google Movie
– I have to do additional setup to obtain good image quality
– It crashes quickly, writes that the quota (what quota?) has ended. It is necessary to go through Google developer registration, to solve it
– Cannot display ads
– He doesn’t like many buttons press, like rewind and exit – Kodi hangs up and restarts

I bought this kit at AmazonCanaKit Raspberry Pi 4 Basic Kit (2GB RAM) , surprisingly, the price still turned out to be cheaper than buying off-line (5000RUR without PSU and delivery)! The set costs $ 62.99 delivery $ 19.23 in hands, by courier!

The power supply with an American plug, I absolutely forgot that! Not official, but at 3.5A!

I bought 2Gb Raspberry Pi 4, because 4Gb for what!

More RAM, faster CPU, USB 3, nothing more, it’s time to put eMMC mr. Eben Upton!

Case Flirc ordered on site case cost $ 15.95; the delivery was $ 13.54, but it was delivered only to Russian Post; In Amazon this case is also there, and delivery will probably be at the recipient’s address!

Assembly process

The case is very good, metal, the top cover is soft plastic, immediately accumulates dust, hehehe what awaits him behind the TV, it is better not to imagine it!

The remote, keyboard and mouse will be that thing:

I download the image Noobs for Raspberry from here contains LibreELEC which is Kodi!

The good thing with raspberries is that there are many instructions: simple, beautiful, for children! With Noobs, everything is simple. We format the SD card, in what format they do not say, I leave ext4 … and no, it does not work, you must format it in FAT32 in the official instructions for children do not write about this, of course, in childhood there is only a Windows operating system !

And right there we copied what we extracted from the downloaded file, no image writer is needed here! We connect the power to the raspberry and this time everything is booting. In the Flirc case the raspberry bulbs are clearly visible! You see that screen (not exactly that one, it’s for Raspberry 2)

In the list, you must select only the line with LibreELEC. By the way, I started with the USB receiver of the wireless keyboard inserted in USB2, it didn’t work, I immediately moved it to USB3, it worked!

It is installed and Kodi appears.

In the installation window, I changed the SSH password and turned off SAMBA! I took screenshots by pressing [Fn] + [PrtsSc F7] on the keyboard. To get them, I connected through SSH, I thought it would turn out to be ordinary Linux, no, it’s a cut Linux.
I tried to install MC, that’s what he said

 There is no working 'apt-get'.
 'apt-get' is a command to install, update and remove software which
 is stored in a non local repo. 'apt-get' does nothing then connecting to such
 repo, downloads the software, unpacks the software, updates a big
 local database with all filepaths and other informations about the
 installed software or removes or updates installed Software.
 With LibreELEC it is not possible to change the system for security and
 stability reasons so even 'apt-get' would not be able to do this.
 We also dont have and want to maintain such a repo for various other
 great reasons.
 Also Ubuntu or Debian packages are often outdated and not compatible
 with LibreELEC
 TIP: use Kodi's addon browser to enhance your LibreELEC system

Do you want to install something? Only through the LibreELEC menu on the TV, if there is one! A little disappointed … I wanted to run several tests …

But I will take screenshots, they are in the /storage/screenshots/ folder, I do it on my Ubuntu (and you, child, you can do it on your own in Windows 10 through the Windows subsystem for Linux ), I go to the folder in the terminal where I want to download and run
scp root@* ./

Let’s install the YouTube plugin in Kodi
Let’s go to the menu Add-ons / Install from repositiry here we go to the repository Kodi add-on repository

We found in the folder Video add-ons addon Youtube click on it and it installs

Now you can watch YouTube and see that the quality is selected the worst of the worst!

Let’s amke YouTube grate again…aaa sorry let’s make Yotube add-on on Kodi work in 1080p (HD)
To do this, from another repository you need to install the Adaptive InputStream add-on.
Go to the LibreELEC add-repository

And it does not work! It turns out that the old version 9.1.501 of LibreELEC is still in the Noobs image, and it would not be so scary if the LibreELEC developers had not cut the repository for it … It is necessary to update the newly installed LibreELEC
Let’s go to the raspberry on the console and run
cd ./update

What is the latest version for Raspberry Pi 4 now? Can be seen the link from there should be used with wget

Ok, now we have a new version and the repository is working.

IN CASE: After updating, uninstall and reinstall the Yotube plug-in

We enter the folder VideoPlayer InputStream

And we install InputStream Adaptive add-on

We perform the following configurations in the Yotube plugin. To do this, select Yotube in Add-ons and press the letter C on the keyboard

Here, everyone does it according to their way, but for me it worked like this!

Let’s play video Dimitri Vegas & Like Mike, Afro Bros & Sebastian Yatra featuring Camilo & Emilia – Boomshakalaka The resolution of Kodi I have 720p, it is more suitable for the videos I have, andit does not matter for my eyes , it really does not notice much difference of 1080p at the distance of 3 meters!

And image quality is this

With this setting, Yotube quickly stops working and writes Quota Limit Exceeded

We fix the “Quota Limit Exceeded” error of the Kodi add-on YouTube
…and put it here

Login with your account in the YouTube add-on
A useful thing, for example for karaoke, make a playlist with good karaoke and sing it.

Click here (this key will disappear when we enter)

And we do what Kodi asks on the screen. On other devices where you are authorized with your Google account, go to and enter the code that Yotube Kodi shows, enter the code twice, after the first time – Kodi silently changes it on the screen and needs to repeat all, Google become isteric with the second code, but it is necessary to force it to accept it!

Many options appear after authorization.

Kodi menu quality and heating
The image quality of the menu was bad, but i have changed the screen refrash rate

I put 60, it was 50, it’s mass suitable for my TV

The raspberry in Flirc Kodi’s case is always hot, so I put a timeout on the screen, it doesn’t help much, but better to have it!

The raspberry firmware is old, they say the September firmware is colder.

I will try to warm up Kodi, I go to the console and do
mkdir /storage/scripts
cd ./scripts

Add code

time=`/bin/date +%Y"."%m"."%d"-"%H":"%M" "`
temp=`/bin/cat /sys/class/thermal/thermal_zone0/temp`
load=`/bin/cat /proc/loadavg | /usr/bin/awk '{print $1}'`
echo "${time} ${temp} ${load}" >> /storage/scripts/CPUtemp_data.log

in cron
crontab -e
add line

* * * * * /usr/bin/sh /storage/scripts/

Now, every minute, the processor temperature is written to the file /storage/scripts/CPUtemp_data.log.
I played one of the 4k videos, this one

Kodi shows it as 1080p and does it bad, it lacks a smooth frame change! Sometimes, a video marked 4k 60 fps loses even more, every 15 seconds a rewind menu appears and skips a second forward. That happened to me with this video

I measure the temperature before the firmware upgrade

and after

Para actualizar el firmware, marque la casilla aquí y reinicie. No noté dos a la vez, ¡lo hice por turno!

CONCLUSION: Yes, the new firmware is cooler. At rest, 6 degrees less, and 4-5 on load!!! All this shows in Yotube, I played the biggest mkv I found, 1080p 3650bps, it have ir in fileshare, and RaspberryPi 4 didn’t even notice it, the grades jumped 1-2 up and down!

File storage connected to the network
You can connect it, its little complicated, you just need to enter the full address, and it doesn’t detect anything, here

And here I just enter the name and address to the folder like this smb://

On the server I have Samba with that smb4.conf

    dos charset = ISO8859-1
    unix charset = ISO8859-1
    display charset = ISO8859-1
    map to guest = Bad User
    path = /usr/fileshare
    read only = no
    guest ok = yes

Change the keyboard to another language
No, LibreELEC does not know how to do it and does not want to learn it! Only the Kodi on-screen keyboard, but from the physical keyboard only English is entered, the Russian letters must be selected with arrows … and the Russian keyboard can be added here ЙЦУКЕН!

Well, that’s it, you can be used!

One Response to “Let’s install Kodi Home Media Center on the RaspberryPi 4 in the Flirc case!”

  1. […] Source: Let’s install Kodi Home Media Center on the RaspberryPi 4 in the Flirc case! « ITCooky Recipe… […]

Leave a Reply

Your email address will not be published. Required fields are marked *