Linux - Setting up an easy Linux Kodi with Live TV (LibreELEC)

  Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #1
Here's an easy guide to setting up a Kodi appliance running the minimal Linux based LibreELEC

Step 1

Download the new install file of LibreELEC from here: https://libreelec.tv/
Download windows disk imager from here: https://sourceforge.net/projects/win32diskimager/

EDIT: A LibreELEC developer writes that Rufus is more reliable as a disk imager. I have yet to see any problems with win32diskimager, but rufus is an alternative although it has many more options that are not needed. https://rufus.akeo.ie/

Step 2
- Insert a blank USB memory stick into your computer
- Open up the w32 disk imager
- Select your img file
- Make sure the program is set to your USB drive name, in this case its D:
- Click the "write" button and wait for the software to finish creating the bootable usb.

[Image: 1.jpg]

Step 3

Go into your htpc and change the boot order to usb in the bios
Insert the USB disk
Boot the computer and follow the LibreElec install instructions

[Image: 2.jpg]


Step 4

Once installed reboot the HTPC and you should have a fully functional Kodi install. Easy huh?
[Image: 3.jpg]

Step 5
Now that we have a working Kodi, lets setup the basic options

- Setup your wireless connection
- Turn on SSH access (This will allow you to connect with an FTP program to grab things like screenshots or upload zip Add-ons)
- Turn on Samba access (This will allow you to connect using windows explorer)
- To test access to your HTPC, inside Kodi go to Programs >> LibreELEC settings >> connections. Find your wireless connection and make a note of the IP address. In my case its 192.168.1.123 but yours will probably be different.
- Now go to your windows PC and file explorer. Type into the address bar:
\\192.168.1.123
[Image: 4.jpg]

You can now browse any files on the HTPC from a windows PC Smile

NOTE: If you prefer to use an FTP program, just enter the IP address but connect on port 22 using the SFTP protocol. It should show the same file system list. The user and password is root/libreelec

Summary
Congratulations you now have a fully running free operating system with Kodi running on top of it. The best thing about LibreELEC is it is already customized with many Kodi enhancements, hardware drivers and shortcuts.

In the next post we will go on to setting up a live TV server.
(This post was last modified: 2016-05-06 12:58 by zag.)
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #2
Now we have a fully working Kodi install on top of linux, lets add some live TV functionality.

NOTE: This guide is for UK users but should work in the same way around the world. USA is slightly different I think due to their broadcasting standards.

What you will need
- TV tuner (I'm using this one https://www.amazon.co.uk/PCTV-DVB-S2-Sti...B00DH51DUQ
- HTPC running LibreELEC
- Digital aerial or satellite source feed (I'm using Astra 28.2E satellite as a source in this example from a standard Sky UK or FreeSat dish)

Step 1
The first thing we need to do is install a PVR backend. In this case I am going to use TVHeadend, but there are many others available for Kodi.
Inside Kodi go to: System >> Add-ons >> Install from repository >> LibreELEC Add-ons >> Services >> TVHeadend 4.0 >> Install

EDIT: A libreELEC developer writes that version 4.2 is now available and works better with the Raspberry Pi SD cards, has a setup wizard, timeshift capability and mass channel edit. This guide focuses on setting up version 4.0 at the moment but let us know if you install 4.2.

Congrats you just installed the PVR software, who said Linux was hard to use? Smile

[Image: 5.jpg]

Think of the PVR backend as the server software needed to supply and organize your channels. Its a web based interface that works in any standard web browser.

- Take the IP address of your htpc and pop it into your computers web browser with the port number 9981 so in my case it is:

Code:
http://192.168.1.123:9981

You should now see the TVheadend web interface. If you click about you should see the details of your PVR server version that is running. Congratulations, it works! We're most of the way there.

[Image: 7.jpg]

Step 2
You will notice that we have no channels yet in the Electronic Program Guide Tab. Lets configure the Tuner to find them,

- In the TVHeadend web interface click on: Configuration >> DVB inputs. You should see your tuner device in here now. If you don't see it, check LibreELEC for driver compatibility. It should have all the popular PVR device drivers working out of the box though.
- You will need to enable this device by clicking the folder icon below the tuner device, and check the "enabled" box.
- Also uncheck the "idle scan" box.

[Image: 8.jpg]

Step 3

- Click the networks tab >> Add >> DVB-S
- Lets call our new satellite network "FreeSat"
- Select a pre defined Mux for 28.2E Astra
- Select Orbital position 28.2E astra
- Go back to the TV Adapters page >> universal LNB tuner >> network >> FreeSat

[Image: 9.jpg]

- Now click on the "FreeSat" network you just created and hit the "Force Scan" button.

Step 4

Go to the Muxes section and you should see all the muxes being scanned. The scan status and scan result is the important field here, it should say PEND and OK. If the scan result says "fail" then check your cable connection.

Go to the network tab and wait until the "scan queue length" field is 0. This may take some time.

Step 5

After about 20mins all your muxes should be scanned and you will now have a list of channels under the services tab.

- Click on the "Map All" button under the services tab to map your services to a specific channel. In the case of Sky UK there should be about 450 channels to map and its pretty much instant.

[Image: 10.jpg]

You should now have the channel names entered next to the specific service. This channel name is what will show up on Kodi eventually.

At this point you can delete channels or rename them to whatever you want.

- Test playing a channel by clicking the play button and loading the resulting playlist in VLC, you have now confirmed Live tv is working Smile

Step 6

Now we have the live tv backend working its time to set it up with Kodi. Thankfully this process is very simple:

- Inside Kodi go to Settings >> Add-ons >> install from repository >> Kodi official >> PVR Clients >> TVheadend
- Configure the Add-on settings with your IP address of the backend TV server like this:

[Image: 11.jpg]

- Inside Kodi go to Settings >> TV >> Enable Live TV

[Image: 12.jpg]

- Inside Kodi click the main menu item that has now appeared called TV. Click on a channel and you should be watching live TV in Kodi!!

[Image: 13.jpg]

Live TV is now setup to work with Kodi. You can edit the channels using the web interface to your liking, add channel icons, or group them into categories.

TIP: You can potentially put the live TV backend on any computer in your home, or even publicly available on the internet. Imagine having 4 or 5 clients connecting to one tv server, there really are many possibilities.
TIP2: You can use the Logo Downloader Add-on to automatically search for TV logos and add them to your Kodi install. It even has a context menu add-on to search manually with a menu on each channel.
(This post was last modified: 2016-04-27 14:01 by zag.)
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #3
<Reserved>
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #4
<Reserved>
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #5
<Reserved>
find quote
black_eagle Offline
Posting Freak
Posts: 1,815
Joined: Sep 2013
Reputation: 79
Location: East Yorkshire, UK
Post: #6
(2016-04-19 22:24)zag Wrote:  Step 3

- Click the networks tab >> Add >> DVB-S
- Lets call our new satellite network "SKY UK"
- Select a pre defined Mux for 28.2E Astra
- Select Orbital position 28.2E astra
- Go back to the TV Adapters page >> universal LNB tuner >> network >> FreeSat

Typo ? SKY UK and then FreeSat. Although it's obvious to the majority of people, there is bound to be someone that says your guide doesn't work. It's a nice guide BTW. Are you going to include a bit about mapping services, or does TVH 4 do that automatically for a new setup ? It's been 3 years since I set mine up and I can't remember !!

Learning Linux the hard way !!
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #7
Thanks, fixed.

Yep still a work in progress this guide. I got as far as scanning for channels then went to bed.

Will finish off the mapping, channel logos and client Add-on install soon.
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #8
OK guide finished and updated, hopefully that's a full guide to setting up live TV with a simple Kodi install and USB tuner.

Let me know if there is any feedback from following this guide or improvements.
(This post was last modified: 2016-04-20 23:24 by zag.)
find quote
Ned Scott Offline
Banned
Posts: 31,460
Joined: Jan 2011
Location: Arizona, USA
Post: #9
I'm stealing this for the wiki, since our Tvheadend (wiki) guide is waaaaaay out of date Wink

I actually just did a guide for WeTek for ATSC tuners in the US (which are a PITA because you have to get EPG data from another source), but DVB is the bigger userbase. PVR users everywhere thank you for this, zag!
find quote
Big Aero Offline
Senior Member
Posts: 220
Joined: Jul 2015
Reputation: 7
Post: #10
Rather than mapping the channels via the services list as you've done above, it's much better to map the channels using the bouquets function (for 28.2e anyway) - as it maps only the channels for your specific region, rather than having duplicate ITV, Channel 4 etc. Using bouquets also automatically numbers your channel list and keeps on top of frequency updates.
(This post was last modified: 2016-04-23 19:43 by Big Aero.)
find quote
Ned Scott Offline
Banned
Posts: 31,460
Joined: Jan 2011
Location: Arizona, USA
Post: #11
(2016-04-22 06:04)Ned Scott Wrote:  I'm stealing this for the wiki, since our Tvheadend (wiki) guide is waaaaaay out of date ;)

I actually just did a guide for WeTek for ATSC tuners in the US (which are a PITA because you have to get EPG data from another source), but DVB is the bigger userbase. PVR users everywhere thank you for this, zag!

I've been told that new versions of Tvheadend have changed things again, so both this and my guide will need to be updated again, lol. However, I was told there is a new setup wizard that really helps things, so that will lessen the documentation burden :D
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #12
Yeh apparently 4.2 has a wizard setup interface, but there is much discussion about if its worth upgrading as there is apparently an upgrade bug with 4.2

I'll do some more investigating myself soon and update the guide as appropriate.
find quote
zag Offline
Retired Team-Kodi Member
Posts: 4,006
Joined: Oct 2007
Reputation: 75
Location: UK
Post: #13
Updated guide with a few suggestions from the LibreELEC team.
find quote
greenbag Offline
Senior Member
Posts: 233
Joined: Aug 2015
Reputation: 3
Post: #14
I always have to close then reopen the backend before muxes start scrolling. Between steps 3 and 4. Maybe just my set up.
find quote
juus Offline
Junior Member
Posts: 13
Joined: Apr 2012
Reputation: 0
Post: #15
Does LibreELEC come packaged with MySQL?
find quote
Post Reply