Project

General

Profile

ATSC EPG - Possible Implementation Strategy?

Added by J.J. Smith almost 12 years ago

TVHeadend has made a lot of exciting progress recently, but developers have (pragmatically) focused on their local broadcast standards. For TVHeadend to become more useful for North Americans, it really needs an OTA ATSC EPG parser, even if it's only for Now/Next data. I don't know how to code, but I'd like to help as much as I can to move things along.

There are a few open source programs already developed that may serve as a plug-in or jumping off point:
1) DVBStreamer...............................(http://wiki.gentoo.org/wiki/TV_Tuner#EPG_Guide_Data - Method 1)
2) ATSC_EPG...................................(http://wiki.gentoo.org/wiki/TV_Tuner#EPG_Guide_Data - Method 2)
3) VDR ATSC_EPG............................(http://www.fepg.org/atscepg/download/ - maybe equivalent to program #2?)

The relevant ATSC EPG standards are:
1) EPG Transmission Protocol.........(http://www.atsc.org/cms/standards/a_65-2009.pdf)
2) EPG XML Schema........................(http://www.atsc.org/cms/standards/a_76b.pdf)

I realize most of the developers are European, already have their plates full and don't have access to ATSC broadcasts, but using us as proxies may work. Would it help to ssh into a North American user's back-end...if it could safely be done?

Any feedback on the feasibility of all this would be appreciated. :)


Replies (78)

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

Brian: This is the full version of tvheadend with the atsc-epg plugin. Currently it has to be done this way as the plugin has not been merged with tvheadend yet. It is still an experimental plugin. I compiled it on Ubuntu Linux using a terminal. I have never compiled anything remotely or have used windows for over a decade so I can't help you there.

Lee: My advice to you is to see if tvheadend is running. Try running "top | grep tvheadend". The command "top" allows you to see the running processes, "|" is a pipe which pipes the output to what follows it which is "grep tvheadend", a filter to only show the tvheadend process if it is running. If there is no output then tvheadend is not running. The errors on the console might be a file permissions problem. I noticed that you ran "./configure" and "make" with a sudo prefix. That may cause the problem. Rebuild but only prefix "make install" with sudo. You said that you got an error 500 which means "Internal Server Error: The server failed to fulfil an apparently valid request. A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.". This is most likely caused by an invalid url. If you ran the url "http://localhost:9981" and that does not work than maybe your system is not aware of localhost. Try "http://127.0.0.1:9981" and see if that works. If you are accessing that remotely you probably need to use your internet address, I don't have a clue. I would re-compile using "./configure", "make", and "make install" before anything else, it's your call. You can also post the output of "./configure" and "make" during the compile phase, and "tvheadend --firstrun" after it is compiled. You can pipe the terminal output to a file using "make > make.log 2>&1".

Good luck,
Steve

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

Steve, it's been running good with the OTA EPG data, just a few questions.

I had a hard time getting the custom build running as a service, do you have a working script that I can install that would work correctly?

Also, I really need to schedule tvheadend to grab data at certain times of the day, what is the best way to do this?

Thanks

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

Sounds like a bad compile, make sure that you are not getting any errors before compiling / installing because when done correctly, it works great

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

Brian Hanfgarn wrote:

Still can't get this version to work. When I start it it looks like it starts scanning for channels, and the webui comes up blank. Where did Jim Dicarlo go? CLaims he got it working with OSMC. Is there a better place in this forum to post this?

I am not sure of why the webui comes up blank or I would have tried to help. I have been successful installing this version on both OSMC and Xbian, I personally like Xbian better, but that is my preference.

Just a comment, I never used or configured this with silicondust HDhomerun option, so I cannot help anyone with that option.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Brian Hanfgarn over 9 years ago

What i mean by blank is, when I type in ip to login. It acts like it's loading the icon shows up in the browser tab but none of the ui loads just white page, nothing. But the text below shows up in command line.

2015-05-03 21:06:52.011 [ INFO] AVAHI: Service 'Tvheadend' successfully establ ished.
2015-05-03 22:00:54.021 [ ERROR] webui: failed to open src/webui/static/extjs/a dapter/ext/ext-base.js
2015-05-03 22:00:54.027 [ ERROR] HTTP: 192.168.1.118: /static/extjs/adapter/ext /ext-base.js -- 500
2015-05-03 22:00:54.062 [ ERROR] webui: failed to open src/webui/static/extjs/r esources/css/ext-all-notheme.css
2015-05-03 22:00:54.063 [ ERROR] HTTP: 192.168.1.118: /static/extjs/resources/c ss/ext-all-notheme.css -- 500
2015-05-03 22:00:54.095 [ ERROR] webui: failed to open src/webui/static/extjs/r esources/css/xtheme-blue.css
2015-05-03 22:00:54.096 [ ERROR] HTTP: 192.168.1.118: /static/extjs/resources/c ss/xtheme-blue.css -- 500
2015-05-03 22:00:54.137 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/css/GridFilters.css
2015-05-03 22:00:54.137 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/css/GridFilters.css -- 500
2015-05-03 22:00:54.215 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/css/RangeMenu.css
2015-05-03 22:00:54.219 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/css/RangeMenu.css -- 500
2015-05-03 22:00:54.831 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/GridFilters.js
2015-05-03 22:00:54.831 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/GridFilters.js -- 500
2015-05-03 22:00:54.841 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/Filter.js
2015-05-03 22:00:54.843 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/Filter.js -- 500
2015-05-03 22:00:54.854 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/BooleanFilter.js
2015-05-03 22:00:54.855 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/BooleanFilter.js -- 500
2015-05-03 22:00:54.862 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/DateFilter.js
2015-05-03 22:00:54.868 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/DateFilter.js -- 500
2015-05-03 22:00:54.922 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/ListFilter.js
2015-05-03 22:00:54.926 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/ListFilter.js -- 500
2015-05-03 22:00:54.933 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/NumericFilter.js
2015-05-03 22:00:54.934 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/NumericFilter.js -- 500
2015-05-03 22:00:54.941 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/filter/StringFilter.js
2015-05-03 22:00:54.942 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/filter/StringFilter.js -- 500
2015-05-03 22:00:54.949 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/menu/ListMenu.js
2015-05-03 22:00:54.950 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/menu/ListMenu.js -- 500
2015-05-03 22:00:54.963 [ ERROR] webui: failed to open src/webui/static/extjs/e xamples/ux/gridfilters/menu/RangeMenu.js
2015-05-03 22:00:54.964 [ ERROR] HTTP: 192.168.1.118: /static/extjs/examples/ux /gridfilters/menu/RangeMenu.js -- 500

Jim DiCarlo do you remember exactly how you installed it? Do I have to install in a certain directory, is there any permissions I have to change?

P.S. tried to install again, and now I get connected to XBMC below the above error text, so guessing that from the other install, so it looks like the webui is the only thing broke.

2015-05-05 20:53:50.970 [ INFO] htsp: Got connection from 127.0.0.1
2015-05-05 20:53:51.019 [ INFO] htsp: 127.0.0.1: Welcomed client software: XBMC Media Center (HTSPv8)

Also browsing directories with WinSCP I don't see src/webui or /static/extjs/ as directories Does that mean they were never installed?

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

Not sure what is happening, seems to be a corrupt build. I see that you are doing this in windows, I DONT DO WINDOWS unless you put a gun to my head. Not sure if it matters but I am doing my build ssh to my my RPI2 while using Linux Mint 17.1.

One problem I had when I was compiling on Xbian and kept on getting errors so I used the Autobuild option which I believe I found in this link: https://tvheadend.org/boards/4/topics/13635 (not that you can run transcoding with the RPI2, so dont try the transcoding options even though it will allow you to do it)

Hope this can help you.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

Just a thought. Have you tried copying the files over? Try the command "sudo cp -Rpnv <path_to_extracted_zip_file>/branches/atsc-epg/vendor/ext-3.4.1/examples/ux/gridfilters /usr/local/share/tvheadend/src/webui/static/extjs/examples/ux" where cp means copy, R means recursive, n means do not overwrite existing files, v means show what is happening. The command "man copy" will pull up a manual on the copy command. If you look at the source code, you will notice that the "gridfilters" subdirectory is a link instead of a hard subdirectory. Wonder if your system is having trouble with links. If your installation isn't in "/usr/local" then it may be in "/usr". There are others like "/opt", etc... One more thing, if you also have a tvheadend package installed from your package manager, uninstall it as I have seen some screwy things happen when you install a compiled program when a package was already installed. If this fails, and yes it sucks, use a different OS or possible an OS that is a different version. It's just supposed to work. Hmmm, do you have java installed? I would check that if I were you. I would also check if it's working. If you notice the affected files are all javascript components. These might not have been installed if java was not detected. You said that the mainstream version of tvheadend works. If that is true, then it is not a java problem. Try copying the files first. There may be more files you need to copy too. I think it has to do with the subdirectories that weren't copied during installation are links and not hard. Not much of a linux installation if it can't handle links though. I have nothing more to offer.

P.S. Those files are in the download as well as the installation on my computer. Since your sha1sum was the same as mine, those files are on your download. If not, then the zip file was not extracted properly. Some extractors have options for them which will allow them to skip links. If your extractor was configured this way, then that would explain why you do not have the "gridfilters" subdirectory in your extracted file as it is a link. Now that I think about it that is the most logical explanation as you did not have to unzip the mainstream tvheadend version that worked since it was a git repository which does not need extraction. Clear enough? Try extracting it using a different program or study the man page of the program you were using.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

I believe I have found your problem. You say you have been using WinSCP to copy the files to your Rpi. I have found the following information at "http://winscp.net/forum/viewtopic.php?t=15092".

[Question]
How does WinSCP handle Synchronization of symbolic links [UNIX machines], especially when those links references or point to files outside of the root directory of the scp/ftp download?

[Reply with quote]
Well, that's rather complicate question. With SFTP protocol, with which the client (WinSCP) has good control over the remote files, symlinks to files are treated as the file itself, and SYMLINKS TO DIRECTORIES ARE IGNORED (no matter where they point to).

Brian, since your missing a directory called "gridfilters" which is a link also called symlink or symbolic link, the directory is getting thrown away. Since OSMC is a debian based Linux OS, it is symlink aware (as most every Linux OS is), however I know that Windows was not aware of symlinks in the past, I've read that they can handle them now. I suggest either copying the files over like I instructed previously or using a different program that is symlink aware. Why can't you download the file directly to the raspberry pi? That device has an internet connection port. It runs an OS. What you need to extract the file should be on there already. Just a thought.

P.S. The rest is up to you. Study your directory structure of the extracted zip file and the directory structure of the copied (by WinSCP) structure and find out where the difference is. It is NOT a problem with Lauri Myllaris' version of tvheadend. I am sure of that. Don't ask me about Windows programs, like I said previously I have not used Windows in over a decade. Google it! When you find the solution, I would appreciate it if you would post the solution to it, and clean up your previous posts so as to remove the clutter on this forum and make it easier for people to get the information they need. I do that every so often myself.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Brian Hanfgarn over 9 years ago

I think my issue is with permissions. I installed on my other raspberry pi, pi2. And had the webui issue again. Typed sudo -s and then it worked. Doesn't that give administrative permissions? I'm a bit lost when it comes to permissions. Guess that's why Linux is a secure platform. So is home folder open to do whatever? What do you mean by .Hts is hidden, do I have to do something to see it? Does this install to the same folders as the main branch? Might be good to know while figuring out the autostart.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

if you get it working again and you want it to auto launch at start up, just edit the rc.local file and add this line:

" sudo tvheadend -C & "

make sure this line is before the "exit" line

Works for me perfectly in OSMC and Xbian

RE: ATSC EPG - Possible Implementation Strategy? - Added by Brian Hanfgarn over 9 years ago

Thanks Jim, I kinda had it working it would autostart and run on it's own but I couldn't get it to run webui. Channels worked in Kodi cause I had already configured channels with tvheadend -- firstrun before autostart. What folder are you compiling on? What extraction tool are you using? I've started over and installed to /home with unzip but I got the webui crap again, will try 7zip again. And start doing it on my Pi2 B cause Pi1 B with 256mb takes way to long to compile. It's like 20 mins vs 45 mins to an hour.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

Sorry, it's been months since I did this and cannot remember all the steps, I just followed Steve Smith's directions in this thread to get it working. The only error I got when I could not log into the webui was I did not do the "firstrun" option.

When I ssh into my box, there is a .hts directory as I log in and type ls -a

root@xbian ~ # cd .hts
root@xbian ~/.hts # ls
tvheadend
root@xbian ~/.hts # cd tvheadend
root@xbian ~/.hts/tvheadend # ls
accesscontrol bouquet channel config dvr epgdb.v2 epggrab input profile

RE: ATSC EPG - Possible Implementation Strategy? - Added by Brian Hanfgarn over 9 years ago

Thanks again looks like everything works now. Autostart and all. I guess extracting with 7zip really is what fixed my issue, using unzip doesn't work. Also I installed it to /home folder this time.

One more question. Trying to get it to work with WinTv 950q tuner now. It does show up in device list but doesn't detect channels. Should I try to install firmware? I know Sam likes to bake the firmware into his software like RaspBMC and OSMC.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo over 9 years ago

I never used the 950q tuner, but at one point was using the Happauge HVR-850 tuner, it was utter garbage (it would not reinitialize after reboot and I would have to manually remove it from the USB port and reattach it for it to be seen), I changed to a very cheap $24 Kworld tuner UB435-Q, and it works flawlessly under OSMC and Xbian and never fails to show up after reboot without user effort, Highly recommended!

RE: ATSC EPG - Possible Implementation Strategy? - Added by Alex Balcanquall over 9 years ago

Hi, newbie here.

I am confused, does the mainline TVheadend have the ATSC EPG OTA grabber?
(or is it just the custom fork?)

I am using this fork as it gets compiled for Synology on a regular basis.

Thanks

Alex

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

To Lauri Mylläri:

I am reporting a bug that you probably already know about since you already reported these limitations:

  • no huffman decoding (haven't seen any channels use that yet)
  • event IDs are assumed to be unique across EITs
  • table versions are not tracked properly (may get confused when the 3 hour interval completes and tables are moved)
  • ETT data is not kept for events that haven't been seen yet
  • grab status is not tracked

I ended the program when it was in a good state. The debug log file was from right after a restart to when tvheadend was done finding epg and then I killed it to make it as small as possible.

My autorecord programs:
20/20 WRTV-HD
60 Minutes WTTK-DT
CBS Evening News WTTK-DT
CSI: Crime Scene Investigation WTTK-DT
CSI: Cyber WTTK-DT
Empty Nest LAFF
Eyewitness News Weekend at 6:00 WTHR-HD
Face the Nation WTTK-DT
Frontline WFYI-HD
Futurama WXIN-DT
Here's Lucy COZI TV
Let the Bible Speak WHMB-HD
Mayberry R\.F\.D\. Me-TV
Meet the Press WTHR-HD
NBC Nightly News Weekend Edition WTHR-HD
NCIS WTTK-DT
NCIS: Los Angeles WTTK-DT
NCIS: New Orleans WTTK-DT
NOVA WFYI-HD
Nature WFYI-HD
One Day at a Time AntTV
Sanford & Son AntTV
Seinfeld WTTK4.2
The King Of Queens WTTK4.2
The Middle WTTK4.2
The Middle WXIN-DT
The Outer Limits ThisTV
The Simpsons WXIN-DT
This Old House WFYI-HD
This Week With George Stephanopoulos WRTV-HD
Two and a Half Men WTTK4.2
Two and a Half Men WXIN-DT
Washington Week With Gwen Ifill WFYI-HD
Whose Line Is It Anyway\? WISH-HD

Upon restart it added some programs to the record list it shouldn't have. I apologize that I deleted the programs before I was able to look into the saved files to see what the actual record time was. When I deleted the programs those files were also deleted. If this does not help you... I now know better.

Dish Nation: WXIN-DT on line # 173 and 8085 of the debug log file
Thu Jul 2 03:29:59 # Believe this was the one marked for recording
Fri Jul 3 03:29:59
Sat Jul 4 03:29:59

Mike and Molly: WXIN-DT on line # 175 and 8464 of the debug log file
Thu Jul 2 01:29:59 # Believe this was the one marked for recording
Fri Jul 3 01:29:59
Sat Jul 4 01:29:59

Modern Family: WXIN-DT on line # 177 and 8466 of the debug log file
Thu Jul 2 00:29:59
Thu Jul 2 00:59:59 # Believe this was the one marked for recording
Fri Jul 3 00:29:59
Fri Jul 3 00:59:59
Sat Jul 4 00:29:59
Sat Jul 4 00:59:59

The problem is not a big deal if you catch them and delete them, but if you have more programs than tuners to record then all of the tuners will crash and a restart of the computer is the only way to fix it that I know of. It is a lot worse over the weekend so I opted for the smallest debug file to assist you in troubleshooting.

These are the shows that may have gotten mixed up with them. They are on the same channel WXIN-DT:
Two and a Half Men Wed Jul 1 23:29:59
Two and a Half Men Wed Jul 1 23:59:59
The Middle Thu Jul 2 01:59:59
Two and a Half Men Thu Jul 2 23:29:59
Two and a Half Men Thu Jul 2 23:59:59
The Middle Fri Jul 3 01:59:59
Two and a Half Men Fri Jul 3 23:29:59
Two and a Half Men Fri Jul 3 23:59:59
The Middle Sat Jul 4 01:59:59

My conclusion: These are all 1.5 hours apart!
Right:
Two and a Half Men Wed Jul 1 23:29:59
Two and a Half Men Thu Jul 2 23:59:59
The Middle Sat Jul 4 01:59:59
Wrong:
Modern Family Thu Jul 2 00:59:59
Mike and Molly Thu Jul 2 01:29:59
Dish Nation Thu Jul 2 03:29:59

Hope this helps and thanks for this awesome software,
Steve

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

To Lauri Mylläri:

It appears that I may have been in error in my previous post. I should explain. When I first started using this tvheadend version with the atsc plugin I had no problems whatsoever for about 2 months. The problems than started and over time increased in frequency and I thought it was related to programming more shows to record. Recently I got tired of the need to restart my computer because my tuners quit working so I took the case off of my computer. I inspected the inside with a fine tooth comb and found something extremely difficult to see and impossible without a mirror. The Hauppauge HVR-2250 tv tuner card was resting (at the very tail end) on an IC. It was keeping the card from seating all the way (thank you MSI for that glorious design ;) ). I swapped PCI slots with another shorter card and wouldn't you know it, after two weeks no need to restart and I do not get any erroneous epg data either. I can understand the former but the latter has me stumped. At any rate it seems that the software that you so graciously wrote for us is fine after all. I'll keep an eye on it to see if it does it again but somehow I doubt it.

Thanks,
Steve

RE: ATSC EPG - Possible Implementation Strategy? - Added by Lauri Mylläri over 9 years ago

Hi Steve,

glad to hear you got it working.

I still haven't had a chance to set this up for myself (need an antenna first) and have been working on improving Kodi image quality. I'm planning to pick this up later, but it'll be a while.

Thanks for providing support here! I'm happy to see some already benefiting from our efforts.

--lauri

RE: ATSC EPG - Possible Implementation Strategy? - Added by Daniel Ziemba over 9 years ago

Hey Lauri, I saw that your fork hasn't had any changes for a while, so I went ahead and made a more up to date fork with everything cherry picked from it plus some additional changes to deal with some things upstream changed. I didn't dig too deep into the code to really understand what I was doing, but it compiles, and so far seems to work well for me. Feel free to do whatever you want with it.

https://github.com/zman0900/tvheadend/tree/atsc-epg

Also, here's an AUR package of it for Arch Linux, in case anyone else here is using that: https://aur.archlinux.org/packages/tvheadend-atsc-epg-git/

Lauri, do you have any plans to try to get your changes merged to upstream?

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

There seems to be a new kid on the block... Daniel Ziemba.

I believe what he did was take Lauri Mylläri's repository and applied all of the updates from tvheadend:master. Correct me if I'm wrong Daniel.

If you look at Lauri's repository it states that "This branch is 29 commits ahead, 865 commits behind tvheadend:master"

If you look at Daniel's repository it states that "This branch is 29 commits ahead of tvheadend:master" which means that all of the updates were applied since there no commits that are behind. The commits that are ahead are Lauri Mylläri's atsc plugin commits.

I have compiled and installed Daniel's version and it runs well. My earlier post on doing this still applies even though the address to the file is now https://github.com/zman0900/tvheadend/tree/atsc-epg as per Daniel's post. It seems to me the fact that it runs so well on the current tvheadend:master would mean that getting Lauri's atsc plugin merged with tvheadend:master is going to be easier as there is a repository that proves that it can co-exist with tvheadend:master.

I'm just using logic here since I don't have a firm grasp of how the repositories work so anybody correct me if I'm wrong.

Good job Lauri and Daniel,
Steve

RE: ATSC EPG - Possible Implementation Strategy? - Added by Lauri Mylläri over 9 years ago

Hi Daniel,

thanks for updating the code!

I would like to submit this upstream, but there are some issues that need to be addressed first (see previous page for more details). I'm surprised it already works as well as reported - maybe some of the items like huffman decoding aren't must haves.

I'll try to set this up on one of my OpenELEC systems and see how it looks. My main item at the moment though is to get the 3dlut/display profile support cleaned up and submitted to Kodi.

Steve, I agree with your assessment. The old code working on current master is very good news - I was worried that a partial rewrite might be needed just to make it usable again. I wouldn't want to offer my implementation upstream in its current state, but having a current working branch makes things much easier for anybody using or developing it.

Thanks again to both for your work.

--lauri

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

Here is a tvheadend launch script written in BASH for Linux.

It allows you to launch tvheadend with the following features:
  • Writes a log to the defined log directory.
  • Allows you to define first run mode in the script. Defaults to false.
  • Allows you to define debug mode in the script. Defaults to true.
  • Allows you to change the defined log directory. Defaults to ${HOME}/.hts/tvheadend/logs.
  • Allows you to change the identifier for a debug log. Defaults to debug.
  • Allows you to change the file name of the log. Defaults to tvheadend.
  • Inserts a file system sortable timestamp into the filename of the log. Example: tvheadend_20150730-122702.debug.log
Here is what you need to successfully run the script:
  • Create the path to the log file if it does not exist.
  • Place the script on an executable file system.
  • Make sure the script has executable permissions.
  • Alter the configuration of the script (not needed).
  • Run it manually or via auto start.

Let me know if you have a problem with the script or want a feature added to it.
You are also welcome to alter the script yourself. Please re-post it if you do.

Just run this script instead of calling the tvheadend executable directly. You can substitute the script for your auto start configuration or run it manually.

tvheadend.bsh (990 Bytes) tvheadend.bsh tvheadend launch script

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith over 9 years ago

To Lauri Mylläri:

I have run into the problem of the program recording the wrong shows again. It seems that I have stumbled onto something in the process. While the program is running is seems to function correctly, it is when the computer is restarted that it begins to exhibit erroneous operation. Keep in mind that re-seating my tuner card fixed the tuners going dead. I honestly did not believe whole-heartedly that it would of fixed this though. Also, because the tuners did not go dead like they used to I did not have to restart my computer and I left it running since there are good shows on when I am sleeping. After installing and running Daniel's version since it was released I have had no problems, however I decided to shut the computer down this morning and immediately on restart is when it began adding the wrong shows to the record lineup.

Here are the shows that were added that should not have been:

Line #|Log #|Date:Time|Frequency|Channel|TV Show
1544|8a6b591745fb0a82a7bb72e5c46b3755|Wed Aug 5 18:00:00 EDT 2015|563.028|WTTK4.2|Modern Family
1928|510871a0ec992674dfa3fdf49f481e61|Wed Aug 5 16:00:00 EDT 2015|563.028|WTTK4.2|Mike & Molly
1930|e732266766b6d6164e390841fe63e15b|Wed Aug 5 15:30:00 EDT 2015|563.028|WTTK4.2|Everybody Loves Raymond
2307|a7031aad1bca4bc21175197fd68b8bbe|Thu Aug 6 02:37:00 EDT 2015|563.028|WTTK-DT|Up to the Minute
2597|d4983c4bf5434d53686e764fb163f95c|Wed Aug 5 13:30:00 EDT 2015|563.028|WTTK4.2|Mad About You
2599|e2c50236a28b03cba688887a683dd1ed|Wed Aug 5 11:00:00 EDT 2015|563.028|WTTK4.2|America's Court With Judge Ross
7025|c597b177a6a140129ccefd1ee1e80aa9|Thu Aug 6 01:00:00 EDT 2015|659.028|WXIN-DT|Modern Family
7109|e7a81cf7f520a0e78957f8235f892286|Thu Aug 6 00:00:00 EDT 2015|659.028|AntTV|Three's Company

Could not find any definitive correlation such as the one and one half hour difference last time, however it still only occurs on the same two frequencies only.

Hope this helps,
Steve

EDIT: Ignore the dvr log 70f7be742df5d3efb06208c2081ec6a7. Added by mistake.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Lauri Mylläri over 9 years ago

Hi Steve,

thank you for the logs. I'll investigate when I have a chance.

I'm trying to wrap up the Kodi work and set up my own system at the same time. I've made the first OpenELEC builds based on Daniel's updated version but still looking for the right combination of Kodi, Tvheadend and the PVR add-on versions. I'm having trouble with the channel numbers, but it might be related to the current timeshift issues. I have also made a tvh 4.0 based branch with the atsc epg.

RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago

To Lauri and Daniel,
I have had Daniel's version crash on me a few times. What I mean is tvheadend altogether will crash. I have attached a debug log of the event. I have reverted to Lauri's version due to the crashes. Maybe this log will help you both in the future. Other than the crashes, Daniel's version worked fine. The crashes seem to only happen when there are more shows to record than there are available tuners.

To everyone,
I have made improvements to the start script for tvheadend. It now recursively makes the root directory and individual time stamped subdirectories where the backups and logs are stored each time tvheadend is started. When you use the script, a backup is made of the tvheadend configuration directory and places the new debug log in the same time stamped subdirectory. You have to remember though that the log in this directory actually belongs to the backup that will be made the next time tvheadend is started and its backup is made. I plan to fix that in future versions.

Enjoy,
Steve

tvheadend.debug.log (5.65 MB) tvheadend.debug.log 1st crash log (Daniel's version)
tvheadend.debug.log (14.1 MB) tvheadend.debug.log 2nd crash log (Daniel's version)
tvheadend.bsh (2.69 KB) tvheadend.bsh tvheadend start script
(26-50/78)