Linux users: Missed your favorite show? There may still be a way to view it, without annoyances

One of the nice things about free-to-air satellite is that if you try to record the eastern time zone feed of a show and the recording is no good for some reason, you can often find a later time zone feed to watch or record. However, if a channel suddenly “goes dark” with no warning, or if you don’t realize your recording is bad until after any refeeds have already aired, what can you do then?

Many networks put their shows online, on their web sites, so obviously that would be the first place to check. The problem with that is that many of those sites are a pain in the posterior to use. In some cases you have to have a cable company or commercial satellite provider login in order to watch a show, and in any case the stream will most likely be interrupted by annoyances (commercials, and promos for other shows). And, it may require that you have Adobe Flash installed on your system, and fewer systems come with Flash these days because Flash is a dying technology (none too soon, in my opinion). Over a year ago, Adobe itself started telling people to stop using Flash, but apparently many online video sources haven’t heard the message yet. You can still install Flash, but why would you want to? And I don’t know about you, but I find watching a show in a Web browser a less than spectacular experience.

But if you have access to a Linux-based system, there may be a way to avoid many of the annoyances. I will refer you to this article, which tells you how to install a program that will let you download videos from YouTube “and few more similar sites”, but don’t let the word “few” fool you. I am not going to expound on how understated that statement is. What I will say is this, install the program on your favorite Linux-based system (using the instructions in that article, preferably using the curl or wget methods, since you can then use the program’s -U option for updates), and then run it with the --help option and actually read the output. Many of the options won’t make much sense to you at first, but you may see a few that are rather enlightening. If you find a section that makes you think “Wait a minute, it can do that?”, well yes, it probably can.

So here is the procedure to get a missed show. Open up the web page for the network of the show you missed, and if they have a specific link for “full episodes” or something similar, follow that. When you find the thumbnail or link to the episode you missed, right-click on it and copy the link location.

Now run the program, giving that link as the final option on the line. More than likely it will give you one of several responses. If you are lucky, after a small delay it will start downloading the show. When it is finished, you can move the downloaded file to your Videos directory and watch it using whatever software you normally use to watch TV shows (such as Kodi, Plex, or VLC). This is just like watching it in your web browser, except you now also have the option to watch it on your TV. Actually, some would consider it a better experience (often better audio and video quality, and fewer “annoyances”).

If you are not lucky, it will either complain that something about the link isn’t valid, or that it needs you to install additional software, or it will tell you that the video can’t be accessed without a supported provider login. In the latter case, if you do not have a provider login you are out of luck. If you have a provider login (maybe you are visiting your rich uncle that still subscribes to cable, and he’ll let you use his login and password while you’re visiting), again, use the --help option and read everything (particularly the “Authentication Options” section, and the section below it).

If something about the link isn’t valid, it may be that you didn’t copy the correct link from the page, or in rare cases you may need to view the page’s source code to try to find the correct link, which admittedly can be a challenge if you don’t know how to do that. Also, it could be that the site you are trying to access is unsupported. There is support for quite a few sites built in, but not for every single video site out there. The source code for the program is freely available, and it’s written in Python, so if you are a Python programmer maybe you could modify the software to support a particular site of interest.

If it complains that you don’t have ffmpeg or avconf installed, I suggest you install ffmpeg, since it works better with this program. Probably the easiest way to install ffmpeg is to use the FFmpeg Static Build that is appropriate for your operating system and CPU type. Copy the program files (ffmpeg, ffmpeg-10bit, ffprobe, ffserver, and qt-faststart) from the archive into a subdirectory that’s in your system path (/usr/local/sbin is a good choice on most systems), and make them executable. Then try running ffmpeg --help from the Linux command prompt, and if you get the message “Illegal instruction” then you probably installed the wrong version for your system (particularly if it’s running on a Raspberry Pi – on some models you apparently need to use the armel build, and on others the armhf build). If you downloaded the wrong one, just delete the ffmpeg files from wherever you copied them, and start over with the other build.

If, when running the main program it appears as if it is going to work, but then fails with an error message similar to “Failed to resolve hostname” and indicates that the error came from ffmpeg, you probably need to install nscd (the readme.txt file in the FFmpeg static build archive notes that “A limitation of statically linking glibc is the loss of DNS resolution. Installing nscd through your package manager will fix this…”). To do that under Debian, Raspbian, Ubuntu, or similar distributions just do

sudo apt-get install nscd

If you are a Linux command line hater, and are running Ubuntu 16.04 or newer, this article explains how you can install a front-end GUI for the program.

When running the program, if you use one of the subtitle downloading options such as --all-subs, the subtitles will be downloaded in a separate file. In Kodi, if the subtitles file has a .srt extension and the exact same name as the video file except for the extension, Kodi will find and use it. Unfortunately, the subtitles obtained by this program are often in a different format that Kodi doesn’t understand (most I have seen have a .tt extension). You can convert most other subtitle formats to .srt files using a python script named pycaption. Download it and install it using the included install.sh script. The usage is:

pycaption original_subtitles_file.ext --srt > converted_subtitles_file.srt

An alternative PHP script that will download video from a few sites not supported by the program mentioned above is described on this page. However, that script is a bit more difficult to use, especially the first time.

Failing all of that, many show pages will provide links to places where you can buy an individual episode, often for a fairly low price. But if you are like me, it really burns you to pay for an episode that you would have been able to watch for free if the PVR software had worked correctly, or if a stupid local broadcaster hadn’t decided to pre-empt the network show you really wanted to see in favor of some crappy locally-produced content. So, I do tend to like to have alternatives, just in case something happens that causes my PVR software to not record a show. Also, if you subscribe to Netflix, Hulu, or a similar service, don’t forget to check them, since they may have the show you missed.

Now, someone is probably going to ask whether the software mentioned in the linked article is legal. Well, here is the thing, I am not a lawyer, and the laws vary throughout countries in North America. What might be unquestionably legal in one jurisdiction might be illegal in another. This is content that is made available on web sites, and if you just watch the show and delete the file afterwards then you are essentially doing more or less the same thing a browser does, just in a more manual manner, but that may or may not matter as far as the law is concerned. Or to put it another way, this software does exactly what a PVR does, except for some web-based content rather than over-the-air TV. But to repeat – I am not a lawyer, so if this is something that concerns you, you should ask your lawyer. Just be aware that the use of this software may or may not be legal where you live, and I assume no responsibility whatsoever if you choose to use it without bothering to verify whether it’s legal to use where you live. That said, it is NOT peer-to-peer software, so the likelihood that you will get in any trouble for using it is probably rather small.

One other thing you need to be aware of is that many videos are huge – some may be multiple gigabytes, which if you have a usage cap on your ISP connection could be bad news for you (although, keep in mind that you are probably downloading fewer “annoyances” than if you watched it in your web browser, so there’s that). Be aware of the size of the files you are watching! Don’t go hog wild and pull in everything you can think of (this also applies to video you watch in your web browser, by the way – quite a bit of it is more data-intensive than you think, particularly if it’s HD content). It’s always better to record a show direct from a satellite or over-the-air channel when possible, because those shows will not impact your ISP usage cap. Software like this should be used only as a last resort, when other options aren’t available.

And, one drawback of this type of software is that, as far as I am aware, there is no way to schedule shows in advance and have new episodes downloaded automatically when they appear. I am sure that the programmers in the crowd could probably write some kind of script for a specific channel that would find the link for the most recent show on a page and download it, if it’s not been previously downloaded, but that’s not something that’s built into this software.

Advertisements

One thought on “Linux users: Missed your favorite show? There may still be a way to view it, without annoyances

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s