- Purpose
- Before you begin
- 1. Install the tuner hardware
- 2. Install the tuner firmware and/or drivers
- 3. Install the tvheadend software
- 4. Ensure tuners are available for use
- 5. Set up relevant network(s)
- 6. Associate the network with the respective tuner(s)
- 7. If necessary, manually add muxes to the network
- 8. Scan for services
- 9. Map services to channels
- 10. Watch TV
Version: DRAFT-2015-05-20
This document is intended to give you a high-level overview of how to set up tvheadend for the first time. It does not aim to provide a complete description of every step; instead, consult the on-line (web interface) help as you set things up, as there is much more information in those pages that will help you with specific configuration issues. Think of this as the map on how to get there, not the instruction manual about how to drive.
There are some basic concepts that will make life much easier if you understand them from the outset.
Note
|
A tuner is the hardware (chipset) needed to interpret a digital television signal and extract from it the programme stream. The tuner hardware is also responsible for communicating with your satellite dish (technically, the LNB) for DVB-S reception. |
Note
|
A driver is the piece of software that your operating system uses to talk to the tuner. This can be built into the OS (e.g. supported since kernel X) or might be a separate piece of software (e.g. compile and install…). If it’s separate software, it may be because it’s closed-source (and thus comes from the manufacturer) or because support hasn’t yet made it to your kernel (so you end up installing a custom or new version of v4l). |
Note
|
Firmware is a small piece of binary microcode that your system sends to the tuner upon initialisation. This is the cause of more problems than you’d imagine… if you find yourself in times of trouble, this is the first thing to check along with kernel support for your hardware. |
The tvheadend software then sets up a series of configuration elements, and the way in which these interact determines how a TV signal ends up in front of you. They all use what’s known as a many-to-many relationship, in that one configuration element can be related to multiple elements of the next type, and vice versa: one tuner has multiple networks, one network can exist on multiple tuners.
Note
|
The network is the software definition of your carrier network. Broadly, it lays out what sort of network it is (e.g. DVB-T2), how it gets scanned, where the satellite (for DVB-S) is in orbit, and similar. Networks are used by tuners so the hardware knows where to look for a signal. |
Note
|
Networks then have muxes. These are the carrier frequencies (equivalent to the old analogue channels, e.g. 520MHz) that are used to transmit multiple digital signals. These signals are multiplexed together, hence the name mux. |
Note
|
Muxes then carry services. These are the individual streams of data that carry a TV or radio programme; they can also carry data services (e.g. digital teletext, or to communicate things such as catch-up IPTV services). |
Note
|
And finally, services are mapped to channels. These are what you (and thus the software you’re likely to be using, such as Kodi) think in terms of: "I’d like to watch BBC One now, please". |
Why the complexity? Because BBC One might exist in many different places… it might have regional variations on multiple frequencies (services, muxes); it might exist on more than one source (two different satellites); and it might thus be accessible through more than one piece of hardware (two satellite tuners, or a satellite tuner and a terrestrial/DVB-T tuner). When you select the channel you want to watch or record, tvheadend can then map a path through all those variables to ask a particular tuner to go and get the signal for you.
All understood? Yes? So, it’s on with the set up …
This is obviously a core requirement that’s outside of the scope of this guide
You basically have the choice of:
-
External USB tuners that plug in
-
Internal (e.g. PCI) tuners that go inside the computer chassis
-
External SAT>IP tuners that send their decoded signals over a LAN connection.
Follow the appropriate installation instructions and, if relevant, the setup instruction (e.g. for SAT>IP, which are effectively small, standalone computers).
Similar to the above, tvheadend can do nothing if your tuners aren’t working properly. A good place to check how to set up your tuners is the linuxtv wiki - this will not only tell you what’s supported under Linux, but also how to get it all working:
Many tuners require firmware - normally, a binary file that’s been extracted from the proprietary drivers used by Windows. Many Linux distros include a package for the most common devices (e.g. linux-firmwares under Ubuntu or firmware-linux-nonfree under Debian). If this isn’t sufficient, a good source of firmware files is the OpenElec git repository:
Typically, you would download the binary file and install it into /lib/firmware
, owned by root:root
, permissions rw-r--r--
(0644)
Follow the instructions that are specific to your Linux distribution (Ubuntu/Debian/Mint, Arch, Fedora…). This will typically be PPA-and-dkpg for Debian, but most other distros will need you to build your own version from source.
Do not assume that your distro’s package manager will give you the latest version of tvheadend - indeed, give you any version at all. Always check.RedHat
tvheadend web interface: Configuration → DVB Inputs → TV Adapters
On this tab, you’ll see a tree structure, with the Linux device list at the top level (e.g. /dev/dvb/adapter0
)
Individual tuners are then the next level down (e.g. DiBcom 7000PC : DVB-T #0
)
Click on each tuner that you want tvheadend to use, and ensure "Enabled" is checked in the Parameters list
If anything is obviously wrong at this point, you probably have a driver/firmware error which you’ll need to resolve before going any further.
tvheadend web interface: Configuration → DVB Inputs → Networks
Create a network of the appropriate type here. You can have multiple networks of the same type as necessary, e.g. to have two DVB-T networks defined, one with HD muxes, one without.
The creation process allows you to select from a series of pre-defined mux lists for common DVB sources. These are maintained outside of tvheadend, and are downloaded from linuxtv - but they do go out of date as broadcasters move services around and national authorities change entire pieces of spectrum. As such, you should try the pre-defined values, but you may need to add muxes manually.
Critical configuration items at this stage: <……..>
tvheadend web interface: Configuration → DVB Inputs → TV Adapters
Associate each of your tuners with the correct network through Parameters → Basic Settings.
This can be as simple or as complex as necessary. You may simply have, for example, a single DVB-S2 network defined and then associate this with all DVB-S2 tuners. Or, you might have multiple networks defined - different satellites, different encoding. So, as further examples, you might define and then associate an HD DVB-T2 (e.g. H.264) network with HD tuners, while having a separate SD network associated with an independent SD (e.g. MPEG-2) tuner.
Critical configuration items at this stage: <……..>
At this point, your tuners now know what networks to use: one network can appear on multiple tuners (many-to-one), and one tuner can have multiple networks.
tvheadend web interface: Configuration → DVB Inputs → Muxes
Ideally, this is where you’ll see a list of the pre-populated muxes as created when you set up your initial network. However, should there be any issues, this is where you can manually add missing muxes. You only really need to worry about this if the pre-defined list didn’t work (e.g. because of out-of-date data - damn those broadcasters, re-arranging their services without telling anyone…) or because automatic detection hasn’t successfully found all the muxes over time.
If you do need to add something manually, you’ll need to search the Internet for details of the appropriate transmitter and settings: satellites tend not to change much and are universal over a large area, but terrestrial muxes tend to be very localised and you’ll need to know which specific transmitter you’re listening to.
Good sources of transmitter/mux information include:
-
KingofSat for all European satellite information
-
ukfree.tv for UK DVB-T transmitters
-
Interactive EU DVB-T map for primarily central and northern Europe
other major sources….?
You can also use dvbscan to force a scan and effectively ask your tuner what it can see.
Critical configuration items at this stage: <……..>
tvheadend web interface: Configuration → DVB Inputs → Services
This is where the services will appear as your tuners tune to the muxes based on the network you told them to look on. Again, remember what’s happening: the tvheadend software is telling your tuner hardware (via the drivers) to sequentially tune to each mux it knows about, and then see what programmes it can see on that mux, each of which is identified by a series of unique identifiers that describe the audio stream(s), the video stream(s), the subtitle stream(s) and language(s), and so on.
To force a scan …
Once scanning for services is complete, you need to map the services to channels so your client can actually request them (i.e. so you can watch or record). You can do this in two places:
tvheadend web interface: Configuration → DVB Inputs → Services
Press the "Map All" button
tvheadend web interface: Configuration → Channel/EPG → Channels
Press the "Map Services" button
Any explanation on how a channel can map to multiple services <……>
Anything about using bouquets
That’s it - you’re done. You should now have a working basic tvheadend installation with channels mapped and ready for use!
As required, you may now wish to look into:
-
Setting up different EPGs (inc. localised character sets and timing offsets)
-
Setting up channel icons
-
Setting up recording profiles
-
Setting up streaming profiles (including transcoding)
-
Arranging your channels into groups (channel tags)
-
Setting up softcams for descrambling
-
Setting up access control rules for different client types/permission levels