[mythtvnz] Channel Icons

dmoo1790 at ihug.co.nz dmoo1790 at ihug.co.nz
Wed May 21 07:06:30 BST 2014



On 21/05/2014 16:45, Tony Sauri wrote:
> On 20/05/14 22:30, Stephen Worthington wrote:
>
>>
>>>
>>> You mention lyngsat so I guess you source your tv from sat.  I am a 
>>> dvb-t consumer so I have taken a different approach.
>>>
>>> The mheg stream contains icon images which are used ( I assume ) by 
>>> the freeview guide displays.
>>>
>>> So as I am already grabbing my epg from mheg I also grab the icon 
>>> images and then process them with a little ImageMagick script.  As 
>>> for naming convention i decided on using the mheg service id so the 
>>> TV One icon is called 1200.png.
>>>
>>> I see the benefits of my approach as follows:
>>>
>>> I automatically get icons for all new channels
>>> I automatically get any changed icons if a chanel rebrands
>>>
>>> I feel it is a total soution for dvb-t users but does not address 
>>> sky channels or those people that use freeview sat.
>>>
>>> Tony
>>
>> That is an excellent trick.  What software are you using to grab the
>> icons?
>>
>
>
> OK ... A lot more interest than I had anticipated
>
> Before I start here is a link to a pair of directories that contain
> the freeview images grabbed from the MHEG stream and the icon images 
> I
> have created   ...   best to make sure you are happy with the end
> result before you waste any time :-)
>
> https://www.dropbox.com/sh/8qhgulvsgk6rg9x/AAAulIpjftFOwDQIlUcnG9Uta
>
>
> Now just a little history ... back in 2011 I wrote a small perl proc
> as a proof of concept for grabbing the MHEG EPG data and parse it.  
> At
> the time I could not spare enough time to the effort and SolarVox 
> took
> the initiative and eventually produced and announced the MHEG2XMLTV
> project on SourceForge.
>
> So far so good but I always thought there could be a better
> implementation and have been quietly working on my original idea
> (Which is a work in Progress).
>
> I use rb-download to actually grab all the data in the MHEG Carosel
> and store it on the local pc.  This choise is not without it's 
> Issues:
> A) The latest source as downloaded from sourceforge will not compile
> and the raised bug is marked "Will Not Be Fixed".  The bug report
> however gives a work around and I have patched the source so it
> compiles and runs at least in Xububtu 12.04.  I have not tried it in
> 14.04 yet.
>
> If anyone decides to go this route I will provide a copy of my
> patched version.
>
> B) rb-download was not written to be run in an unattended scenario
> and has to be cancelled   ... not the best when we want to run via
> cron at 3:00am.
>
> So I have written a wrapper for rb-download (in Perl which has been
> my language of choice for a long time and I am too old to devote
> enough time to learn Python)
>
> In essence the wrapper does the following:
>
> 1)  Determines the most suitable physical tuner to use for grabbing
> by querying tuner status and scheduled recordings looking for a tuner
> that can be guaranteed to remain in a predictable state of doing
> nothing or recording a programme for at least the next 200 secs.
>
> 2}  Having made that decision it schedules the execution of
> rb-download in a separate thread and then monitors the files created
> by rb-download.
>
> 3)  When all required files are on disk (which takes less than 60
> secs on my system) the master thread kills the rb-download thread and
> then cleans up.
>
> My experience with the above process is very good but in the last 18
> months there have been 2 instances where the processing has gone awry
> and I have not yet been able to trace the reason.
>
> I am currently thinking of implementing a watchdog timer to cancel
> the whole job if it exceeds 180 secs.
>
> In the context of grabbing the freeview icons we are finished.  Just
> remains to run some ImageMagick to reformat the captured images to
> what we want.
>
> I am more than happy to share the code I have developed but need a
> day or two to cleanup some of the uglier stuff that I buried in there
> as I was in a rush at times.
>
> Perhaps people wanting to share the code could message me off-list
> and I will get back to them by end of the week.
>
> Regards
>
> Tony
>
> ___________________________________________

Thanks for the detailed explanation Tony. I'm in no hurry. I must have 
another look at the stuff rb-download downloads to see if I can figure 
out where the icons hide in the MHEG data. Not going to happen any time 
soon given other commitments. :)




More information about the mythtvnz mailing list