###0. Before you begin
There are some basic concepts that will make life much easier if you understand them from the outset.
####Hardware/software fundamentals
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.
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).
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.
####tvheadend fundamentals
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.
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.
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.
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).
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 ...
###1. Install the tuner hardware
-
This is obviously a core requirement that's outside of the scope of this guide
-
You basically have the choice of USB tuners that plug in; PCI tuners that go inside the computer chassis; and SAT>IP tuners that send their decoded signals over a LAN connection.
###2. Install the tuner firmware and/or drivers
-
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:
http://www.linuxtv.org/wiki/index.php/Hardware_Device_Information
-
And a good source of firmware files is the OpenElec git repository:
###3. Install the tvheadend software
- Follow distribution-specific instructions, typically using your package manager (e.g. dpkg).
Need to link to 'how to install' instructions
mpmc's comment re: package manager and versioning (e.g. having 3.4 in PPAs)
###4. Ensure tuners are visible and enabled
Configuration -> DVB Inputs -> TV Adapters
-
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 the tuner, 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.
###5. Set up relevant network(s)
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.
Critical configuration items at this stage: <........>
###6. Associate the network with the respective tuner(s)
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.
###7. If necessary, manually add muxes to the network
Configuration -> DVB Inputs -> Muxes
This is where you'd manually add muxes or find the pre-defined ones you selected when defining the network.
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.
Critical configuration items at this stage: <........>
###8. Scan for services
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.
What to do to ensure things are scanning... IDLE, PEND, etc.
Need to make active voice, more prescriptive: "do this, check that"
###9. Map services to channels
Configuration -> Channel/EPG -> Channels
This is where your mapped channels will appear, whether you map them through the Map Services button on this screen or the Map All button on the previous one.
What to do to map services/channels: <........>
Any explanation on how a channel can map to multiple services <......>
Need to make active voice, more prescriptive: "do this, check that"