Install tvheadend on Ubuntu 18.04 server
Tvheadend is a TV streaming server and digital video recorder for Linux FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources.
Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
Multiple EPG sources are supported (over-the-air DVB and ATSC including OpenTV DVB extensions, XMLTV, PyXML).
The Analog video (V4L) is supported directly up to version 3.4.
In recent version, the pipe:// source (in IPTV network) might be used to obtain the MPEG-TS stream generated by ffmpeg/libav from a V4L device.
In this guide I’ll try to explain to you how to install Tvheadend (open source TV streaming server) on Ubuntu 18.04 Server.
Install Tvheadend on Ubuntu 18.04 server
1. Install Tvheadend Required Packages and add the Repository PGP key
First, install required package:
$ sudo apt-get -y install coreutils wget apt-transport-https lsb-release ca-certificates
Now, add the Tvheadend Repository PGP key:
$ sudo wget -qO- https://doozer.io/keys/tvheadend/tvheadend/pgp | sudo apt-key add -
2. Add Tvheadend repository
Add the repository:
$ sudo add-apt-repository 'deb https://apt.tvheadend.org/stable bionic main'
3. Install Tvheadend
Refresh the available packages and install. Keep an eye out for anything that mentions TVHeadend.
$ sudo apt-get update $ sudo apt-get install tvheadend -y
Set a username of the TVHeadend administrator. I used Admin.
Set Tv headend administrator password:
Once the installation is complete, you can access via http://localhost:9981 or http://ip.add.re.ss:9981
Access TVHeadend URL with your favorite browser and login.
The following Welcome setup wizard will prompt, click on Cancel.
Go to Configuration, DVB Inputs and TV Adapters. Verify that your TV Tuner cards are being detected. I have had a lot of luck with the tuner cards I have thrown at TVHeadend. If you stick with the Avermedia/ Leadtek brands you should be okay.
Now that we have verified that the tuner is working we need to setup the scanning range to tell the tuner what frequency to scan in. The next couple of steps are very similar to setting up a new tv. Click on Networks beside TV Adapters.
Select Add, Click on the drop down arrow and select DVB-T Network.
In the Add DVB-T Network, enter the following and select Create:
Go back to the TV Adapters tab and select the tv adapter. On the right hand side select the drop down on Networks and select Croatia and Enable the adapter. Click on save.
Now that we have added a way for the TV tuner to scan channels, lets scan some channels. Go back into the Networks tab and select the Croatia network, and select Force Scan.
Once everything is finished up you should see something similar like the following:
We now need to add them finally to TVHeadend. Click on Map Services and Map all services.
Click on Map services.
We now need to test a couple of channels to ensure that everything is working as it should. Click on the Play button on one of the channels and you should download a .m3u file.
Open it up with VLC and you should see live TV start to play. Ensure that the quality and sound is okay.
Congratulations! You’ve successfully install and configure tvheadend iptv server on Ubuntu 18.04 server. If you have any queries, share them with us via the comment form below.
Hi can you stream more than one channel ?
All of them ?
Or you need more cards?
All seems to be alright until I’d like to “Force Scan”: nothing happens, althought I think all should work, the card is detected correct, I created an ASTRA network (19.2E Astra), assigned them to both adapters of my card, but no services are found.
Result of ‘dmesg | grep -i dvb’
[ 19.918257] ddbridge 0000:03:00.0: detected Digital Devices Cine S2 V6.5 DVB adapter
[ 19.919730] ddbridge 0000:03:00.0: Port 0: Link 0, Link Port 0 (TAB 1): DUAL DVB-S2
[ 19.923697] dvbdev: DVB: registering new adapter (DDBridge)
[ 19.923700] dvbdev: DVB: registering new adapter (DDBridge)
[ 20.958250] ddbridge 0000:03:00.0: DVB: registering adapter 0 frontend 0 (STV090x Multistandard)…
[ 20.999295] ddbridge 0000:03:00.0: DVB: registering adapter 1 frontend 0 (STV090x Multistandard)…
[ 9955.788742] ddbridge 0000:03:00.0: DVB: adapter 1 frontend 0 frequency 0 out of range (950000..2150000)
[ 9955.814431] ddbridge 0000:03:00.0: DVB: adapter 0 frontend 0 frequency 0 out of range (950000..2150000)
Just after my previous comment I played a little with the entries in “TV adapters” and I noticed that I must select “STV090x Multistandard #0 : DVB-S #0” and NOT the card, that is the entry beneath that one and the scan was executed. I installed VLC, too, but I can’t watch any service. I saved any .m3u file and opened it with the build-in app and vlc but none was able to open the stream.
What’s I’m missing?
Thx a lot.
PS: Is this site still alive?
Only for information:
I tested if i could watch tv on my dreambox (dm600) in firefox. After clicking on “VLC” in the page of the dreambox the stream was opened at once and i could watch tv on my xubuntu installation via firefox, dreambox and VLC.
Maybe this helps.
It works now. I’m not sure why but I guess that it was that I again started the mapping of the services although I did this yesterday about a dozen times.
Okay, tomorrow I will reinstall all again: xubuntu from scratch, all tvheadend according to your discreption here, which really helped.
you will hear the results tomorrow
I use ubuntu 19, tvheadend and tbs6522. I failed to setup the tuner(1xdvb-S and 1xdvb-c).
Somebody can help me with this ?
Thanks and all the best!
Really great Work. Please guide everything installed without any error. But why i try to open a link with :9981 port in browsers my system start downloading three .JS files after login in Server. But i didn’t know to do with these three files.
I am getting my channels stream from IPTV Service provider now i want to import that .m3u file in Tvheadend Server and my users will served from my Tvheadend Server. Please Guide.
Hello… Great tutorial… Works as expected…
Just wanted to know if there’s a possibility to stream the channels over Multicast using the IPTV headend or am I forced to use alternatives like MuMuDVB etc?…
HEllo works perfect thanks !
just one question, how to get HTTPS ?
because tvheadend works by defaut on http, and it’s really bad
See this link.