Article points out several coding errors in MediaPortal 2

I’m not a big fan of using Windows for anything unless you absolutely need to, but for those who do, one of the more widely used Windows-based PVR backend and frontend software packages is MediaPortal 2. I ran the original MediaPortal briefly, early on in my attempts to set up a satellite backend, and had a lot of issues with it, but I will say they had the best developer and community support I have seen anywhere (no crabby developers that felt the need to insult or demean a hapless user from time to time, as I too often see in Linux-based software forums). Were it not for the need to use Windows I might have stayed with it, but I just really hated having to use Windows for a server, and it didn’t play that well with my satellite tuner cards, so I wound up switching to TVHeadend running under Linux.

Anyway, now I realize one reason I might have had some issues with it. According to this article, their code is rather buggy:

Brief analysis of Media Portal 2 bugs

Now, it appears that the code was analyzed using a commercial product called PVS-Studio which, as best I can figure out from that page, is program used to analyze programs written in the C language and some of its variants. So in essence, it would appear that the purpose of the article is primarily to demonstrate how their software can find bugs in other people’s software. If you ran that program against any other software written in C, it would probably yield a similar list of what it considers to be problems in the code. In other words, viewed one way this article is in part a thinly-veiled advertisement for their product. Still, one would hope that the MediaPortal 2 developers would at least fix the problems noted in that article.

So, if any of you are using MediaPortal 2, you might want to bring this article to the attention of the developers, if they haven’t already seen it. As for the PVS-Studio software, I will just pass along this text from the article:

So, let’s take a look at the most interesting bugs we found; the project authors can do a more detailed review of the bugs by doing the project check themselves, or by making a request for a temporary license. Also, dear readers, if you are non-commercial or individual developers, I suggest using the free version of our static analyzer. Its functional abilities are absolutely identical to the paid version and so, it is the perfect fit for students, individual developers, and teams of enthusiasts.

I can think of at least once piece of software I’d like to see analyzed by something like this, but I don’t know if any part of it is written in C. Not mentioning any names, but it rhymes with toady, or grody.

Advertisements

What is a SAT>IP server, and can you use one in North America?

To begin, I suggest you watch this YouTube video. As someone familiar with free-to-air satellite in North America, you may not quite understand it all at first, in particular why there are four cables coming from a single satellite dish. The reason is that this was originally developed for the European market. I’ll try to walk you through the differences but to get the general overview, watch the video first:


In order to understand the need for the four cables from the dish and the four inputs on a SAT>IP server we need to talk for a moment about the differences in LNB’s as used in Europe vs. those used in North America. If you are technically-minded you may want to refer to the Wikipedia page on the Low-noise block downconverter , which I’m using as a source here.  I’m mostly quoting directly from the Wikipedia page for the following tables, with a few minor edits to make things a bit clearer (mostly converting GHz to MHz for consistency).  To start with, these are the specifications for a North American C-band LNB:

  • Local oscillator: 5,150 MHz
  • Frequency: 3,400–4,200 MHz
  • Noise figure: ranges from 25 to 100 kelvins (uses kelvin ratings as opposed to dB rating).
  • Polarization: Linear
Supply
voltage
Block Local oscillator
frequency
Intermediate
freq. range
Polarization Frequency band
13 V Vertical 3,400–4,200 MHz 5,150 MHz 950–1,750 MHz
18 V Horizontal 3,400–4,200 MHz 5,150 MHz 950–1,750 MHz

Note that nowadays most North American satellites use 3,700-4,200 MHz for C-band. A C-band LNB that receives the entire 3,400-4,200 MHz range is usually marketed as a “wideband” model in North America, and is generally only used to receive certain international satellites that are closer to the horizon in the eastern sky. To find the exact intermediate frequency for any given C-band frequency, subtract the C-band frequency from the local oscillator frequency of 5,150 MHz. This does mean that the higher the C-band frequency is, the lower the intermediate frequency will be. Next, these are the these are the specifications for a North American standard linear Ku-band LNB:

  • Local oscillator: 10,750 MHz
  • Frequency: 11,700–12,200 MHz
  • Noise figure: 1 dB typical
  • Polarization: Linear
Supply
voltage
Block Local oscillator
frequency
Intermediate
freq. range
Polarization Frequency band
13 V Vertical 11,700–12,200 MHz 10,750 MHz 950–1,450 MHz
18 V Horizontal 11,700–12,200 MHz 10,750 MHz 950–1,450 MHz

What I want to point out here is that the intermediate frequency range is roughly the same for C-Band and Ku-band, the only difference being that the Ku band has a narrower frequency range. So when we in North America set up a receiver or a tuner for DVB-S or DVB-S2 signals, the only control sent to the LNB is for the voltage, in order to make it switch polarity. The LNB then sends the entire local oscillator bandwidth back to the receiver or tuner, and it is up to the receiver or tuner to pick out the correct frequency, in much the same way that a traditional TV receiver picks out one TV channel out of all those coming in over the antenna or cable.

One other difference between C-Band and Ku-Band is the way you exact intermediate frequency for any given Ku-band frequency. For Ku, you start with the Ku-band frequency and subtract the local oscillator frequency of 10,750 MHz, which is the reverse of the way it’s done for C-band. Don’t ask why, that’s just the way it is!

This brings us to the Universal LNB, or as it’s sometimes referred to in Europe, the “Astra” LNB. As Wikipedia notes:

A Universal LNB has a switchable local oscillator frequency of 9.75/10.60 GHz to provide two modes of operation: low band reception (10.70–11.70 GHz) and high band reception (11.70–12.75 GHz). The local oscillator frequency is switched in response to a 22 kHz signal superimposed on the supply voltage from the connected receiver. Along with the supply voltage level used to switch between polarizations, this enables a Universal LNB to receive both polarizations (Vertical and Horizontal) and the full range of frequencies in the satellite Ku band under the control of the receiver, in four sub-bands.

They do this because Astra uses a wider range of frequencies for Ku, starting at 10,700 MHz as in North America, but ending at 12,750 MHz. If you want the details behind this see the Wikipedia article, but the specs for the Universal LNB used in Europe are as follows:

  • Noise figure: 0.2 dB typical
  • Polarization: Linear
Supply Block Local oscillator
frequency
Intermediate
freq. range
Voltage Tone Polarization Frequency band
13 V 0 kHz Vertical 10,700–11,700 MHz, low 9,750 MHz 950–1,950 MHz
18 V 0 kHz Horizontal 10,700–11,700 MHz, low 9,750 MHz 950–1,950 MHz
13 V 22 kHz Vertical 11,700–12,750 MHz, high 10,600 MHz 1,100–2,150 MHz
18 V 22 kHz Horizontal 11,700–12,750 MHz, high 10,600 MHz 1,100–2,150 MHz

Some North American satellite enthusiasts have been using 22 kHz tone switches in their setups for years, probably without knowing the original purpose for them. When we use them here, it’s typically to switch between two LNB’s, such as a C-band and a Ku-band LNB. But in Europe, they were used to switch between the upper and lower half of their expanded Ku band.

It’s not that uncommon to find Universal LNB’s with four coaxial outputs.  Although in most cases the outputs can be individually switched by sending the correct voltage and by the presence of absence of the 22 kHz tone, in many cases they were used in systems where each output would be dedicated to one of the four possible states.  That would make the entire European Ku band on a single Ku satellite available to a satellite distribution system.

A universal LNB can be used in North America if you have a compatible receiver or tuner, but remember that our Ku band only goes up to 12,200 so you won’t find any Ku-band signals above that.

This explains why most SAT>IP servers have four coaxial inputs, typically labelled V/L, V/H, H/L, and H/H. The letter before the slash is the polarity (Vertical or Horizontal) and the letter after the slash is the band (L=10,700–11,700 MHz, H=11,700–12,750 MHz). These would typically be connected to a quad output LNB that is pointed at a single satellite.

So, this fits in with the European idea of free-to-air – typically you get all your content from a single Ku-band satellite. Generally speaking, the major reason SAT>IP was developed was so that people didn’t need to run two or four coaxial cables to every receiver in their home.  Instead, the SAT>IP server would stream the desired channels to the various computers and devices on the local network.  If you’re familiar with a HDHomeRun device, it’s similar to that, but for satellite frequencies.

So hopefully now the video at the start of the article makes more sense, if you are one of those who’s never understood the European way of doing things.

The question you may be asking is, could we use a SAT>IP server in North America with our version of Free-To-Air? And my answer to that would be maybe, but in limited circumstances. I don’t know of anyone that’s importing SAT>IP equipment into North America, probably because at the present it would have limited usefulness here. As far as I can tell, SAT>IP servers have no way of dealing with a moveable dish – they expect the dish to be permanently pointed to a single satellite. And beyond that, I don’t know if any of them can be configured for use with a C-Band or linear Ku-band LNB. You can get dual or quad output Universal Ku-band LNB’s in North America, and by doing the math you could perhaps use a dual-output C-band LNB by configuring the server to use an equivalent Ku-band frequency (one that would be converted to the same local oscillator frequency) but you’d still be limited to pointing the dish at a single satellite.

There’s probably no reason you could not have more than one SAT>IP server on the local network, in order to receive signals from multiple satellites (assuming you have more than one satellite dish), but I have no personal experience with such devices so I cannot say that with certainty at this point in time.  And another thing I don’t know is whether you can configure a SAT>IP server with four inputs to use multiple sources from different satellites.  Here in North America it would make a lot more sense to use two of the inputs with a dual output linear Ku-band LNB, and the other two inputs with a dual output C-band LNB or a different dual output linear Ku-band LNB.  There’s no reason either of these scenarios would not be technically possible, but if the software or firmware in the SAT>IP server doesn’t know about C-band or the North American Ku band, it would be a lot more difficult to configure.

There probably are situations a SAT>IP might be useful. If you are primarily interested in a channel or channels from a single satellite, and particularly if in order to receive that satellite you need to position the dish at some distance from your house, it might be worth using SAT>IP to backhaul the signals to your home instead of running a long run of RG-6 or RG-11 cable. You’d need to use server that’s in a waterproof, weather-resistant enclosure, and you might also want to use fiber optic cable for the run, although you’d still need some way to get power to your equipment enclosure. The same is true if you attempt to use some type of WiFi link; you still need power for the equipment at both ends.

I had originally discussed something like this in my article Minisatip: A possible way to extend the distance between a satellite dish and your TVHeadEnd (or other backend) server but at the time I wrote that, I really had no conception of what SAT>IP actually was (not that I consider myself any kind of expert on it now). The difference between what I was taking about in that article and in this one is that in the earlier article the emphasis was on software running on some kind of dedicated computer, whereas here I’m talking about a hardware device specifically built to be a SAT>IP server.

SAT>IP Tuners in TVHeadEnd

SAT>IP Tuners in TVHeadEnd

So where would you get such a hardware device? There is a list of them (and other types of SAT>IP products) at the satip.info site. The same site has links to software and hardware that can be used to view the streams. But keep in mind that if you are running a PVR backend, such as a recent version of TVHeadEnd, it may already have the capability to receive and record SAT>IP streams, and to pass on the live streams to your frontend systems. In fact, I believe the newest versions of TVHeadEnd can detect a SAT>IP server on the network and use it as a tuner, in much the same way that it would find and use a HDHomeRun device.  As an aside, TVHeadEnd can also act as a SAT>IP server.

One thing I find especially interesting are the new (and possibly as yet unreleased) SAT>IP LNB units, such as this one from the Danish company TRIAX:

Triax SAT>IP LNBUnder the boot in the above photo there is a standard Ethernet jack:

Underside of Triax SAT>IP LNB with boot removed

I’m not sure if this LNB is available for purchase yet, because I can’t find it offered for sale on any site anywhere in the world, but from the product specifications I’ve read, it appears that this is a combination LNB and SAT>IP server with eight (8) tuners!  So, just by connecting this to the Internet (most likely through some type of power insertion device – the specifications state it is “Powered via 802.3@rev 2012 PoE type 1, class 2” but do not mention whether a power supply is included), you have eight Ku band tuners available from a single satellite, with no need for an additional SAT>IP server.  Now, if only they would build a C-band LNB with similar capabilities!  We could skip the tuner cards (with their buggy driver issues) and we’d never need to worry about RG-6 cable loss, although since underground Cat 5e or Cat 6 is limited to about 100 meters (328 feet) in length (and actually less than that as a practical matter, since packet loss can get rather significant as you approach 100 meters), you probably would want to run fiber optic cable for any extended length.

SAT>IP is an interesting technology and although it’s not yet gained wide acceptance among free-to-air users in North America, the day may come when it is more useful here, particularly for those with fixed dishes permanently parked on one location in the satellite arc. I will caution you that if you decide to order any equipment from overseas in order to experiment with the technology, it will probably not come with a North American-style power supply that plugs into a 120 VAC outlet. Unless you feel like installing a 240 volt outlet for the server, I’d check to make sure it uses a “wall wart” type power supply that can be replaced with one of similar output ratings, but that will plug into a standard USA/Canada power outlet.

The never final, always subject to revision article on how to build a Satellite TV PVR distribution system using Tvheadend

THE “WHY” BEHIND THIS ARTICLE

I’ve wanted to write an article to help new users set up a working PVR backend system for our peculiar type of North American free-to-air satellite for quite some time, but have never felt as though I had the all the pieces to do it right. I finally decided that the only way it would ever get written is if I start it, and then add to it as I remember things I had to do, or find out new things I should have done. Therefore, this article should probably never be considered finished – there is always the chance that I will edit it or add to it. And if you leave a comment on the article, I just might incorporate your comments into one of the edits.

First of all, I should probably explain why you would want to build a Satellite TV PVR distribution system using Tvheadend. And actually, it’s probably easier to explain why you wouldn’t want to do this. You probably would not want to do this if:

  • You have a very limited budget for satellite TV and don’t want to invest in any new equipment.
  • You have, or plan to purchase, a standalone satellite TV receiver that will receive all the satellite channels you’d like to receive.
  • You don’t care about recording shows, or your satellite TV receiver gives you a reliable way to record shows.
  • You never want to watch live TV or recordings on any TV’s or devices except for the TV directly connected to your satellite receiver.
  • You never have scheduling conflicts where you cannot watch or record a show you’d like to see because your receiver’s tuner is already in use.
  • You don’t have multiple dishes, or you do have more than one dish but a simple DiSEqC and/or tone switch meets your needs for connecting your dishes.
  • You either don’t care about the types of signals that some find difficult to receive, such as 4:2:2 or 16APSK, or your satellite receiver allows you to receive such signals.
  • Your receiver gives you a reliable way to schedule shows you want to record, and doesn’t make you wish you had a better guide (or any guide at all) to use when scheduling recordings.
  • If you use a regular TV antenna for local channels, your receiver also allows you to watch or record shows from those channels, or you have another way to record shows from those channels.
  • You are under the impression that this type of system will let you pirate signals from subscription satellite TV services. It won’t, particularly in North America. This is only for unencrypted free and legal satellite TV.

If the first item on the above list is true, then you probably should stop reading now. Building a backend system for satellite TV doesn’t need to be super expensive, particularly if you have a local source for gently used desktop computers that are new enough to have PCIe card slots (note the “e”, the older PCI slots won’t work), and there are compromises you can make to bring the cost even lower, but if you are living paycheck to paycheck then this might be a major expenditure for you. The one advantage of standalone free-to-air (FTA) satellite receivers is that they are dirt cheap nowadays, although that usually also means the quality is not that high. But at those prices (sometimes less than $50) you could try a few and still come out ahead.

Otherwise, if any of the other items on the above list is NOT true for you, then you probably will want to read on.

While writing this article I have made the assumption that the reader already has some experience with C-band and/or Ku-band satellite TV, and already has one or more satellite dishes and a satellite TV receiver. Therefore, I will not be explaining some of the essentials of setting up a satellite dish, peaking the dish and LNB for best reception, etc. It would be my recommendation that even if you know you want to do what is described in this article, you at least start out with a cheap standalone free-to-air (FTA) satellite receiver and get your feet wet with that. It is much more difficult to set up and tune a new dish for peak reception if you don’t have a FTA receiver available, so you can see if you’re getting a good signal from your dish(es).

WHAT IS THE DIFFERENCE BETWEEN A BACKEND AND A FRONTEND SYSTEM?

I need to cover this early because there is still a lot of confusion about this. For those of you used to computers and networking, you can think of the backend as roughly analogous to a server, and the frontend as roughly analogous to a client. A better way to describe this is as follows, but please keep in mind that these are generalizations and that certain specific setups may not fit into the mold I am about to describe.

As I wrote in the article, What is the best backend software to use for a Free-To-Air satellite TV system?,

If you use a program like Kodi to watch live or recorded television, you’re probably already familiar with the backend/fronted model. To put is simply, the backend is a server that communicates with the tuners, such as a tuner card or USB-connected tuner, or even a network tuner such as a HDHomeRun. The backend system can sit anywhere on the local network and communicates with one or many frontends. The backend handles streaming live programming, or recording it for viewing at a later time. In contrast, the frontend is run on a computer that often connects to a television set via a HDMI cable. It displays live or recorded programming, and usually gives the user a way to schedule programs for recording and perform some other administrative tasks. Some tasks can be performed from either the backend or frontend, some from the backend only, and some from the frontend only. But generally speaking, the frontend is what the user most commonly interacts with after the initial configuration is finished.

But remember, it is the backend that performs the crucial task of communicating with the tuners, which includes sending any control commands that might be necessary. So, for example, if you have any switches (DiSEqC or 22kHz tone) between the tuner and your LNB’s, the backend will control them. If you have a USALS or DiSEqC controlled motor, the backend will need to deal with that as well.

…..

Note that it is usually possible to run a backend and a frontend on the same computer – you don’t need two computers for the purpose, and if the backend computer has a HDMI output and is in a location close enough to your TV that you can connect a HDMI cable between the two, there’s generally no reason not to run a frontend program on the same system as the backend. Some software installers set up a backend and frontend by default.

In other words, the backend is the “brains” of your setup. The client software, which for most users is Kodi, interacts with the backend. This article is NOT about the client software, however. The only thing I will say here about Kodi is that you should NEVER buy a small box that comes pre-loaded with Kodi at a county fair or from someone on Craigslist, or in some equally questionable situation where the seller can take your money and disappear. These boxes are typically sold with a number of piracy addons included, most of which are unsupported and some of which can be a security risk for that system and for others on your local network. The mere use of those addons can also make you guilty of copyright infringement, which could cause you to incur legal fees or financial penalties, or could get your Internet service shut off. Just because you might know someone who uses such a box and hasn’t yet had any of those issues doesn’t mean it won’t happen to you. The Kodi developers hate these boxes because they say it gives the Kodi project a bad name; of course it must also be said that a few of the Kodi developers are perfectly capable of giving the Kodi project a bad name without any outside help, but that’s a whole other discussion. It’s okay to use a small, inexpensive box for Kodi, but it should be one on which YOU install the operating system (Windows or Ubuntu Linux, for example) and where YOU install Kodi, and and you do NOT install addons from any dicey repositories, or for that matter addons from any source other than the official Kodi repositories.

Most users have only one backend system (in this case it will be the system running Tvheadend), but will have one or more frontend systems, only one of which may be on the same computer as the backend. A frontend system can be a dedicated computer connected to a television receiver, in which case it’s sometimes referred to as a HTPC (Home Theater PC), or simply the Kodi software running on a general purpose computer, a tablet computer, or possibly even a phone. Kodi runs on many different platforms, so it’s possible to have many different types of frontend systems. And that’s all I will say about frontends for the moment.

WHAT HARDWARE DO I NEED?

There are many possible choices here, but I recommend a standard desktop style computer that contains a motherboard with at least three or four PCIe card slots (again, note the “e”, the older PCI slots aren’t compatible with the newer PCIe cards). You only need one PCIe card slot for each PCIe card you will install, but once you get your first tuner card working successfully there’s at least a chance you will want more sooner or later. Speaking of which, you will need one or more DVB-S2 tuner cards. In North America, if you don’t want to import cards directly from overseas, your choices are for tuner cards are somewhat limited, and you will probably wind up using the ones made by TBS Technologies, only because they are the most readily available.

Let me once again quote from my earlier article (the same one I quoted from above):

Also, you need to be aware of the limitations of various tuners. Some older DVB-S tuners cannot receive DVB-S2 signals, and some DVB-S2 cards cannot receive 16APSK signals (if you really want to receive one of the handful of 16APSK signals on North American satellites, and you are considering the purchase of a TBS tuner card, it is strongly recommended that you purchase one of the “professional” grade models). Some tuner brands do not support their tuners with updated drivers, meaning that people may recommend you use some unofficial driver from a questionable source. Or, if you want to use more than one tuner card from the same manufacturer or of the same model in the same backend system, you may find that’s impossible because the driver programmers apparently never anticipated that someone might like their tuners enough to want to buy a second one (I guess that lets you know what they think of their product). The may be certain tuner models that will not work at all under Linux (you can find lists of DVB-S2 tuners known to work in Linux by following the links on this page, but just because a particular tuner isn’t mentioned does not necessarily mean it won’t work – it may just be that no one ever bothered to add it to the page). Problems caused by tuners or by tuner drivers will likely affect any backend software you might choose to use.

With TBS tuner cards in particular, you need to be careful that they are not sharing interrupts (IRQs) with other hardware devices in your system. Also, if you have a newer model TBS card and find that it will not scan muxes to find channels, try this. If you find that many of your recordings have bad timing information, and it’s not due to a weak signal, it is sometimes possible to fix that by changing a setting in Tvheadend.

If you start asking around about which tuner you should purchase, please keep in mind that the “Linux snobs” (the type that will only point you to man pages and Google when you need help) may prefer a particular piece of hardware, but only because they’ve had enough Linux experience to work around any issues they encounter. Just because they could get a particular tuner to sing and dance doesn’t mean that you can, unless you have a similar level of Linux experience. If you ask in a Linux forum which tuner is best, and make a purchasing decision based on the responses you receive, and you are relatively inexperienced with Linux (or you are simply not a Linux devotee), there is a real good chance that you that you will not be happy with your purchase. One tip, no matter how much they may be recommended by a particular user or group of users, avoid older PCI cards – any tuner cards you purchase now should be PCIe (note the “e”) cards.

Unfortunately, not all PCIe tuner cards are compatible with all motherboards. I’ve had good luck with a MSI motherboard (specifically the model B85M-G43, although I’m sure many other models will work equally well), but when I had tried using the same tuner card in a particular Gigabyte motherboard it would not work. A real Linux expert perhaps could have figured out the reason why, but since I’m not a Linux expert it was a lot easier to just try a different motherboard. Had I known about this thread in the TBS forum, I might have tried the suggestion there to see if I could get it to work.

There are also USB-connected external tuners, and while some users have had no problems using these, several others have reported problems with overheating leading to premature failure. Also, with certain USB-connected tuners there is an extra step of installing firmware, in addition to the drivers, at least when using Linux as the operating system. I’ve never used a USB-connected tuner, but if you decide to try one, I’d at least keep it in a well-ventilated place.

If you want to build a reliable system, I definitely recommend a desktop computer that will accept the PCIe cards. If you choose to “cheap out” and use something smaller, at least please be sure it does not have an ARM-based processor. You can get Tvheadend to run on such systems, but certain things will be more difficult than they should be, and you may also find you have more bad recordings and other weird issues. Note that you don’t need a high-powered gaming computer to run Tvheadend, in fact most of what Tvheadend does will not put much stress on the CPU(s). An older standard desktop model will probably work just fine, as long as it has the PCIe card slots. The computer must be capable of running Linux, so generally speaking, that leaves out boxes that run Android only.

Although there may have been some custom builds of Tvheadend for specific smaller devices, I recommend that new users avoid them. Once you have built your first Tvheadend system and see how it works, then you’re ready for the challenge of installing it on something smaller and with fewer resources, if that’s what floats your boat. But when starting out, you don’t need any additional challenges. Remember, a system that works fine for terrestrial television may not be at all suitable for free-to-air satellite TV reception, due to the difficulty of installing drivers required by the tuner cards, or the difficulty of installing and running additional software required to get program guide data.

At the time I am writing this I suggest using TBS tuner cards. The “consumer grade” ones are fine for most transponders but if you are going to try to receive anything in 16APSK or 32APSK format, I strongly recommend going with a “professional grade” card (this will also be true if you are going to try receiving C-band signals on a 6-foot or smaller dish). Each card will have between one and four tuners, and unless you are restricted in some way as to the number of dishes you can have on your property, you might want to think about getting a quad (four) tuner model. You may find that even four tuners aren’t enough, but if you can afford it I’d at least start out with a quad tuner card. If money is no object, I’d start with the TBS6908 Professional DVB-S2 Quad Tuner PCIe Card. When paired with a 10 foot (or larger) dish and a good LNB you should be able to receive just about any unencrypted service up there. However, many users will opt for a less expensive “consumer grade” model, and that’s fine, just don’t expect great results on “difficult” signals such as 16APSK or 32APSK signals.

Beware of satellite dealers that have old stock they are trying to sell. In some cases the older cards work perfectly fine, but may not receive newer formats (a card that only receives DVB-S, and not DVB-S2 is nearly worthless nowadays). In other cases the cards may be dogs that no one would buy because they never worked that well, or ONLY worked well for extreme Linux geeks that dream in code and talk in a language that you or I would only understand about 10% of, at best. The sort of people who can write their own drivers for tuner cards, in other words. Such people can make some of the more obscure tuner cards sing and dance, figuratively speaking, but their preferred choice for tuner cards may not be the best choice for you if, like most of us, you intend to use the stock drivers provided with the device. I hate saying anything bad about these guys, because I’m sure they are extremely intelligent, but they should probably never give advice to us mere mortals on which tuner cards to buy, because we just want something that works without a lot of fuss, and we don’t want to have to rewrite the tuner driver or poke around in the bowels of Linux to make a tuner card work!

Speaking of tuner card drivers, if you are somewhat more of a Linux expert than I (which isn’t exactly a high standard, since I struggle with Linux), you should be aware that TBS DVB-S2 tuner users may now be able to use open source drivers.

I HAVE A COMPUTER AND HAVE INSTALLED A TUNER CARD, NOW WHAT?

In order to install Tvheadend you will first need to install the Linux operating system. If you don’t plan on using the same computer for both your backend and frontend, I suggest using Ubuntu Server. You do not need a desktop on your backend server. However, if you also want to install Kodi on the same computer, then install regular Ubuntu. In either case you should install a Long-Term Support (LTS) release, so you’re not forced to upgrade the software prematurely.

If you are using TBS tuner cards, I have found it necessary to do this after installing Ubuntu, in order to avoid serious errors while building the drivers (at least this was true under Ubuntu 14.04):

sudo apt-get update
sudo apt-get install linux-headers-`uname -r`
sudo apt-get install make gcc

I’m not sure whether it’s still necessary to do this under Ubuntu 16.04, though it probably couldn’t hurt. Even after that, you may see warnings and other notices while the TBS drivers are compiling, but usually they will still work.

One thing I would like to warn you about is that there are distributions out there called “OpenElec” or “LibreElec.” I most emphatically DO NOT recommend these, unless you simply must have the absolute easiest installation, and you don’t care about the fact that you won’t be able to get to a Linux command prompt easily. And before you say you don’t care about that, please understand there will be consequences, such as not being easily able to get program guide data (and that is doubly true if you also ignored my advice not to use an ARM-based processor). Quoting Robert Cameron in the Tvheadend forum:

… And if you do decide to go with a PVR, for everyone’s sake please ditch LibreELEC: it is a poor excuse for a proper OS and will cause you nothing but problems trying to work around its limitations (such as inability to easily upgrade core components, like a current and proper build of Tvheadend).

If you are installing something for a senior citizen that knows absolutely nothing about computers, doesn’t want to know anything about them, will just accept any limitations they encounter because they don’t know any better, AND you won’t be around to help them at all, then maybe you can make a case for using one of the “-Elec” distributions, but please don’t come crying when you are frustrated as hell because you can’t do anything in Linux. Please use a LTS build of Ubuntu Server or Ubuntu Desktop if you don’t like dealing with problems.

Assuming you have followed the manufacturer’s instructions while installing your tuner card, you will probably find that you need to install drivers for your tuner, and they should have given you the driver software or shown you where to get it online. Once again I will quote from my earlier article:

One downside of using any Linux-based backend is that you may need to install drivers, either to get your tuner to work at all, or to get it to work at peak efficiency. And if you are used to installing drivers in Windows, where it’s more or less a point-and-click type of operation, you may find that the procedure for doing it under Linux is a bit off-putting. For certain tuner brands, it is not very difficult if you can follow instructions (for example, this page explains how to do a TBS driver install under Ubuntu 11.10, 12.04, 12.10 and 13.04 (TBS6921 and other)). But not everyone finds it easy; sometimes there are entire forum threads about driver installation. If you’ve never touched Linux before in your life, then you may want to seek help from an experienced Linux user. Make sure you watch how it’s done and take notes, because you will likely need to do it again if you ever upgrade the Linux kernel on your system (and Ubuntu loves to push kernel updates every so often, so don’t just blindly accept a software update 10 minutes before you have something scheduled to record!). This bash script can help simplify the task of rebuilding the TBS drivers after a kernel update.

Note that the bash script mentioned in the previous paragraph is for building the standard closed-source TBS tuner drivers. If you choose to use the open source drivers, you’re probably enough of a Linux expert to know how to rebuild them without needing a script (but if you happen to find one, please let me know in the comments!).

After you have installed the drivers and rebooted the system, you can discover whether your tuner cards are being recognized by the operating system by using either or both of these two commands:

dmesg | grep -i dvb
ls -l /dev/dvb

If you have installed TBS Tuner cards, before you go any further please read these articles, which will help you avoid some pitfalls down the road:

At the very least, TBS card owners should read the first article in the above list now, and keep the others in mind for future reference.

Also, if you are using a version of Ubuntu newer than 14.04, it may have come with the package unattended-upgrades installed by default.  With the default settings, this package will install certain types of updates automatically, including Linux kernel updates.  The problem with that is that if you have received a kernel update and then reboot the system for any reason, and you have not reinstalled the TBS drivers since the update was installed, it will use the new kernel and you will not have any tuners available (so you will not be able to view channels, and scheduled recordings might be missed).  And if you ssh into the system it will print *** System restart required *** in your terminal window, which might cause you to reboot the system without thinking about the fact that you then need to reinstall the drivers.  To avoid this problem, you may wish to disable unattended upgrades.  The easiest way to do this is to edit the file /etc/apt/apt.conf.d/50unattended-upgrades and comment out the lines that are allowing the upgrades, such as these:

// “${distro_id}:${distro_codename}”;
// “${distro_id}:${distro_codename}-security”;
// “${distro_id}ESM:${distro_codename}”;

If any of these lines do not have the // characters at the start, place them there and save the file. Note you will probably need to use sudo to edit this file, for example sudo nano /etc/apt/apt.conf.d/50unattended-upgrades. See this page for more information on disabling unattended upgrades, though I do not recommend the “Method Three” shown there.

Once you have installed the tuner drivers and verified that the operating system can detect them, it is time to install Tvheadend. Before we go any further, I should point out that Tvheadend is an evolving program, and as with many programs, when newer versions are released, configuration options may change, and often new options are added. In most cases, if you see a new option and you don’t know what it’s for, you can safely leave it at the default setting. While writing this article I am using Tvheadend 4.0.9, which is the current stable version. There have long been rumors of an upcoming 4.2 release, but it hasn’t happened yet and when it is released, it will probably be some time before I get around to installing it. When it does appear, I’m sure the interface will be changed up in some ways. I have heard, for example, that there will be a configuration wizard that will make configuration easier. While I hope that’s true, I have my doubts about it including a setup for North American free-to-air satellite channels. My guess is that we in North America will need to skip the wizard, and use the manual configuration as I will explain here. I hope I’m wrong about that; it would be great if this process were easier.

The installation instructions for installing Tvheadend under Ubuntu are here. You will need to choose a repository, and I suggest either the “stable” or “unstable” repositories. In the case of Tvheadend, “unstable” isn’t all that unstable, compared to what that means in some other software projects. Many people run the unstable version to get the latest software improvements, but that is entirely up to you. If you have very little familiarity with Linux, then it’s probably best to stick to the stable version. I am currently running the stable version (4.0.9) as I write this.

CONFIGURING TVHEADEND

There are many videos and web pages on configuring Tvheadend, and many of them will confuse you more than help you, especially if it’s your first exposure to Tvheadend. That is because they were either based on old versions of Tvheadend, which had a somewhat different interface, or because they assume that Tvheadend is running on an OpenElec or LibreElec system, which as mentioned above is not recommended. Or, they may have been intended for terrestrial TV viewers, which has a slightly different configuration, or for the European version of free-to-air satellite, which is different in many ways from what we have in North America (for a decent explanation of the differences, there is a Wikipedia article on Free-To-Air – just skip to the section on North America and read that entire section).

Setting up Tvheadend for the North American style of Free-To-Air satellite is in some ways similar to configuring it for over-the-air reception using an ATSC tuner, but there are some important differences. In most cases setup will be a lot more manual because you will need to enter in the details for each satellite and each transponder manually.

There are a couple of terms that Tvheadend uses that may confuse you during configuration. One is “Networks”, and the other is “Muxes”. These easiest way to think about these is as follows:

A “Network” in most cases will be associated with a single satellite, whether you have one or more LNB’s (or LNB outputs, in the case of dual or quad output LNB’s) receiving from that satellite. So for example, if you have two dishes and one is pointed at Galaxy 19 and the other at AMC 21, you would make two networks and call them “Galaxy 19” or “G19”, and “AMC 21” or just “A21”. The name is not important, so use something meaningful to you, and in most cases that will be the satellite name. You could also use positions, such as “97W” and “125W”. The point is, the word “Network” has nothing to do with what we think of as a television network, instead it is all the sources that have the same transponders available. So, if for some reason you have two dishes aimed at the same satellite and they could receive the same channels, those would be under the same “Network”. On the other hand, if you have a moveable dish, you could have several “Networks” associated with that dish. This will become more clear as we look at the configuration.

A “Mux”, when associated with free-to-air satellite, is the same thing as a transponder, which (if you’re not too nit-picky) is the same thing as a specific frequency allocation on a satellite. When a Mux is created and scanned, it should show all the active services (TV, radio, and data channels) available on the transponder, which will be on a specific frequency on the satellite. To use a specific example, as I write this, on AMC 21, Ku band, there is a transponder, or “Mux” in Tvheadend terminology, at 12180 V that contains several PBS channels. In that case, you can think of all the channels on the 12180 frequency as the “Mux”. When used in relation to terrestrial TV, a “Mux” is a single physical channel on a specific frequency, which may have several virtual channels. So whether on satellite or terrestrial TV, a “Mux” is a single frequency that may contain one or more TV and/or radio channels. In Europe things can get a bit more confusing, because they can duplicate transponders across multiple satellites, but we don’t see that here in North America.

I should also mention tuners. Generally speaking it is best to have one tuner input on your backend for each LNB output you have out on a dish. But if some satellites are infrequently viewed, it would be wasteful to dedicate a single tuner to the LNB associated with that satellite. Tvheadend does support the use of 4-input DiSEqC switches, at least with TBS tuner cards. As far as I can tell, even though Tvheadend supposedly supports them, either Tvheadend or the TBS cards, I’m not sure which, have some problem controlling 22kHz tone switches. I didn’t spend much time trying to make them work, since DiSEqC switches are relatively inexpensive.

If you have a card or cards with multiple tuners (for example, if you obtained a quad tuner card), then I would suggest using fixed rather than moveable dishes if your situation allows. While Tvheadend can in theory control a dish positioner motor, I’ve not yet seen it work in practice, and I’ve never personally attempted to do it. But feel free to try; if you can get it to work, please leave a comment and let us know what you had to do. The same goes for using any type of switch other than a standard 4-input DiSEqC switch. Remember that even if Tvheadend is capable of sending the correct signals to a switch, it is also up to the tuner card and its drivers to make sure the switching signal gets sent, so what works in one installation might not work in another if different tuner cards or drivers are used.

Note that you can buy LNB’s with dual (or, more rarely, quad) outputs. By hooking each output of a LNB to a separate tuner input (either directly or through a DiSEqC switch), you can watch or record shows from different transponders (or muxes, as Tvheadend calls them) on the same satellite at the same time. Note that you can watch or record as many simultaneous channels as you like from the same transponder (mux), because the LNB and tuner card can receive a full transponder stream, and Tvheadend breaks out the channels as necessary. It’s only when you want to watch or record from two different transponders (a.k.a. muxes, a.k.a. frequencies) on the same satellite that you’d need multiple LNB outputs connected to different tuner inputs.

The more dishes, LNB outputs, and tuner inputs you have available, the more likely it is that you’ll be able to avoid scheduling conflicts, where you want to watch or record a show, but no free tuner is available because all the tuners associated with that dish are already in use.

TVHEADEND’S WEB-BASED INTERFACE

Once Tvheadend is installed, you access its configuration pages via a web browser. The address will be port 9981 at the backend’s IP address, so if for example the backend is at 192.168.1.50 you’d use http://192.168.1.50:9981 in your browser’s address bar to access Tvheadend’s web interface. If Tvheadend is running on the same machine you’re using, then you can use http://127.0.0.1:9981 to access it.

You will see tabs across the top of the page, and the first place you will want to go is the Configuration tab. Click on that and it will expose a new row of tabs. You need to understand this about Tvheadend, it does not expose options until a previous selection indicates you need them. So if, right after installation, you were to try to discover where you configure a DiSEqC switch, you’ll never find it because you haven’t indicated to Tvheadend that you have a DiSEqC switch, therefore it will not show you that option.

In the second row of tabs, choose DVB Inputs. This will expose a third row, which is where most of the initial configuration will be done. First, choose the TV adapters tab. You should see a list of your available tuners. If you don’t, something is probably wrong – either your tuner card is not being detected by Linux, or you don’t have the correct drivers properly installed. You will need to resolve that before continuing on. Note that if you ever come here and the tuners have disappeared, it probably means you applied a Linux kernel update and forgot to rebuild the tuner card drivers. Just rebuild and reinstall the drivers, and all should be fine again (we hope).

Now go to the Networks tab. Create one network for each UNIQUE tuner input. In other words, if you have four satellite dishes and each has a single-output LNB and your are feeding all four LNB’s into discrete tuner inputs, then you will want to have four networks. If you have two satellite dishes and each has a dual-output LNB and you are feeding all four LNB outputs into discrete tuner inputs, you will only need two networks, because two of your tuners can receive duplicate programming. To possibly simplify this, if none of your satellite dishes are moveable (or if you always leave your moveable dishes parked on the same satellite) then you need to create one network for each satellite you can receive, and that’s probably a good rule to follow even if one or more of your dishes are moveable. Also, C and Ku band LNB’s should be on separate networks, and if you receive both the C and Ku bands from the same satellite, use different network names to reflect that (you could add “-C” or “-Ku” to the name).

To create a network, click the Add button, then in the window that appears select DVB-S Network in the dropdown (don’t worry if it’s DVB-S2, in this window DVB-S covers it).
Adding a DVB-S networkIn the next window that appears, give the network a name (again, I recommend you give it the name of the satellite, or the orbital position, whichever works for you, with the “-C or “-Ku” suffix if you receive both) and UNCHECK “Network Discovery”. Leave everything else at the default for now. Then click “Create”. Repeat as necessary for each unique tuner input/satellite you can receive.

Add a DVB-S networkYou may have noticed during the Network creation process that you could have selected a pre-defined mux. You could do that, but I don’t recommend it because pre-defined mux lists are often inaccurate, and sometimes don’t distinguish between C-band and Ku-band. So if you try to use those in North America, you will likely wind up with a list of outdated or inaccurate muxes and will wind up having to delete them manually. It’s your system; you can try the pre-defined mux setting if you like, but don’t say I didn’t warn you. You may also have noticed that you can select an orbital position, but you would only need to do that if you were going to try to control a moveable dish. For a fixed-position dish, it matters not whether you select anything there.

When you have configured your networks, go back to the TV adapters tab. This is where things get a little tricky. The first thing I will say is that you need to enable each tuner by checking the “Enabled” checkbox associated with each tuner as shown in the following screenshot, and also you need to click “Save” each time you make a configuration change (I can’t tell you how many times I have forgotten to click “Save”, and then wondered why something wasn’t working). Also, most configuration pages will have settings that don’t need to be changed, in which case leaving them at the defaults is fine.

At this point I’m going to quote from a previous article that covers this topic, but please note that the images are from a slightly older version of Tvheadend, so may not correspond exactly to what you’ll see. In some cases you’ll see additional options or settings, but this covers the ones you need to change:

There are a few things that North American users should be aware of. For one thing, Tvheadend assumes you’ll be using a Universal LNB, which is not something used all that often in this part of the world. Here, you are much more likely to be using a standard (Ku band) LNB, or even a C band LNB. But when you are setting up the TV adapters, you won’t find an option for those. The trick is that you need to select “Advanced” in the SatConfig dropdown, then save it, and then you will notice that in the left hand menu tree, additional options are exposed. This is how Tvheadend seems to work; it doesn’t show you options that are not applicable to your existing configuration, so as you make the configuration more complex, more options are exposed.

TV Adapters settingsSo once you have selected the Advanced setting and clicked Save, you can expand the tree view an additional level and click on Advanced, where you will select the number of orbital positions that each tuner has access to, which is 1 if you are connecting a tuner directly to an LNB. If you are connecting to a 4 port DiSEqC then it’s 4, as shown here:Orbital Postions settingAfter you save that, then you can configure settings for each of your orbital positions, including LNB type. In North America you will probably want to select either “C-band” or “Circular 10750”. You would use the latter for any standard Ku band LNB that has a LO Frequency of 10750 MHz, even if it’s not circularly polarized. Keep in mind that this type of software (or at least the satellite tuning portion) is much more widely used in Europe and other places outside North America, and they are much more likely to be using a circularly polarized LNB than we are here.

I’m going to interrupt my quoting here to note a few things. First, just to show how much some screens can change between versions, the above screenshot was from a 3.9 version of Tvheadend. By the time we got to version 4.0.9. that “Parameters” section on the right hand side had expanded to include many more options (mostly to support moveable dishes, or so it appears) but at this point you would likely still only need to set the number of orbital positions. After you get things working on a single satellite, then if you have a moveable dish you can come back and try to configure those settings: Baby steps, as the saying goes:

New Advanced ParametersAlso, when looking at the screenshot below, the setting for Ku in North America is now “Ku 10750” rather than “Circular 10750”. And, please note the “Name” and “Networks” dropdowns in the screenshot below. I find it easiest to use the satellite name in the Name field, and then select the network corresponding with the satellite that will be received by this tuner and switch combination. So in my configuration, which does not include any moveable dishes, the “Name” and “Networks” are always the same. However, if I were trying to control a moveable dish, I would likely select a “Name” associated with the dish (such as “C-Band moveable”) and then under “Networks” select all the networks (satellites) that dish is capable of receiving. Also for a moveable dish, I’d need to select a “Rotor Type”, which for most users would probably be “USALS”. Again, please bear in mind I have never tried to use a moveable dish with Tvheadend, so the parts about the moveable dish are just conjecture on my part. Continuing on with the quote…

Tvheadend Orbital Position Settings showing C-Band LNB and Generic switch type selectedIf you are using a standard DiSEqC and/or 22 kHz tone switch, then select “Generic” for the switch type. For a four port DiSEqC switch, you would use the “Committed” dropdown and select the port there. Tvheadend uses AA, AB, BA, BB port descriptors, which correspond to DiSEqC switch ports 1, 2, 3, and 4 respectively. I had no problem using a standard 4 port DiSEqC switch (well, except that it turned out that the brand new DiSEqC switch had a bad port 4, but that’s obviously not the fault of Tvheadend or the tuner). In the screenshot below, DiSEqC port 2 (AB) is selected. Settings for any types of switches you don’t have should just be left at the default settings.

Tvheadend Generic Switch Settings showing showing DiSEqC port 2 (AB) selectedOne other consideration for North America is that it is extremely rare for the free-to-air signals to include Electronic Program Guide data. Therefore, it would be a good idea to go to Configuration | Channel / EPG | EPG Grabber and in the Over-The-Air Grabbers section, uncheck all the grabber selections. None of those will work in North America anyway, so there’s no sense burning up CPU cycles checking for EPG data that will never appear. I will have a bit more to say about getting EPG data later in this article.

Disable the Over-The-Air GrabbersI have updated the above screenshot because in addition to disabling all the grabbers, you also want to make sure that the “Force initial EPG scan at startup” box is unchecked and that all the “Over-the-air Cron multi-line” entries are removed or commented out. It’s probably worth emphasizing that Tvheadend was designed primarily for use in other parts of the world, where commercial free-to-air services are available. We don’t have anything at all like that in North America, so there are many parts of the Tvheadend interface that simply aren’t applicable to us. An example is the “CAs” tab in the above screenshot; there is no reason to ever go into that tab here in North America.

After you get your tuner(s) configured and enabled, you will want to try creating a mux and scanning it. To do this, find a reference that shows available satellite channels, such as Sathint, or check in your favorite satellite forum. Let’s say you wanted to add the PBS channels on AMC-21. You could first go to Sathint’s North & South America page and select AMC-21. On that page you would find that the main PBS feeds are on 12180 V, that the symbol rate is 30000, that the FEC is 3/4 and if you mouse over the little arrow just to the right of “3/4” you will see that it is a DVB-S2, 8PSK signal.

Sathint exampleThis is the information you will need to create a mux. Note that both the frequency and the symbol rate in such listings are expressed in short form, in other words they should rightly read 12180000 and 30000000. Many receivers and software programs will accept the shorthand version, but Tvheadend does not.

So to create a mux, click the Muxes tab, then click the Add button. A window will pop up asking you to pick a network, in this case you’d pick AMC-21 or 125W, assuming you followed my advice to name the network after the satellite. After picking the network, you will then see the following window which should be filled in as shown here:
Sample MUX settingsYou want to check the “Enabled” box. Set the EPG Scan to “Disable” because North American channels do not contain EPG data, so why make all your hardware search continuously for something that will never be found? Set the Scan Status to PEND because you want it to scan the mux to find channels. Set the Delivery System to DVBS2 because it is a DVB-S2 mux. Set the Frequency to 12180000 and the Symbol Rate to 30000000; don’t forget the extra three zeroes at the end or it won’t work. The “Polarisation” (U.K./Canadian spelling there!) is Vertical, so pick V. The modulation is 8PSK, which Tvheadend presents as PSK/8 for some reason. The FEC is 3/4. The Rolloff can almost always be left set to AUTO. The other settings can be left at the defaults.

Try not to use AUTO for any setting other than Rolloff; Tvheadend is not very good at auto-detecting settings, particularly with 8PSK and higher signals. With QPSK signals it will often detect the FEC if you leave that set to AUTO, but if you know the FEC it’s always better to put it in. But, please be aware that data you find online isn’t always accurate; on a few occasions I’ve found channel listings containing incorrect FEC information.

Note: This guide was written using Tvheadend 4.0.9, but if you are setting up Tvheadend 4.2 or later there are some new checkboxes you need to know about, that you can only see if you are using the “Expert” view level.  The screenshot below shows an unconfigured mux, but does show the locations of the new checkboxes.  In North America you are probably going to need to check both of these.  If you don’t, some or all services on a mux may not scan in, or later on when you attempt to watch a channel on that mux, you may get “No input source available for subscription” errors or other errors.

UNCONFIGURED Add Mux screen showing new checkboxes in Tvheadend 4.2

When you click “Create” it should create the Mux and then if all goes well, a few seconds later it will start scanning the Mux to find channels. Watch the two columns labelled “Scan Status” and “Scan Result”, when the “Scan Status” returns to “IDLE” and the “Scan Result” is OK, that means it has successfully scanned the transponder. If it actually found any services (potential channels), the number found will be listed in the “# Services” column.

If, instead of OK, you see the word FAIL for the scan result, that means either the mux or the tuner were not configured properly, or the tuner didn’t detect any signal (or the signal strength was too low). Or it could be a timeout issue – if you are using a TBS card, see Tvheadend users, if your TBS card will not scan muxes to find channels, try this. Remember that satellite signals can come and go without any advance warning, and in particular remember that transponders that are active on weekdays sometimes are taken down on the weekends. If your first attempt to scan a mux is a failure, just try another. If you also have a satellite receiver, temporarily connect it to the dish and make sure the transponder you’re trying to receive is actually there.

Assuming the mux scanned correctly, go to the Services page and you should see the newly-scanned services. You might want to sort the list by Mux to find them easily, if other muxes have been previously scanned.
Example Services pageThere is one thing that is set by default that really should be changed in North America, but before I go into that I want to point out something in the above screenshot. Note at the lower right-hand corner of the screenshot there is a small button with two caret symbols (^) on it. If you click that, it will open a debugging window at the bottom of the screen that shows you what Tvheadend is doing in the background. For example, if you open that window before you scan a mux for channels, it will show you which tuner it’s using and other information that could possibly be useful in determining why a scan fails. If you open it while importing program guide data, it will show you statistics on what it’s imported and whether it encountered any problems. This can be quite useful when you are trying to diagnose a problem.

But getting back to the problem, in the Automatic Checking column in the above screenshot, note that it says “Auto Check Enabled”. What this means is that every so often, Tvheadend will check for the service presence, in other words, it will look to see if that service is still there. If it’s not found, this field will change to “Missing In PAT/SDT” and then you won’t be able to tune it in or watch it, because Tvheadend believes it no longer exists. The problem in North America is that services can disappear for a time, for any of several reasons. One is that some feed channels (channels that send feeds of smaller network or syndicated programs) often stop uplinking to their transponders on weekends, to save energy when nothing’s being transmitted. Another very common one, especially in Canada and the northern United States, is a huge snowstorm that dumps so much snow on the dish that reception is severely impeded. And, if you use a moveable dish, you will of course have no service from the satellites the dish isn’t pointed at. This type of check may make sense in sunny Spain, but not in North America. Fortunately this check can be disabled for any or all services, but unfortunately it’s a pain in the ass to do it because you have to do it for each individual service.

There are two ways to disable this check, and I will tell you about both of them because this is common to other parts of the Tvheadend interface. The first is to highlight a service and click Edit. A window will pop up and you can pick “Auto Check Disabled” from the dropdown. This is also how you can undo the “Missing in PAT/SDT” designation if it somehow gets set. Make the change and click Save, then repeat for each service that has Auto Check Enabled.
Setting Auto Check to DisabledThe second method is on the services page itself, you can click or double-click on the words “Auto Check Enabled” and a dropdown should appear right there, with the same options shown in the dropdown above. Select “Auto Check Disabled” and then (this is important) click SOMEWHERE ELSE in the window to make the dropdown disappear (this could be a double click on the next item you want to change). A small red triangle will appear next to the changed item; this means it is a pending change that has not yet been saved! You can work your way down the list of “Auto Check Enabled” services and change each to “Auto Check Disabled” but after the last item make sure you click somewhere else to make the dropdown go away and the small red triangle appear., Then, BEFORE YOU LEAVE THE PAGE, click the “Save” button (which is just above the “Play” column heading on the left hand side of the screen). The page should reload and all the red triangles should have disappeared. Only now are your changes saved! If you forget and leave the page before clicking Save, you get to make all the changes over again. I wish there were a way to make “Auto Check Disabled” the default, because I do not want Tvheadend making the decision that a service is no longer available and locking it out. In North America, that’s generally a really bad idea!

The two methods of making configuration changes that I have mentioned above work on several of the pages in Tvheadend, but you always have to remember to click Save before leaving or refreshing a window or page, otherwise your changes will be lost!

Once you have disabled all the Auto Checks, what you want to do next is map the valid services to Channels. You can always delete a channel you don’t want later, so if in doubt it doesn’t hurt to map it. Sometimes the Service ID numbers and/or the Service Names will give you some clue as to which are viewable channels, but if you like you can just try mapping all the services. Highlight the ones you want, in the same way you’d highlight files for copying in your computer’s file browser. When you have highlighted one or more services, the “Map All” button shown in the screenshot above will change to “Map Selected”. So when you have highlighted the ones you want, click on “Map Selected”, and you’ll then see a popup window that looks like this:

Map services optionsIn most cases you’ll simply click the Map button. Most of the other options would make more sense in other parts of the world, but will only cause problems if you use them in North America. The one exception to that is the “Include encrypted services” option. Once in a great while a satellite channel will be marked as encrypted when it really isn’t. If you see something that indicates you should be able to receive a channel, but it’s indicated as being Encrypted in the services list, you can try checking the “Include encrypted services” box to map the channel anyway.

To see the channels that have been successfully mapped, go to the Channel/EPG tab (in the second row of tabs) and select the Channels tab in the bottom row. You should see a list of all the channels that have been successfully mapped. You can highlight any channel and use the Delete button to delete any channel you don’t want (this does not delete the service in the services list, only the mapped channel) and you can use the Edit button to edit the data for channels. In most cases you will want to edit channels you plan to watch regularly. As was the case with changing the Auto Check settings in Services, there are two ways to do this, but probably the best way when you are first starting out is to highlight a channel and then press the Edit button. You will see a dialog box that looks something like this:

Edit channel windowBefore editing the channel, though, you may want to try actually viewing it using your frontend software. If you are using Kodi, you will need to enable and configure the Tvheadend PVR addon first. Go to this page and skip down to section 5, “Connecting Kodi to Tvheadend” and follow the instructions there. After you do that, go to the TV settings (System-Settings-TV) and in the General section make sure “Synchronise channel groups with backend(s)” and “Use channel order from backends” are selected (you will have to set the “Settings Level” to “Advanced” or “Expert” to check and, if necessary, change those options). If you have an older version of Kodi, you may have to go to the “Live TV” section and make sure it is enabled; but that no longer seems to be necessary in the latest versions of Kodi.

Once you have configured the PVR addon you can go to TV in Kodi’s main menu, and under Channels you should see your newly added channels. They may have strange names at this point, but you should try watching each, first to see if there is really a channel there, and second to try to determine which channel it is. Sometimes you will know from online listings which channels are which, but in other cases the only way to know is by watching for a while and looking for a channel identifier.

In the above image, we have shown the Edit channel dialog for PBS “HD01”, which you might determine is an eastern time zone feed for PBS. So for now, we can make the following edits to the channel. The most important at this point are the channel name and number.

The channel name should ideally be one that identifies the channel, in this case “PBS East” would be a good choice. The channel number should be any non-zero number; it will be used to order the channels in Kodi. The numbers do not have to be contiguous; it’s perfectly okay to group channels into blocks of numbers and leave some unused channel numbers in between, but you should try not to leave any enabled channel un-numbered or duplicate any channel numbers. Neither Tvheadend nor Kodi will complain if you do, but channels may not be in the order you expect if you do that.

The “EPG Source” field will be very important when you are setting up your program guide, but you probably aren’t ready to deal with that quite yet. You’ll most likely want to first get all your muxes and channels entered.

There is a field for a “User Icon”. There are two places you can store channel icons, one is in Tvheadend and the other is on the frontend systems where Kodi is being run. In my opinion it is better to store them on the frontend systems. I tried doing it in Tvheadend and had some weird issues as a result, such as Kodi freezing up when I attempted to exit the program. Such issues may or may not have been fixed in newer versions of Tvheadend and/or Kodi. In any case, you don’t need to add channel icons right now. When you are ready to do so, my suggestion is that you store them on the frontends running Kodi and then go to Kodi’s TV settings (System-Settings-TV) and in the Menu/OSD section, set the “Folder with channel icons” to the path where your channel icons are stored. But feel free to try doing it in Tvheadend if you like; if it works for you and doesn’t cause any problems then use that if you prefer.

In some places in Tvheadend you may see a reference to “picons” – these are small, generally low resolution channel icons that often appear blurry in Kodi. In Europe and other parts of the world people often download archives of picons that correspond to the channels available from their satellite provider. Kodi doesn’t care what size icon you use; if it is too small it will upscale it and it will look bad, whereas if it is too large Kodi will reduce it to fit and it will be very clear. Therefore, if you have a choice between a large icon or a small one, larger is often better (within reason – you don’t need one that fills half the screen on your computer’s display). Since we don’t have packages of “picons” corresponding to the channels available on North American C- and Ku-band satellite, and since I wouldn’t touch them if we did, I suggest you use your favorite search engine’s image search feature to find channel logos. You can also try LyngSat Logo, but be careful because some of their logos are too small to display clearly in parts of Kodi. Another thing to beware of is logos that don’t contrast well with Kodi’s dark background. If you have any experience with programs like Photoshop or The Gimp, you will probably find yourself wanting to modify a few logos slightly to make them look better in Kodi.

One additional point about storing the icons in Kodi is that they should be in PNG format, and should be named exactly the same as the channel name you gave the channel in the “Edit Channel” window. So for example, if you you have an icon for PBS East, it should be named PBS East.png. Yes, that means you will need to duplicate icons if you use the same icon for more than one channel (for example, even if you use the same icon for PBS East and PBS West, you’ll need two files, PBS East.png and PBS West.png). I would guess that icons in JPEG format (with a .jpg extension) might also work, but I have never tried it because I don’t care for JPEG artifacts.

Enough about icons. One other thing you may wish to do, which might help your frontend systems work a little easier, in in Tvheadend’s configuration select the Configuration tab on the top row of tabs, then the Stream tab on the second row, and the Stream Profiles tab on the third row. Then select the “pass” (MPEG-TS Pass-through) stream profile. Make sure all the checkboxes are checked next to these items:

  • Rewrite PMT:
  • Rewrite PAT:
  • Rewrite SDT:
  • Rewrite EIT:

The result should look something like this:

Pass-through stream profileThe reason for doing this is when you are streaming a channel to your frontend, with these boxes checked it will only send information about that specific channel, and not about all the channels in the MUX (if there is more than one). When information about multiple channels is sent, it might confuse your frontend, resulting in no video or audio. The only reason for not checking all these boxes would be if Tvheadend is running on a very underpowered system, which it probably isn’t if you followed my advice to use a desktop computer system when installing Tvheadend. It does take a little bit of CPU power to do these rewrites, but generally speaking, not enough that you’d ever notice.

SETTING UP THE ELECTRONIC PROGRAM GUIDE (EPG)

Once you have configured Tvheadend, and have added all your muxes and channels, you will probably want to have the EPG populated so you can schedule programs to record. In North America, there is a company that offers paid schedule listings, and occasionally some of their proponents stoop to implying that it is somehow illegal or immoral to get program listings for free. It is neither, as long as you are using them for your own personal use (disclaimer: I am not an attorney, and I am not giving you legal advice). No one has ever gotten in trouble for using free listings in Tvheadend, and I would be shocked beyond belief if anyone ever does. Honestly, it pisses me off when a company or their supporters attempt to imply that you are a bad person for not purchasing their product, when you know their only reason for saying that is because they want to make money.

At this writing the easiest way to get free EPG listings for the USA and Canada is to use a program called zap2xml. That link takes you to a page of instructions for setup and use under Windows or Linux, and download links. You will probably want to run the Linux version on your backend system. Some time back I created an article containing additional hints and instructions, titled Some hints for getting free-to-air satellite channels into the Electronic Program Guide in Kodi (or another frontend). That article was not my best work; it’s been edited a few times and I may completely rewrite it some day, but if you are having problems figuring out how to use zap2xml or how to get Tvheadend to use the generated listings, that article may give you the clues you need to make it work.

Some other guides out there may mention a program called mc2xml. This program used Microsoft’s listing service, and several months ago Microsoft made some changes that rendered mc2xml inoperable. At that time, many users switched to zap2xml. The only problem some users have with zap2xml is that it is a Perl script, and therefore your system must have Perl installed. Ubuntu includes Perl in its operating system. However, if you ignored my advice above and decided to use a machine with an ARM-based processor, or if you are running one of the distributions ending in -Elec rather than Ubuntu, you may find that Perl isn’t installed and there’s no way to install it, or that there is no way to run a Perl script. Or, you may find that the tv-grab-file script used by Tvheadend won’t run because you don’t have the Bash shell installed, which is another thing that’s installed with Ubuntu. Or, you might discover you have no way to set up a cron job to get your schedule data automatically in the middle of the night. It’s usually possible to work around these issues one way or another, with considerable effort, but if you are not running Ubuntu you will likely find that setting up the EPG is a much more difficult process.

SPECIFIC CHANNEL ISSUES

Occasionally you may want to tune in a channel that requires “special handling”. For example, one major U.S. provider uses six discrete audio channels to send 5.1 audio, and no standalone satellite receivers can decode it properly. But Tvheadend can, with a little coaxing. See the article, Fixing the audio on live TV from a certain network (which shall remain nameless) in Tvheadend for information.

Also, if you are using low-powered computers for your frontend systems, they may not be capable of playing back certain high-bitrate channels in real time. However, you can record shows from such channels, and play them back on equipment with more CPU power (such as your desktop computer), or you can convert the recording to a format that has lower CPU/GPU requirements for playback. Here’s an example of the latter approach: How to play video recorded from high-bitrate 4:2:2 sources on low-power systems

ADDING OVER-THE-AIR CHANNELS

If you have a TV Antenna, I will just mention two ways you can add over the air channels to your backend. One is to use a tuner card that picks up ATSC Channels (be sure it receives ATSC, and not DVB-T or some other format that’s not used in most of North America) such as a TBS6704 ATSC/Clear QAM Quad Tuner PCIe Card. That card’s tuners should appear in your tuner list, just like any other tuner.

Another option is to use a HDHomeRun device, such as a HDHomeRun Dual (model HDHR3-US or possibly the newer model HDHR4-2US, also known as the HDHomeRun CONNECT). These have two independent ATSC tuners, which can be fed from the same antenna using a splitter, or from two different antennas, which may be useful as explained in the next paragraph. However, buying a HDHomeRun can be confusing because there are several models, and not all of them will work for this application. Also, Silicon Dust (the makers of the HDHomeRun) are now trying to push users toward their DVR product, so I don’t know if newer models will work as well with Tvheadend. The HDHomeRun Dual connects to your antenna(s) and also to your local network via an Ethernet jack. It can therefore be placed near where the antenna’s cable enters the house, as long as there’s an Internet connection and a power source there, and after a reboot Tvheadend will probably just find it on the network and show it in its tuner list, assuming you are using a recent version of Tvheadend.

Note that if you search on the Internet you will find several older guides that will tell you that you need to install extra software, such as drivers, to use a HDHomeRun device with Tvheadend. That may have been true at one time, but it no longer appears to be necessary to install any additional software if you are using Ubuntu 14.04 and Tvheadend 4.0.9 or newer.

You only need to set up one ATSC network for over-the-air channels, unless you have multiple antennas pointing in different directions, feeding different tuner inputs. For example, if you are in between two major cities and receive strong signals from both, you could put up two TV antennas, each pointed at a different city’s transmitters, and feed each antenna into a different tuner input. You would then create two ATSC networks in Tvheadend, so that Tvheadend could select which antenna to use for the best reception on any channel.

ADDITIONAL TVHEADEND INFORMATION

If you keep in mind that much of the information out there regarding Tvheadend is geared toward users in the Eastern hemisphere, and that settings that are useful in other parts of the world don’t apply to us in North America, then you may find reading the official documentation for Tvheadend helpful. It will tell you about some features of the program that I haven’t covered here. Probably the best place to start is the Tvheadend Wiki and the Tvheadend User Guide.

AND THAT’S ALL, FOLKS… FOR NOW, ANYWAY.

Please leave a comment if you spot any errors or omissions, or have anything useful to add!

Tvheadend users, if your TBS card will not scan muxes to find channels, try this

If you have purchased a TBS tuner card and find that Tvheadend recognizes it, but it will not scan muxes that you have entered in Tvheadend, here is one thing to try. Go to the Configuration tab, then the DVB Inputs tab, and then the TV Adapters tab. Find the associated tuner (the one that should be utilized by the mux that won’t scan) in the left-hand list (you might have to expand the entries) – it will probably be listed as something like TurboSight TBS [model number] DVBS/S2 frontend : DVB-S #0 or something similar. Click on that line, and on the right hand side you should see a panel that looks like this:

TBS card Tvheadend scan failure fix

Note where the red text is – make a note of the original values in those fields (probably 0 in the “Skip Initial Bytes” field, and 18800 in the “Input Buffer (Bytes)” field unless you have changed them for some reason) and temporarily set them both to 0. Click save and then try scanning the mux again. Afterwards, don’t forget to change those fields back to their original values, otherwise you may have issues with recordings or watching Live TV.

I don’t know why some TBS cards (mostly newer ones, I think) need this adjustment in order to scan a mux, and why some (older?) ones do not. All I know is that without this temporary adjustment, Tvheadend is unable to scan a mux with some TBS card models. I don’t know whether a newer version of Tvheadend will fix this problem.

And in case you didn’t know, 0 may not be the optimum value for the “Skip Initial Bytes” field. See the article Getting bad satellite recordings in Tvheadend? Here’s a possible fix for more information.

Also, if you are using Tvheadend 4.2 or later, there are are some new checkboxes in the Add/Edit MUX screens that you need to know about, that you can only see if you are using the “Expert” view level.  The screenshot below shows an unconfigured mux, but does show the locations of the new checkboxes.  In North America you are probably going to need to check both of these.  If you don’t, some or all services on a mux may not scan in, or later on when you attempt to watch a channel on that mux, you may get “No input source available for subscription” errors or other errors.

UNCONFIGURED Add Mux screen showing new checkboxes in Tvheadend 4.2

Hints on receiving 16APSK signals using TVHeadEnd or similar PVR backend software

Every now and then you may see a report of a satellite transponder using 16APSK modulation, rather than more common and easier to receive formats such as QPSK or 8PSK, and you might wonder if you can receive it. If you use TVHeadEnd or similar backend software, you may have attempted to scan in a 16APSK transponder, with no success. So what is the secret to receiving such feeds? Here are some things you need to keep in mind.

First, not all satellite tuner cards can receive 16APSK signals, even if they were originally advertised with that capability. At least one manufacturer, TBS Technologies, offers both “consumer” grade and “professional” grade cards. The “professional” grade cards can cost nearly twice as much as the “consumer” grade ones, but if you really want to receive 16APSK signals, it appears that only the “professional” cards will do (disclaimer: Obviously I have not tested every “consumer” grade card out there; there may have been one or more made that really do receive 16APSK signals). I do not know the technical details of why certain cards will work and others will not, but if you have a “consumer” grade one, you might want to check the currently advertised specifications for it, and see if the manufacturer still claims it will support 16APSK.

Second, even if you have a tuner card capable of receiving 16APSK signals, some versions of TVHeadEnd may not be able to scan the transponder. In at least one case it was discovered that temporarily changing both the tuner’s “Skip Initial Bytes:” and “Input Buffer (Bytes):” settings to zero (0) allowed a successful scan of a transponder (don’t forget to change those values back to their original values after the scan is complete, otherwise you may have problems with live viewing and/or recordings). If a newer version of TVHeadEnd is available, you may want to consider upgrading, but backup your existing system first in case the upgrade causes new issues – that is a whole other subject.

Third, but only if you are a true Linux geek, you MIGHT want to consider trying the open source drivers mentioned in this thread on the TBS forum. This is not a requirement; the standard TBS drivers will work to receive 16APSK, and right now installing the open source drivers requires some Linux expertise.

Fourth, if you have multiple C-band dishes (lucky you), try a different one. 16APSK signals are difficult to receive – see my previous article, Two reasons a dish may pull in some available free-to-air signals but not others: The modulation and the FEC (Forward Error Correction) code rate. If you find that you can receive the 16APSK signals but have frequent video and/or audio glitches, you may need to tweak your dish settings. Setting up a C-band dish is something of an art in that not only does the dish need to be pointed directly at the satellite, but the LNB skew must be correct, the focal depth of the LNB must be set correctly, and the scaler ring and LNB must be the correct distance from the center of the dish and pointed exactly at the dish center. Oh, and the dish should be perfectly round and not bent out of shape. If any of these are off, you may lose a couple dB of signal strength or more, which might not be enough to impede your ability to receive QPSK or 8PSK signals, but could destroy your chances of receiving 16APSK signals reliably.

Another thing to keep in mind is that you stand almost zero chance of receiving 16APK signals reliably on anything smaller than a 10 foot dish. If you can find one, a 12 foot dish will probably work better than a 10 foot one, provided all the other adjustments are correct (it is pointed precisely at the satellite, the skew is set correctly, and so on). But if you have two or more 10 foot C-band dishes, it’s worth trying each of them to see which offers better reception. The advantage to having a larger dish is that it gives you more “wiggle room” in case some of your dish adjustments aren’t perfect.

Fifth, this may be one of those situations where a phase-locked loop (PLL) LNB really is a good idea – see Are phase-locked loop (PLL) LNB’s a good idea?. PLL LNB’s seem to work best on weaker signals, and these definitely qualify.

If all this seems like a lot of effort, keep in mind that there are very few 16APSK transponders in North America, and the ones that are up there tend to be transient – you never know when they will go away. Also, one reason that 16APSK is frequently used is to cram more channels onto a single transponder. It saves the uplinker money, but can mean that the available channels are low quality, with lots of compression artifacts. Nevertheless, I understand that some may wish to try to receive everything available, so hopefully the above will be helpful. If you have any other hints for receiving 16APSK signals, please feel free to leave a comment.

Minisatip: A possible way to extend the distance between a satellite dish and your TVHeadEnd (or other backend) server

One of the issues that satellite enthusiasts sometimes face is that you can’t always place a dish where you want to.  Sometimes you don’t have a clear line of sight to the satellite you want to receive from any location that is reasonably close to your backend.  You may have a large piece of property, or maybe you can make arrangements with a nearby relative or neighbor to put a dish on their property, but either way the problem is that the dish is far enough away from your satellite backend that it would require such a long length of coaxial cable that the signal would be severely attenuated.  If you can get a reliable network connection going between where the dish is and your backend, then there is another possible option.

Note that when I say “a reliable network connection” I mean something reasonably fast, and preferably something that does not involve using the commercial Internet, at least not if you have bandwidth caps in your area.  TV streams use a LOT of data so unless you are only watching an hour or two a week, you really don’t want to be sending that data over an internet connection with usage caps.  But if it’s on your own local network, you’d don’t have to worry about that.  There are several ways to extend the range of an Internet connection; if you own or control all the property between your backend server and the dish then I prefer running fiber optic cable. However, if the dish is nearby but someone else owns property in between your backend server and the dish, then you may need to rig up some type of wi-fi connection using directional antennas (I’ve never done this so I won’t comment further on that).

Either way you will either need to run the cable from the dish to a nearby building that has power, or you will need a small enclosure near the dish (could be mounted on the dish pole, I suppose) that is weatherproof and large enough to hold whatever equipment is used at that end, but you will still need power to run that equipment. If you do use an outdoor enclosure (or for that matter, if your equipment is in a building that’s not climate controlled), be aware that in summer it will bake without adequate ventilation, and in winter it could get too cold to operate properly, so take those things into account when selecting an enclosure.

But the question is, how do you send the signal from the dish back to the TVHeadEnd or other backend?  The probable answer, at least for now, is that you will need to have a computer near the dish that can hold a DVB-S2 tuner card, and on that you will need to install some version of Linux and then run Minisatip on it.  While you could also just put your backend computer at that location (in other words, you could just run TVHeadEnd or whatever you use as a backend on that computer), that might not be desirable for a number of reasons, particularly if that location isn’t climate-controlled.  And if perhaps you have a dish or two (or more) near your house, and one or two more out in the back 40 or up on the mountaintop, you’ll almost certainly want your main TVHeadEnd server inside your house. However you don’t want to have to run hundreds of feet of coaxial cable between your remote dish(es) and your server.  So rather than put your backend server out by the distant dish(es), you could try using a small computer and running Minisatip on it. Here’s the description of Minisatip:

Welcome to Minisatip

Minisatip is a multi-threaded satip server version 1.2 that runs under Linux and it was tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC and ISDB-T cards.

The protocol specification can be found at: satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf

It is very lightweight (designed for embedded systems with memory and processing constrains), does not need any additional libraries for basic functionality and can be used by existing satip clients like: Tvheadend, DVBViewer, vdr or Android/iOS applications. minisatip can act as a satip client as well in order to connect to satip servers from different networks.

The application is designed to stream the requested data to multiple clients (even with one dvb card) in the same time while opening different pids.

It is tested on x86_64, x86, ARM and MIPS platforms and it requires DVBAPI 5. Supported protocols are rtsp (both tcp and udp), HTTP (port 8080) and SSDP (as specified in the SAT>IP documentation). On top of that, it supports dvbapi protocol implemented by oscam (requires dvbcsa library) to decrypt channels using an official subscription and support dvbca protocol (requires dvben50221 library) for dvb cards with CA hardware. In order to enable/disable features, please edit the Makefile.

Please use https://toda.ro/forum/ for any questions.

Now the part about decrypting channels does not apply to us here in North America; that is for the lucky Europeans and people in other parts of the world that can subscribe to a service and get a conditional access (CA) card to plug into their tuner, if the tuner card has a card slot, so they can receive that service. The North American providers have never enabled this system, so we are pretty much out of luck here as far as getting subscription programming into TVHeadEnd. But there are still a lot of channels that are in the clear, no decryption needed, and this software should work perfectly well with that.

So what you would need to do is set up a small computer – it does not need to be a high-powered computer, in fact the Minisatip readme file quoted above indicates it will run on an ARM-based platform which means that it might even run on an inexpensive single-board computer such as a Raspberry Pi. Of course you cannot put a PCIe tuner card into a Raspberry Pi, so what you may wind up using is the most inexpensive setup you can find that will let you plug in a PCIe tuner card, unless you feel like trying your luck with a USB-connected external tuner. And you will also need a way to connect that computer to the network, which will depend on whether you are using a wireless or fiber network connection. So you will have one to four pieces of equipment close to the dish – the computer, the network connection device if the computer doesn’t have an adequate built-in network connection, optionally a USB-connected satellite tuner if the computer can’t accept a card, and perhaps an external directional wi-fi antenna to get the signal back to your backend location.

Then what happens is when you want to watch a channel from that satellite, your backend server (such as TVHeadEnd) connects to the Minisatip server. All that the Minisatip server does is tune in the requested stream and send it to your backend server. Your backend server still takes care of all PVR functions, as well as streaming the signals to clients such as Kodi. I suppose there is some way you could stream from Minisatip directly to Kodi, but then you would not have any PVR or EPG capabilities. In TVHeadEnd, I believe you would create your muxes using an “IPTV Network” rather than a “DVB-S Network” but in any event TVHeadEnd is supposed to have SAT>IP support.

I have not tried to set any of this up personally because I have no need to do this, and also I just found out about this software today, and it intrigued me. If there were no bandwidth caps on Internet usage I would be tempted to try this, but using a TV antenna and an ATSC tuner somewhere near a large city (if I owned property there, which I don’t). But as I noted, TV (especially the HDTV variety) can eat up bandwidth VERY quickly; I have seen a one hour program from a satellite feed consume around 17GB of data on my hard drive, so without some way to significantly reduce the size of those streams (using some form of compression) you would not want to be sending them over the Internet if there are bandwidth caps at either end. But if it’s on your own local network, you can use as much bandwidth as your equipment allows, without worrying about your ISP’s bandwidth caps.

I’m only throwing this out there for those who have a need for something like this and aren’t afraid to experiment. What I would really like to see someday is the rough equivalent of a HDHomeRun device, but for satellite TV rather than terrestrial TV. It would connect directly to a DVB-S2 LNB, and convert those signals to data as close to the dish as possible. But until someone builds such a thing and offers it at a reasonable price, this would be the closest substitute I can conceive of.

How to add NOAA weather radio (or another streaming radio station) as a radio channel in TVHeadEnd

I confess, this has nothing to do with Satellite TV, but there are times when you may be watching recorded TV or even a saved video on your HTPC and the weather outside starts to have ominous rumblings.  Wouldn’t you like to be able to quickly tune to your local NOAA weather radio station to hear the current forecast and any weather alerts?  I realize most of you will tune to a local TV station or grab your phone to check the weather, but there are satellite TV viewers in parts of the country that lose all local TV reception in severe weather.  So as long as your Internet connection stays up, and assuming there is a stream covering your area, you can do a quick check just by tuning to the NOAA weather radio station.

Of course you should not rely on this as your sole way of getting weather information, since it could unexpectedly go down for a number of reasons.  But another reason for publishing this was to show the basic method of setting up a radio station in TVHeadEnd that originates from a streaming source.  Once set up in this manner, you can listen to it live or even record it using TVHeadEnd’s Digital Video Recorder (Time Schedules).

First, if you have not already created an IPTV Network, see my previous article, Fixing the audio on live TV from a certain network (which shall remain nameless) in TVHeadend and generally follow the process shown there, up to the point where it shows the pipe URL usage. In this case, the pipe command you will want to use should look something like this:

pipe://ffmpeg -loglevel fatal -i http://ADDRESS_OF_STREAM -vn -acodec aac -flags +global_header -strict -2 -metadata service_provider=RADIOPROVIDER -metadata service_name=RADIONAME -f mpegts -mpegts_service_type digital_radio pipe:1

Replace http://ADDRESS_OF_STREAM with the URL to your NOAA weather radio stream. You can go to this Weather Underground page and if a city in your area is on the list of available stations, right click on the mp3 URL link for that city and copy the link. So for example, if you are in Los Angeles, the address would be http://audioplayer.wunderground.com/wb6ypf/Altadena.mp3 (as of the date when this article was written – note these links could change over time!).

Optionally, replace RADIOPROVIDER with something meaningful, like NOAA or Weather_Underground. Do not use spaces or punctuation (underscores in place of spaces are okay).

Replace RADIONAME with a meaningful name, like NOAA_Weather_Radio. Again, do not use spaces or punctuation.

Also in the Add Mux screen, make sure the Scan Status is set to PEND and that EPG Scan is disabled. Also it is important that you fill in the Mux Name field with something meaningful, since this will be the default channel name.  Click the Create button and it should find the stream and add it to the Services tab, and from there you can map it to a channel. It seems that with these streams mapping the channel in the normal manner does work.

Here is how the MUX configuration screen should appear after it’s been created and scanned (the Scan Status here shows IDLE, but when first created you’d use PEND):

NOAA Weather Stream Configuration

I won’t guarantee this will work with all audio streams you encounter on the Internet, but it’s always worth a try. In particular, I don’t know how it would work with stream URLs that do not start with http://. But at least this will get you started. If you have a “recipe” for another specific type of stream, please feel free to leave it in the comments.

EDIT: If you are using Tvheadend 4.3 or newer and you get an error such as “iptv: libav: Could not open input ‘pipe:///usr/bin/ffmpeg … (blah, blah) … ‘: Protocol not found”, you probably need to uncheck the box “Use A/V Library” in the IPTV network settings, and/or select “Do not use” in the dropdown for the “Use A/V Library” setting in your Mux settings – see this thread in the Tvheadend forum for details.

You may also be wondering if it’s possible to build a TV channel from an online streaming video source. Well of course it is possible, I just don’t know the “formula” for the pipe command at this time. Credit goes to this thread on the Kodi forum and user kaiseruk for providing the basic format of the pipe URL shown above.