I have compiled the program on Linux and am extremely happy with it! If you are familiar with tvheadend already then you know that it is capable of automatically scanning your channels, retrieving the psip data transmitted over-the-air, comparing that data against a regular expression and recording the tv shows with little intervention. You can use it with just an antenna like me or use more epg grabbers in conjunction for cable, satellite, etc... It works really well and is easy to install with the instructions that I have supplied.
The file(s) that you download is a complete tvheadend version. According to the programmer of this version Lauri Mylläri, the version of tvheadend supplied with the atsc_epg plugin must be used until it is merged with the mainstream tvheadend currently in development. You must compile the atsc_epg plugin in order to use its functionality, you cannot add the plugin to another tvheadend version.
Here are the steps to compile it:
WHERE IS THE CODE:
: There are three methods of acquiring the code. Beginners might like the method of downloading the zip file using the browser. If you are using a Raspberry Pi you would want to use the direct download link to keep the links within it intact. You can also use "git" to download it. These are the atsc-epg capable versions now available.
: The original version by Lauri Mylläri which seems to be reliable.
The browser version is found at
https://github.com/laurimyllari/tvheadend/tree/atsc-epg
The direct download zip link is found at
https://github.com/laurimyllari/tvheadend/archive/atsc-epg.zip
The git version is found at
https://github.com/laurimyllari/tvheadend.git. The branch is atsc-epg
: The version derived from the master branch by Daniel Ziemba but I have had this crash a few times.
The browser version is found at
https://github.com/zman0900/tvheadend/tree/atsc-epg
The direct download zip link is found at
https://github.com/zman0900/tvheadend/archive/atsc-epg.zip
The git version is found at
https://github.com/zman0900/tvheadend.git. The branch is atsc-epg
: The updated version (4.0) by Lauri Mylläri and I am still undecided as to it's reliability.
The browser version is found at
https://github.com/laurimyllari/tvheadend/tree/4.0-atsc-epg
The direct download zip link is found at
https://github.com/laurimyllari/tvheadend/archive/4.0-atsc-epg.zip
The git version is found at https://github.com/laurimyllari/tvheadend.git. The branch is 4.0-atsc-epg
GETTING THE CODE:
: To download using the browser just navigate to the address above and click the "Download ZIP" button located on the page.
: To download the zip file directly run the command "wget <path_to_zip_shown_above>" after you change directory to where you want the file. If you are a Raspberry Pi user you will want to do this. It is imperative that you unzip the file using the RPi so the links to the files will remain intact. All too often, people unzip it on something else and then move the files to the RPi which may ultimately fail. Example "wget
https://github.com/laurimyllari/tvheadend/archive/4.0-atsc-epg.zip".
: To clone the repository using git. You need git installed. Run "sudo apt-get install git" to install it. Then change directory to where you want the file. Then run "git clone <path_to_repository_shown_above> branch <name_of_branch>". Raspberry Pi users will find this method easy also. There is no chance of messing up the links within the repository by unzipping it as long as you download it using the Rpi. Example "git clone https://github.com/laurimyllari/tvheadend.git branch 4.0-atsc-epg".
PREPARING THE CODE:
: If you have downloaded the zip file using the browser or directly using wget, the contents of the file need to be extracted to the location where you want the tvheadend build to reside. You can do this by:
Changing directory to where you placed the zip file. "cd <path_to_zip_file>".
Run "unzip <name_of_file>" if you wish to unzip it to the same directory. Example: "unzip atsc-epg.zip".
Run "unzip <name_of_file> -d <directory_to_unzip_to>". Example "unzip atsc-epg.zip -d ./programs".
WARNING: If you are upgrading to a newer major version, then it is a good idea to start with a new configuration. What I suggest is making a backup of your existing tvheadend configuration and letting the new version create its own configuration. That will of course mean you need to reprogram everything. If you don't like it, you can revert to the old version and your backup can be reinstated. That is a good idea for any program as the configuration may no longer be compatible across major versions of the software. Both of the updated versions by Lauri Mylläri and Daniel Ziemba are major version changes. I have used the old configuration when I installed these and have had problems. I reverted back to the original version using the same configuration and have still had problems. That is why you should start with a clean configuration.
COMPILING:
: You must have a compiler installed on your system. For a debian based OS, the command "sudo apt-get install build-essential" will install the compiler you need. Thanks to Mark Clarkstone for this info.
: There are other packages that need to be installed on your system. Run "sudo apt-get install pkg-config libssl-dev dvb-tools libdvbv5-0 liburiparser-dev liburiparser1 libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev" to install these. Thanks to Lee C. and Ted Correll for this.
: Place the downloaded code somewhere on your filesystem. The filesystem must have executable permissions. Your home directory is good for this.
: Run the command "cd <path_to_code>/tvheadend/branches/<name_of_branch>" which will change the directory to your downloaded source code.
: Run the command "./configure". This will check to make sure that all of the dependencies you need to run the program are available. If not, install them. Now I got a successful install even though "libiconv" and "libhdhomerun" was not installed. If you have an hdhomerun adapter, then that driver must be installed.
: You may run into a problem where the compiler complains about ffmpeg being the wrong version. In this case you need to use the "--enable-libffmpeg_static" switch on the command line. For instance, "configure --enable-libffmpeg_static" will install the version of ffmpeg shipped with the tvheadend program. The command "configure --help" will show you a list of usage options to compile the program.
: Run the command "make". This does the actual compiling.
: Run the command "sudo make install" which will install the program on your computer.
: If you want to uninstall it, run the command "sudo make uninstall" just like you ran "sudo make install". If you want to reinstall it, run "make clean" to clean up your build environment before re-compiling.
RUNNING:
: Running the program is easy. Run the command "tvheadend --firstrun". The firstrun option is needed only on the first run so you can create a username and password.
: Open up your favorite browser and navigate to the "http://localhost:9981/" url. Enter your username and password.
AUTOSTART:
: Jim DiCarlo says if you want it to auto launch at start up, just edit the rc.local file and add this line "sudo tvheadend -C &" before the "exit" line.
CONFIGURATION:
: Navigate to the "Configuration::DVB Inputs::TV Adapters" page and configure your adapter cards.
: Navigate to the "Configuration::DVB Inputs::Networks" page and add a new network. I named mine "antenna" and selected the correct mux.
: Once you do that, tvheadend should automatically start scanning channels after a few minutes.
: When the channels have scanned, navigate to the "Configuration::DVB Inputs::Services" page and click on the "Map All" button to map your channels. You may want to disable some channels before doing that.
: Navigate to the "Configuration::Channel/EPG::EPG Grabber" page, then to the "Over-the-air Grabbers" section and select the PSIP ATSC grabber.
: The "Over-the-air Cron multi-line" section is where you configure the times to update the epg data.
You should be ready to go now, over time you can select what programs to record, alter its behavior by changing the priorities of the programs so one is more important than another, and so on.
POSSIBLE PROBLEMS:
: During the "configure" stage you may see output saying that "mmx" and "sse2" have failed. These are features of your computer. For instance, an Rpi does not have these. Just ignore these as they are not necessary. Also "libiconv" is not necessary. If you are not using an hdhomerun adapter, then "libhdhomerun" is not needed.
: You need a filesystem that is symlink capable. The tvheadend program contains symbolic links so you must use a symlink aware extractor or the program may not work. You must also make sure the extractor is configured to extract the file keeping the symlinks intact. Normally not a problem if you are using Linux.
: You get an error like "[ ERROR] webui: failed to open src/webui/static/extjs/examples/ux/gridfilters". The "gridfilters" directory is actually a symbolic link to another directory. This is done so the gridfilters do not have to be duplicated in several places.
: You get an error like "cp: cannot overwrite non-directory '/usr/local/share/tvheadend/src/webui/static/extjs/examples/ux/gridfilters' with directory such and such. This error happens when you have a file installed where you should have a directory. One good reason to "sudo make uninstall" before reinstalling.
GOOD PRACTICES:
: If you have a tvheadend package installed on your computer, uninstall it using your favorite package manager before installing the compiled version. Don't want any conflicts creeping up.
: Run the command "make uninstall" before re-compiling or switching to the packaged version.
: Run the command "make clean" before re-compiling.
: Donate to tvheadend and the writer of this plugin.
: For questions not related to the atsc_epg plugin or the version of tvheadend required to run it, use the mainstream tvheadend forums.
: Keep the clutter a low as possible on the forum.
I will try to update this tutorial when needed.
Thanks to all you responsible for making this happen!