Scraping TV text

Oatcake

Member
This is about a discovery that could lead to some new WebIF functionality, like being able to select a recording to play from the WebIF.

This discussion started in another thread, but please make any further posts on this topic here.

I found out a way to obtain most of the text that the Humax displays to the TV screen. This includes the media list screen, TV guide, setup menus, etc. You can tell which word is highlighted too. But the display position isn't available, so the captured text can look quite "mixed up" on first glance.
 
This is the first indication of a means to get menu feedback, and adds functionality not previously possible. Can you affect the on-screen text too?

I have managed to substitute one letter for another, but I don't think it's possible to change the length of the text that the Humax wants to display. So, for example, the sleep button's pop-up message could probably be changed to give a (very limited length) arbitrary screen message to the user from the customised software environment.
 
Nice find! Even just a file in /tmp which contains the currently highlighted text would make scripting things so much better.

BTW if you're a tekky person considering exploration of any of these ideas then be mega careful about using LD_PRELOAD on the humaxtv process. It is very easy to enter a cycle of immediate crash-reboot! (Lol I know this from experience.)

Don't I know it : ) That's why the multienv package also handles and breaks these loops automatically.
 
@af123 is this a project that you'd like to take forward?

TBH I've not looked at this research for maybe 3 years now. I got bogged down thinking about how to best get the information out. In the end I thought it would take more development time than it was worth so I put the project aside and forgot about it.

I was thinking along the lines of having a separate command line utility (talking to the scraper via some inter-process communication method). It seemed a bit naff to have an ever growing file in /tmp that contained all the screen blurb. But sometimes I might over-engineer things. Perhaps the simple "file in /tmp" is the way to go! I guess it could be truncated periodically if size is a problem.

There's probably a couple of source code files. And it won't be well written. I could PM them to af123 (or someone else) if that's OK. I'll check them for profanity first, and maybe try to add some comments :rolleyes:
 
Eventually I would hope to see a couple of new JIM APIs that could be used by packages to retrieve the current screen buffer and the the current selection and hopefully a display popup message service.
 
There's probably a couple of source code files. And it won't be well written. I could PM them to af123 (or someone else) if that's OK. I'll check them for profanity first, and maybe try to add some comments
You could post them on GitHub to allow for cooperative development
 
TBH I'm not comfortable about going that public with it, unless the other packages that use LD_PRELOAD to redirect "humaxtv" calls ( ir, redring, etc) are also open source. And if they are open source, then it would make sense to have this utility housed in the same place.
 
@af123 is this a project that you'd like to take forward?
Yes, I'd be interested. It can probably be plugged into the nugget framework fairly easily since that is already sitting inside the humaxtv process and has an IPC interface and CLI utility. On the other hand there is some merit to having it as a separate package.. but feel free to PM it over (or email to af123@hummy.tv) and I can certainly do something with it!
 
Just a quick post to say that af123 and some other trusted developers have the "core code" now.

I think it'll probably take a few days (at least) before they can plug it into their own framework, test, and then make generally available.

At that point then the real work will begin - writing higher level code that makes some use of the data. And I suspect this will all be written in JIM tcl, and it will all be openly available for anyone to customise or extend (if they so wish).
 
I think it'll probably take a few days (at least) before they can plug it into their own framework, test, and then make generally available.
Yes, let's say at least. The code is more complicated than I expected.

However, initial quick test last night was successful as far as it went:

Code:
humax# nugget ft reset
humax# ir MENU
MENU (0xe)
humax# nugget ft dump
Cursor: 0x3a
00000000: 43 68 61 6e 6e 65 6c 20 4c 69 73 74 54 56 20 47  Channel ListTV G
00000010: 75 69 64 65 56 69 64 65 6f 4d 75 73 69 63 50 68  uideVideoMusicPh
00000020: 6f 74 6f 48 55 4d 41 58 20 54 56 20 50 6f 72 74  otoHUMAX TV Port
00000030: 61 6c 53 65 74 74 69 6e 67 73 00 00 00 00 00 00  alSettings......
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
 
and, a couple of crash reboot loops later, I can find the ends of the strings:

Code:
00000000: 5e 43 68 61 6e 6e 65 6c 20 4c 69 73 74 5e 54 56  ^Channel List^TV
00000010: 20 47 75 69 64 65 5e 56 69 64 65 6f 5e 4d 75 73   Guide^Video^Mus
00000020: 69 63 5e 50 68 6f 74 6f 5e 48 55 4d 41 58 20 54  ic^Photo^HUMAX T
00000030: 56 20 50 6f 72 74 61 6c 5e 53 65 74 74 69 6e 67  V Portal^Setting
00000040: 73 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00  s...............

Code:
humax# nugget ft strings
Channel List
TV Guide
Video
Music
Photo
HUMAX TV Portal

Of course, it is nowhere near as easy as that, the initial menu is a special/clean case.
 
Last edited:
Looking good then. Imagine the chaos we will now be able to impose on other family members watching the telly in another room!

How about this: make a 5-second video "This presentation is brought to you by Hummy.TV", and fire it up at regular intervals! :devilish:
 
So the target is libfreetype.so.6.3.18 ? In which case I won't spend time trying that myself.

I wonder what the calling stack looks like, as FreeType is called both directly from humaxtv and also via libopera.so.

Also, might NEXUS_Graphics2D_Blit give a hint as to where the text is being displayed? Here is some compositor code using the Nexus graphics API.
 
Back
Top