Project

General

Profile

Feature #325

Freesat EPG.

Added by xraynorm - about 14 years ago. Updated over 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
EPG
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Would possible to get the full 7 days Freesat UK EIT data in Tvheadend?

This has been done in MythTV

http://svn.mythtv.org/trac/attachment/ticket/5365/freesat_epg.2.diff

History

#1

Updated by Andreas Smas almost 14 years ago

  • Category changed from General to EPG
#2

Updated by Guy Richie almost 13 years ago

Hello All,

Further to the discussions held on feature# 593 (http://www.lonelycoder.com/redmine/issues/593) I have tried to attain the DVB-S1/2 Freesat EIT data to populate the EPG. I am running Ubuntu 11.10 (kernel 3.0.0), with Tvheadend and XBMC-PVR from ppa: apt-add-repository ppa:alexandr-surkov/dharma-pvr, as referenced from http://www.loggn.de/ubuntu-xbmc-repository-10-1-dharma-und-11-0-pre-mit-und-ohne-pvr/. This is an account of activities to date:

1. Install “tv_grab_dvb_plus” version 0.2.1 (http://sourceforge.net/projects/tvgrabeit/)

  • Extract tarball & check if package "build-essential" is most recent (sudo apt-get install build-essential)
  • cd tv_grab_plus-0.2.1
  • sh ./bootstrap.sh
  • make
  • sudo make install

2. Manually check / test xml output from tv_grab_dvb_plus

Test A.
  • Open XBMC->Live TV->TV Channels and tune into “BBC 1 London”.
  • In a terminal run $ tv_grab_dvb_plus
  • By default install this command will output xml according to a dvb input/tuned mpeg stream.
  • Result = Now and Next programme information for all channels on the BBC 1 London multiplex (i.e. 28.2°E Astra 2D 10773.00 H DVB-S QPSK 22000 5/6 TID:2045 see: http://en.kingofsat.net/packages.php?&id=111&standard=All&ordre=freq&filtre=Cle)
Test B.
  • In a terminal run $ tv_grab_dvb_plus –f freesat
  • The –f option tells tv_grab_dvb_plus that the input/tuned mpeg stream is freesat
  • Result: as above? Was expecting a successful EIT grab?
  • Try again. This time tune XBMC->Live TV->Radio Channels into “Radio Caroline” (this station is on the same multiplex as “Freesat Info” where the Freesat EPG is broadcasted at a much higher frequency / rate (see: http://www.dvbviewer.tv/forum/topic/31575-open-epg-to-dvb-viewer/)
  • In a terminal run $ tv_grab_dvb_plus –f freesat
  • Result: as above? Was expecting a successful EIT grab?
Test C.
  • Tune XBMC->Live TV->Radio Channels into “EPG Background Audio.” (this is on the BskyB UK EPG multiplex - you can add this multiplex manually in Tvheadend if it does not show in XBMC. In Tvheadend web gui configadaptersmultiplexes, click add manually enter: 11778000, 27500000, DVB-S, 2/3, QPSK. Click on services tab and find EPG Background audio and map it by entering a channel name, this will put in the “channel” tab – you may need to reset the XBMC Live TV database for the new channel to appear – XBMCSettingsLive TV.
  • Once tuned into EPG Background Audio and listening to the lovely music:
  • In a terminal run $ tv_grab_dvb_plus –f skyuk
  • Result: 14 days of programme information over every Sky channel broadcasted from 28.2.E in less than 20 seconds. Brill. To save to an xml file run: $ tv_grab_dvb_plus –f skyuk –o /tmp/whatson.xml

3. Getting the XML data into Tvheadend.

Attepmt A.

Can’t find a way of importing xml file into Tvheadend. Obviously an xml file can be produced automatically using a cron job and script which executes above successful EIT grab. How to get the xml file in Tvheadend… need suggestions please – I have tried: $ mv /tmp/whatson.xml /home/hts/.hts/tvheadend/epgdb.

Attempt B.

Set the grabber in Tvheadend web GUI. Configure->XML-TV. Select the “EIT data from DVB, Freesat, Sky or MediaHighway stream” from the drop down box. A prompt to run /usr/bin/tv_grab_dvb_plus -–configure will pop up. The -–configure option is not a valid option in this grabber (see $ tv_grab_dvb_plus –h), thus no need to do. Click OK and Save. You will see in the log window:

/usr/bin/tv_grab_dvb_plus: Parsing completed. XML contained “xx” channels, 0 events, 0 new events injected in EPG.

Where “xx” is the number of channels on the multiplex tuned at the time.

However, as discussed above, running /usr/bin/tv_grab_dvb_plus with no options runs default of dvb input/tuned mpeg stream and retrieves only now and next data. Attempted to solve this by changing the default values in the source code of tv_grab_dvb_plus. In a terminal (or nautilus) navigate back to where you extracted the tarball. In here is the src folder. In the src folder is a file called main.cpp. Open this file and find line nr 59. Change: int format = DATA_FORMAT_DVB; to int format = DATA_FORMAT_SKY_UK;. Save the changes, build and install again. To check if successful, repeat step 2. Test C above; however this time you need not run the command as $ tv_grab_dvb_plus –f skyuk just $ tv_grab_dvb_plus will suffice as we have changed the default. The output is exactly the same – i.e. 14 days EPG data displayed in the terminal window.

Go back to Tvheadend GUI. Configure->XML-TV. Re-Select the “EIT data from DVB, Freesat, Sky or MediaHighway stream” from the drop down box and save. You will see in the log window:

/usr/bin/tv_grab_dvb_plus: Parsing completed. XML contained 0 channels, 0 events, 0 new events injected in EPG

This occurs almost immediately suggesting that the user ‘hts’ that runs /usr/bin/tv_grab_dvb_plus encountered an error… how to fix this… any suggestions???

I hope this all makes sense!

Many thanks,
Guy.

#3

Updated by Hein Rigolo almost 13 years ago

If you already have a correct and valid xmltv formatted file and you want to load that into tvheadend then you can use tv_grab_file (http://code.google.com/p/tv-grab-file/)

If you use an xmltv formatted file, and you do not which to use any eit data in tvheadend, then disable the eit data on the channel. Tvheadend tries to match the xmltv contents with the eit data, and if there are no matches, it will not update the epg.

Also keep in mind that if you want tvheadend to call a grabber that the configuration file for that grabber should be in the hts user directory. The grabber will run under the same user as tvheadend.

#4

Updated by Paul Owen almost 13 years ago

Guy - aside from using tv_grab_file you may also need to alter the tv_grabeit src to prevent it dumping <!-- --> comments in the middle of xml tags - just search for <!-- and --> and remove them in the source.

While this "does" work it is in my opinion far from ideal. Firstly it requires the use of the frontend - so TVheadend needs to be shutdown or "remotely" tuned to the required frequency (unless I'm missing something?). This in turn requires lots of faffing around with scripts to check the status.xml of tvheadend to see if it's busy, set to record in the next few minutes, etc. On systems with two or more tuners this is often going to be overkill when just one tuner may be busy (not having a dual tuner system I'm assuming tvheadend locks both/all frontends).

It seems to me that a far cleaner solution remains integrating support for grabbing data directly into TVHeadend like the Myth patch, EPGcollector plugin for dvbviewer, EEPG for vdr, etc. This applies to any/all broadcast systems offering EPG data; freesat, opentv (SkyUK/DE/IT), etc. It's really no different than including EIT EPG support.

By including comprehensive EPG support directly within TVHeadend you can automate grabbing of the data - single tuner? grab data when idle, at startup, at shutdown or even at specific times if a capability to set such a parameter were included. Dual tuner? Grab data on schedule, when idle, blah blah. It can go further - automatic naming and numbering of channels, etc. since many of these EPG's include the logical channel number and full name (OpenTV for SkyUK certainly seems to). A very nice potential solution for a great many people - install tvheadend, enable specific EPG support, scan the muxes, boom - channels scanned, numbered, named, epg grabbed regularly - and all consistent with the satellite boxes they would otherwise be using. Xmltv is a very nice solution for parsing external sources of EPG data - but not for data available from the broadcast source - for those it just seems klunky.

If I had the knowledge necessary to implement this myself I of course would. But my knowledge of C/C++ is kinda limited - I'd be very willing to help out as/where necessary though. I remain hopeful that TVHeadend will one day soon include this functionality.

#5

Updated by Guy Richie almost 13 years ago

Hello Paul,

Couldn’t agree more. I too found that the ‘category’ xml tags were commented (<!-- / -->). I did attempt to look through the source code of tv_grab_dvb_plus just before x-mas, thought I found a solution but unfortunately it didn’t work; the <!-- & --> tags were still there. My programming skills are too very limited. It is good to know that you managed to get the tv_grab_dvb_plus xml output file compatible with tv_grab_file too by ‘Find and Replace’ in a standard text editor.

Unfortunately yes, you are correct in stating that for tv_grab_dvb_plus to work it needs a TV card to be tuned into an appropriate EIT source. By default TvHeadend does appear to lock all frontends. I do recall reading somewhere that you can ask it to only open each adapter on demand or utilise only certain adapters (TBC). However, like you say it is very a messy and cumbersome procedure that may indeed put others off.

The “logical channel number” you mention is very interesting, I will look that up.

Overall I agree that despite this method is working, it is a task that could be automated as you describe. Thank you for your post.

#6

Updated by Adam Sutton over 12 years ago

Just noticed this while I was googling some stuff. I really need to go through the EPG related issues in here.

I just wanted to point out that this is work in progress and I do now have a tvh branch which includes opentv support, though its still under development.

see github.com/adamsutton/tvheadend

Adam

#7

Updated by Adam Sutton over 12 years ago

  • Status changed from New to Resolved
  • Assignee changed from Andreas Smas to Adam Sutton

New EPG code, including Freesat support, will be merged this week. So going to mark this resolved.

Adam

#8

Updated by Adam Sutton over 12 years ago

  • Status changed from Resolved to Fixed

Also available in: Atom PDF