ATSC EPG - Possible Implementation Strategy?
Added by J.J. Smith about 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
Hi Lauri,
I have found something very interesting and may be a breakthrough as far as troubleshooting the problem with the erroneous recordings.
It happened again, except this time with a little twist. I had one of my four cpu's working at 100% and my system wasn't reporting what program was causing it. I discovered that tvheadend was the culprit (remember I am using your [Lauri's] original version again). I killed it and restarted tvheadend (not the computer), it had then added those same shows as it had before. Strange how it's always the same shows.
A little while ago I decided to find out if the problem was only happening during a restart of the computer which seemed to be the case. I tried to get it to mess up by killing the program and restarting, but it did not fail a single time. It seemed to only mess up when the computer was restarted. Well this time it's a bit different as the computer did not have to be restarted, however when I restarted tvheadend after I killed it when the cpu usage went to 100% it did mess up.
Anyway, I attached the debug log where it had caused the cpu to load at 100% as well as the extra shows that were added. Here's another twist. I decided to look at the dvr logs from the previous run of tvheadend and have found something intriguing. You can actually see in the dvr log where the name of the show has changed. It is still updating the timer with the correct day and time, but the name of the show has changed. I hope that this information will assist you rather than to confuse. I realize that if you can narrow down when the erroneous tv shows are added, it will make it easier to troubleshoot.
Line #|Log #|Date:Time|Frequency|Channel|TV Show
163|77608e7faf300b32a67f12683e2fd422|Wed Aug 19 21:00:00 EDT 2015|563.028|WTTK4.2|Law & Order: Special Victims Unit
168|663d1e79995021786095778c533ce234|Wed Aug 19 18:30:00 EDT 2015|563.028|WTTK4.2|Modern Family
174|ce9dbc878b56e725cdd41e382d39c2b1|Wed Aug 19 16:30:00 EDT 2015|563.028|WTTK4.2|Mike & Molly
180|475c0d5d99a5c3d0ab804d01fa4f161b|Thu Aug 20 00:37:00 EDT 2015|563.028|WTTK-DT|The Late Late Show With James Corden
4893|77608e7faf300b32a67f12683e2fd422|Wed Aug 19 21:00:00 EDT 2015|563.028|WTTK4.2|Law & Order: Special Victims Unit
5183|475c0d5d99a5c3d0ab804d01fa4f161b|Thu Aug 20 00:37:00 EDT 2015|563.028|WTTK-DT|The Late Late Show With James Corden
5693|ce9dbc878b56e725cdd41e382d39c2b1|Wed Aug 19 16:30:00 EDT 2015|563.028|WTTK4.2|Mike & Molly
5956|663d1e79995021786095778c533ce234|Wed Aug 19 18:30:00 EDT 2015|563.028|WTTK4.2|Modern Family
P.S. I have attached another bash script which will allow you to convert the unix timestamps in the dvr logs to a human readable time such as those in this report.
475c0d5d99a5c3d0ab804d01fa4f161b (575 Bytes) 475c0d5d99a5c3d0ab804d01fa4f161b | dvr log correct original | ||
663d1e79995021786095778c533ce234 (583 Bytes) 663d1e79995021786095778c533ce234 | dvr log correct original | ||
77608e7faf300b32a67f12683e2fd422 (573 Bytes) 77608e7faf300b32a67f12683e2fd422 | dvr log correct original | ||
ce9dbc878b56e725cdd41e382d39c2b1 (575 Bytes) ce9dbc878b56e725cdd41e382d39c2b1 | dvr log correct original | ||
475c0d5d99a5c3d0ab804d01fa4f161b (600 Bytes) 475c0d5d99a5c3d0ab804d01fa4f161b | dvr log incorrect updated | ||
663d1e79995021786095778c533ce234 (577 Bytes) 663d1e79995021786095778c533ce234 | dvr log incorrect updated | ||
77608e7faf300b32a67f12683e2fd422 (597 Bytes) 77608e7faf300b32a67f12683e2fd422 | dvr log incorrect updated | ||
ce9dbc878b56e725cdd41e382d39c2b1 (576 Bytes) ce9dbc878b56e725cdd41e382d39c2b1 | dvr log incorrect updated | ||
unix_timestamp.bsh (293 Bytes) unix_timestamp.bsh | unix timestamp convert script |
RE: ATSC EPG - Possible Implementation Strategy? - Added by Ted Correll over 9 years ago
Hi everyone, I've been watching this for a while, but havent had the time to try it out. I am using a Pi 2 with Xbian installed 1.1.8. I have the origional version of Lauri's program. I tried to follow Steven Smith's guide.
When I treid to confiugre with ./configure, ittold me "
Checking support/features
ERROR: No C compiler found"
Can anyone tell me what I'm missing or doing wrong?
Thank you!
RE: ATSC EPG - Possible Implementation Strategy? - Added by Mark Clarkstone about 9 years ago
Ted Correll wrote:
Hi everyone, I've been watching this for a while, but havent had the time to try it out. I am using a Pi 2 with Xbian installed 1.1.8. I have the origional version of Lauri's program. I tried to follow Steven Smith's guide.
When I treid to confiugre with ./configure, ittold me "
Checking support/features
ERROR: No C compiler found"Can anyone tell me what I'm missing or doing wrong?
Thank you!
You don't have the compiler installed, usually fixed by installing build-essential on debian/ubuntu but for xbian I think you need to do something different. No clue as to what as I don't use Xbian.
RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo about 9 years ago
I run this on xbian, I believe it is done by this, sudo apt-get install build-essential
Jim
RE: ATSC EPG - Possible Implementation Strategy? - Added by Ted Correll about 9 years ago
Mark and Jim,
Thank you! That helped but I am still running into issues.
It is saying I don't have mmmx, msse2, atomic64, or libconv.
I tried using the autobuild option Jim suggested earlier in this thread, but that returned "
dpkg-buildpackage: warning: build depenedencies/comflicts unsatisfid; aborting
dpkg-buildpackage: warning: (use the -d flag to override.)"
Again, if anyone can tell me what I'm missing, and/or how to get them or around them, I would be very appreciative.
RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo about 9 years ago
-d to over ride since the raspberry pi does not have that capability, that's how I did it
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Hello everybody,
I just updated my tutorial on installing tvheadend with the atsc-epg capability. I am writing this to inform everyone, including the veterans to this forum, of any new developments.
I have just installed and am running Lauri Mylläris version 4.0 that he uploaded. I have included that and Daniel Ziembas version to my tutorial.
I have also added other useful information which newbies may find useful. I have been adding any encountered problems to it incrementally since its inception.
It is worth giving it another look if you want.
Happy psip aggregating and manipulating,
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Sorry to report that Lauri's 4.0 version wound up consuming all of my ram and eventually became non-responsive. I reinstalled his original version once again. Unless you're doing testing, that is the version you want. I have attached a debug log. I have also updated the tutorial again to reflect this problem.
tvheadend.debug.log (8.23 MB) tvheadend.debug.log | 4.0 version debug log |
RE: ATSC EPG - Possible Implementation Strategy? - Added by Ted Correll about 9 years ago
I am still having trouble installing Lauri's origional version. I am on a Raspberry Pi 2 running Xbian.
I tried using ./Autobuild.sh -d but that kept reporting that d is an illegal flag. So I tried compiling manually. ./configure, make, sudo make install, sudo tvheadend --firstrun This ran without error, but when I opened up chrome on my tablet and navigated to http://pi.ip:9981/ the pi began spitting out errors i.e. webui failed to open... HTTP: /static/extjs/ .../
It has been mentioned here gridfilters is a symlink, so you musst use a symlink aware extractor. The first time I extracted the zip file I used 7zip on Windows 7. When I got this error, I uninstalled cleaned and deleted everything on the pi, and had it extract the zip file from a flash drive to //home Then I went through the instal process again, and ended up with the same results.
I have gone through this whole thread again, and looked for what others have done, had problems with, and how they solved them. I found a couple things I was doing differently, tried the new ways, and still same issue.
I haven't installed Java, could that be my problem.
Could putting it in the home folder be the problem? I just tried putting it in root, with no change.
I compared the files with gridfilters in the zip file to the files with it in the unziped folder.
(unzip tvheadend-aatsc-epg.zip | grep gridfilters -c & ls -R | grep gridfilters -c)
The zip had 23 the folder had 7. I would expect the built-in unzip command to handle symlinks properly. Am I not using it corectly? I looked at its help, and it there weren't options to include or exclude symlinks.
Thank you!
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
There is no "-d" switch for configure. Use "configure --help" while you're in the tvheadend program directory like you would be when you compile. Configure without the switch and it will work, but that has nothing to do with the gui not working.
This is NOT a problem with the version of tvheadend here. While I would like to add the solution to my tutorial, nobody has offered one and I'm not gonna look for it myself either. I don't own an RPi and I'm not going to emulate it.
I just don't understand why everyone uses windows to unzip the file. Doesn't an RPi have a browser and an internet connection. The research that I have done shows this. Can't you download the file onto the RPi and unzip using the tools supplied with a debian based OS like Xbian?
Look on the main tvheadend forums. I have seen mention of this before. Look on the internet and search for "windows symbolic links" and read that stuff. It tells me that is your problem. I have read that the windows version of 7zip does not correctly handle symbolic links as per the needs of the OS you are running.
Hasn't anyone figured this out? If you have, post your solution please and I will add it to my tutorial.
Good luck!
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Hi Lauri,
I previously said that your 4.0 version was consuming all of my cpu and crashing eventually. This was true, however I did not use a clean configuration when I did so. When I reverted back to your original version, it did exactly the same thing. I wiped the configuration and it is working fine. I plan on retrying your 4.0 version with a new configuration and report the results. I won't be making that mistake again, I plomise.
Later,
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
It appears that I was wrong again. Upon adding more channels to Lauri's original version it also started to consume all of my cpu and crash. It seems as if the adding of one channel (LAFF) which is new to my area is causing this problem. I don't have any reception problems with this channel so it must have something to do with the format of it. If I don't record anything from this channel, no problem. The information gathered from mediainfo is attached. I have no idea what the problem could be but hopefully someone can look at the attachment and see something wrong with this channel. I have recorded three different programs on this channel and they all cause the crash. It has happened when the program was the only one recorded so my previous prognosis was wrong. It seems to have nothing to do with recording more programs than there are available tuners. If only someone using the main tvheadend program could see this behavior maybe it could be fixed. It is most certainly a tough one. At any rate, I don't think there is anything wrong with Lauri's version but I honestly don't have the expertise to give 100% assurance. I will no longer be recording the LAFF channel.
On another note, Lauri's new 4.0 version will not recognize the FOX frequencies for some reason. No matter how many times I try I cannot map the FOX frequencies even though they are in my mux list. It is not because of bad reception either. Anyone else have this problem? This is also the same and only frequency that records the wrong programs. Another tough one. I have a whole bunch of debug logs and backups of the configuration if anyone thinks they will help.
Later,
Steve
spin city mediainfo.txt (24.8 KB) spin city mediainfo.txt | complete mediainfo for spin city from the LAFF channel |
RE: ATSC EPG - Possible Implementation Strategy? - Added by Rob Gale about 9 years ago
Hi All. This is a great thread and I have got as far as building and testing the 4.0-atsc-epg branch. For a while I got stuck on the webui Error 500 problems but I found this seems to be due to symlinks stored as files in the repository. The way I got around this was to do a git clone to pull the repo locally. Then I switched to the 4.0-atsc-epg branch using "git checkout "remotes/origin/4.0-atsc-epg". There is definitely something funky about how the symlinks are being extracted from the zip and staying as files instead of being converted to links.
Rob
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Hey Rob.
Glad to see you got it working. Did you install it on an RPi?
On a previous post I said "Look on the main tvheadend forums. I have seen mention of this before. Look on the internet and search for "windows symbolic links" and read that stuff. It tells me that is your problem. I have read that the windows version of 7zip does not correctly handle symbolic links as per the needs of the OS you are running."
Installing it using "git checkout" bypasses the need to unzip it. However, that is not something a newbie could easily accomplish.
I have also wrote "I just don't understand why everyone uses windows to unzip the file. Doesn't an RPi have a browser and an internet connection. The research that I have done shows this. Can't you download the file onto the RPi and unzip using the tools supplied with a debian based OS like Xbian?"
I have also wrote "Hasn't anyone figured this out? If you have, post your solution please and I will add it to my tutorial."
I guess what I'm driving at is has anyone installed it onto an RPi successfully using the zip file? If so, would that person be willing to post a step-by-step procedure for this. If someone does, I will add to my tutorial for completeness.
Lastly, technically, and semantically, this statement "There is definitely something funky about how the symlinks are being extracted from the zip and staying as files instead of being converted to links." is wrong and should be reworded to "There is definitely something funky about how the symlinks are being extracted from the zip and being converted to files instead of staying as links.".
Thanks,
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Rob Gale about 9 years ago
Hi Steve. Thanks for responding. My dev environment is an RPi2 running osmc. I fetched the zip directly from the RPi using wget and unzipped using "unzip". I am going to investigate further but right now my focus is getting my RPi installed and streaming to my TVs. The good news is that the 4.0-atsc-epg branch worked very well for me as far as setting up and populating EPG info after discovering the channels (I am US based). What I really want to do though is hook up minidlna to serve the channels to my uPnP capable Blu-Ray players. I will start looking at that plumbing now.
Rob
RE: ATSC EPG - Possible Implementation Strategy? - Added by Ted Correll about 9 years ago
Hey everyone!
Its been a while, but I am back and have great news: I have it working!
I think I ran into the same trouble Rob did with extracting from the zip file. I bypassed this by using git clone and specifying the branch I wanted.
Steve, I will post what I did step by step soon.
RE: ATSC EPG - Possible Implementation Strategy? - Added by Ted Correll about 9 years ago
I'm sorry, this took longer to post than I planned.
1st I updated everything through Xbian configuration from within Kodi (Kodi settings/Xbian/Update). then ran the following commands:
sudo apt-get update # I don't remember if this updated anything or if using the update in Xbian Config caught evertyhing
sudo -s apt-get install git build-essential pkg-config libssl-dev dvb-tools libdvbv5-0 liburiparser-dev liburiparser1 libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev git # I don't know if all of this is necessairy (I got the list from Lee C and omitted OSMC specifics), but ./configure returned many more OK messages than without getting all of those (previous attempts)
git clone https://github.com/laurimyllari/tvheadend.git branch 4.0-atsc-epg
cd tvheadend
./configure
make
sudo make install
from here I followed Steve's guide for setting up.
Thank you for all of the help!
I would also like to add that once everything is set up, while hitting the 'Trigger OTA EPG Grabber' button caused activity in the log, but it didn't produce EPG data. But aobut 20 hours later after both the 2:04 and 14:04 scheduled scans had ran, I had epg data in Tvheadend. It took rebooting Kodi a few times to get the EPG data to show up; each restart would add a channel or two to the guide in Kodi. After that I have had EPG continuously.
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Thanks Ted. I have updated my tutorial to reflect your steps and have added other things as well especially related to the RPi, usage of git, and downloading the zip file directly. Check it out and let me know if you see anything wrong.
As far as Kodi goes, I have seen the exact same problem. Don't be surprised if it keeps on doing it though. I have seen that behavior a lot. I record all of my programs so I don't use Kodi much at all.
If I want to view tv, I use Xine. To add channels from tvheadend. In a browser run "http://localhost:9981/playlist" which will give you a file called "channels" to save to your file system. Import the playlist into xine. This is lean and mean whereas Kodi is fat and passive. There is also a plugin for VLC at https://github.com/BtbN/vlc-htsp-plugin.
Good luck,
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Hey people, I just noticed that atsc epg support has been added to mainstream tvheadend version 4.2 nine days ago. Thanks to all of those involved! This link http://tvheadend.org/versions/59 explains it. It is alpha and requires testers. It's time to crack some knuckles.
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Hello everybody, I just thought I would let you know that the version (v4.1-822-g18d993f) of MAINSTREAM tvheadend found at "https://github.com/tvheadend/tvheadend" does parse the psip data and populate the epg data so you can now use it to record your favorite programs automatically. An earlier version may not work so just download the latest. Keep in mind that this is still alpha and when ready will become v4.2 release. It still doesn't map all of the channels that pre-4.0 versions did so I don't know whats up with that. It does find some new channels even though they are unusable. You will have to manually add them. I had five frequencies that wouldn't map and it took me an hour to manually map them. Make sure you backup your old configuration in ~/.hts and let tvheadend make a new one for you. I not sure but I don't believe it's even compatible with the 4.0 version as per what I remember reading. Another thing that threw me off was you have to enter a new users username then switch to a different tab and enter the password.
This is just sweet,
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
Just an update on the MAINSTREAM tvheadend atsc-epg progress. Quite a few fixes were introduced so if you haven't given it a test drive then now is the time to do so. While it is still in alpha, it seems that it is working well and ready for production. You might find it to be an improvement already. Download and install to find out.
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo about 9 years ago
any idea when v. 4.2 will get released?
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
I don't rightly know. Alls I know is that the community was asked to test the latest version and I helped with that. A few bugs were fixed and then I gave it a thumbs up. It seems to already be working better than the versions here. The url http://tvheadend.org/versions/59 says its development is at 100% so maybe soon. Nothing wrong with downloading the latest version, installing it with a new configuration, and using that. Just make sure you backup your old configuration if you don't like it. When version 4.2 is released you can install that and shouldn't have to use a new configuration again. Besides, it wouldn't hurt to have another tester. I just use it for auto-recording programs using the psip data. It is nice to have another tester for that and other things, such as timeshift. At any rate, your contribution is welcome.
Steve
RE: ATSC EPG - Possible Implementation Strategy? - Added by Jim DiCarlo about 9 years ago
I installed the latest version but really want to use the ATSC EPG data to see if 4.2 is working as designed to give my thumbs up, but seems like there are no links to download and test it. I kept my original system fully functioning, so no biggie if I cannot get it.
Jim
RE: ATSC EPG - Possible Implementation Strategy? - Added by Steve Smith about 9 years ago
The version at https://github.com/tvheadend/tvheadend is the latest version. If you download the zip file you will get the latest version. You can also consult my earlier tutorial.
Steve