Has anyone successfully hacked EyeTV to support HDHR Prime? - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 23 Old 01-03-2012, 06:55 AM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I'm curious to know if anyone has been able to successfully hack EyeTV to see and HDHR-Prime as an HDHomerun?

To a purely novice programmer, but heavy tech head this seems feasible esp since the HDHomerun and Prime share the same command line routines with the hdhomerun_config.

Officially speaking its a licensing and cablecard issue, I get that. But from a tech stack standpoint, and with Elgato responsible for the HDHomerun iOS app that works with the prime (Albeit it only with SD channels for any HDHR, which is the dumbest thing ever because iOS can't support the transport stream yet you put out an HD app, I lulz... anyway.)

It would seem to me that if you could either hardcode the detection of a Prime as an HDHR you would presumably be able to access any channel the Prime could access because all the commands the EyeTV would use for control presumably should be the same as the HDHR.

Updates as of 1.9.2012
  • HDHR-Prime tuning does work in EyeTV 3.4.3 and 3.5.4 (3.4.3 is recommended, your results may vary)
  • EyeTV uses its own compiled version of libhdhomerun, 3.5.4 appears more modified than 3.4.3
  • Make sure EyeTV can communicate to UDP port 65001 to 127.255.255.255 if you have a strict NAT or firewall config.
  • EyeTV auto-scanning appears to be functional reading from all QAM frequencies, I havent hacked it to read a cablecard xml file channel list which would make this process certainly faster.
  • EyeTV appears to check encryption of a channel on tuning, not displaying anything if its encrypted (regardless of whether there's an actual picture.) Originally I thought this information may be stored in the channel info it captures but it appears to be tied to the device configuration info stored in EyeTV.
  • Not yet known: the location of the device configs, or alternatively any interception of the checking for encryption.
tinycg is offline  
Sponsored Links
Advertisement
 
post #2 of 23 Old 01-03-2012, 08:55 AM
Member
 
rpineau's Avatar
 
Join Date: May 2005
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
The issue is not on how to talk to the HDHR Prime but how to tune channel as the tuning is totally different on the prime. It uses virtual channels and would require EyeTV to add this. Not really hard but it's extra code to be added in EyeTV. So no, you can't simply 'hack' EyeTV to support the prime.

Rodolphe.
rpineau is offline  
post #3 of 23 Old 01-03-2012, 01:45 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Bummer, I had forgotten about the fact that the prime uses vchannel now, but I had thought it also supported the original method through some legacy mode.
tinycg is offline  
post #4 of 23 Old 01-03-2012, 06:09 PM
Member
 
rpineau's Avatar
 
Join Date: May 2005
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Unfortunately there is no 'legacy mode' for tuning.
Rodolphe
rpineau is offline  
post #5 of 23 Old 01-03-2012, 09:24 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ok next question, looking at EyeTV it seems to use libhdhomerun to its dirty work, does anyone know if SD has updated libhdhomerun api to work with the HDHR Prime?

I couldnt tell at a glance tonight but wondering if someone had looked at it yet?

It would appear EyeTV does all its communication through what appears to be an unaltered older version of libhdhomerun under hdhomerun.framework.
tinycg is offline  
post #6 of 23 Old 01-03-2012, 09:36 PM
Member
 
rpineau's Avatar
 
Join Date: May 2005
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Elgato is using an old version of the libhdhomerun (the version they have doesn't even support tuner locking between machine). If SD release an updated version of libhdhomerun, Elegato will still have to recompile EyeTV with this new version (mostly to have the proper stub for the lib entry point, and who knows what they also put in the hdhomerun framework they use in EyeTV).
Rodolphe
rpineau is offline  
post #7 of 23 Old 01-04-2012, 05:52 AM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks, rpineau I guess I'll look elsewhere for my needs than trying to get something to work without the necessary programming chops. I've been using a couple other ways to get casual HDHR Prime viewing to my Mac while working and just really liked the simplicity of EyeTV as the optimal setup.

Seeing as they haven't put out a major release in a long time, closed their own forums, I guess TV on the Mac isn't what it used to be.

Back to streaming from VLC I guess, but that really takes the fun out of flipping through channels trying to find something to watch, unless anyone has any better alternatives. Hacking together MythTV for OSX is not something of huge interest to me from a casual / windowed viewing experience.
tinycg is offline  
post #8 of 23 Old 01-04-2012, 06:00 AM
AVS Special Member
 
Ted Todorov's Avatar
 
Join Date: Aug 2001
Location: NYC, NY USA
Posts: 1,378
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 11
Quote:
Originally Posted by tinycg View Post

Back to streaming from VLC I guess, but that really takes the fun out of flipping through channels trying to find something to watch, unless anyone has any better alternatives. Hacking together MythTV for OSX is not something of huge interest to me from a casual / windowed viewing experience.

Have you posted details on how you are streaming HDHR Prime via VLC?
Thanks!
Ted Todorov is offline  
post #9 of 23 Old 01-04-2012, 07:31 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ted I haven't but I can certainly share my current setup and the options I've been playing around with:

I have a 2009 Mac Pro with 2 HDHR-Primes...

Using hdhomerun_config, more info is available from SiliconDust here http://www.silicondust.com/hdhomerun...evelopment.pdf

Quick Example:
Code:
hdhomerun_config discover
Code:
hdhomerun_config  set /tuner/vchannel 507
Code:
hdhomerun_config  set /tuner/target udp://192.0.0.2:1234
You can setup a UDP stream which you can pickup in VLC, after setting a vchannel (virtual channel).. from the command line you can then stream to an ip and a udp port.

While its easy enough, I've found I prefer the ease of applications such as SinCast which supports HDHomerun and is a ridiculously powerful IP streaming app, it costs a few bucks but having talked to the developer dealing with a couple issues he's on the ball, friendly and very active.
http://www.sinderon.com/software.htm

(I have absolutely nothing to do with Sinderon beyond finding mention of them in a forum post on SiliconDust.)

I'll often just setup a stream to VLC through SinCast because its just a simplier way to accomplish the same task, and handles locking/unlocking of the tuner without you having to worry about setting the vchannel to 'none' when you're done so you don't lock the tuner out for your other apps.

I've used it either through a Windows 7 server I have setup, or a VMWare Windows 7 VM with no problem at all.

And while this solution works its hardly a 'flipping' through the channels experience like EyeTV, as each time you want to change the channel you have to stop the stream, change the channel and start a new stream.

I'll often watch TV, and have since the early days with an old STB TV Tuner card 15 years ago in a windowed environment while I work. While I enjoy the full screen media experience, its not as conducive to productivity as you'd think

It amazes me that in the age of hacking hardware to the nines that there isnt a great 'windowed' environment solution for the HDHomeRun Prime on OSX yet. Everyone rightfully so is working out home theater solutions, which is great, but that's a 30% use case for me, maybe 20%, most of my time I'd like to just have a TV window in the corner of my desktop streaming its entertainment goodness while I'm multitasking.
tinycg is offline  
post #10 of 23 Old 01-05-2012, 03:11 PM
AVS Special Member
 
qz3fwd's Avatar
 
Join Date: Sep 2005
Posts: 2,808
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 25 Post(s)
Liked: 29
Quote:
Originally Posted by tinycg View Post

Ok next question, looking at EyeTV it seems to use libhdhomerun to its dirty work, does anyone know if SD has updated libhdhomerun api to work with the HDHR Prime?

I couldnt tell at a glance tonight but wondering if someone had looked at it yet?

It would appear EyeTV does all its communication through what appears to be an unaltered older version of libhdhomerun under hdhomerun.framework.

You would have to translate the old channel tuning API which Elgato uses to the new virtual tuning mechanism the prime uses. This would at least allow Copy Freely flagged channels to be streamed. This would likely require a cross reference database of virtual channels to old channels. You would then modify the old tuning member function calls to lookup the virtual channel and forward it to the new virtual tuning API. Not necessarily a trivial thing to do, but possible.

I have considered implementing it myself, but dont want to bother with the mapping logic.

I think a recompile of the libhrhomerun to this custom version would work without having to touch the EyeTV binary, but I am not 100% sure how OS-X dynamic library linking occurs.
qz3fwd is online now  
post #11 of 23 Old 01-05-2012, 04:04 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
So its interesting that the tuning logic comes up again. According to those on the SD forums the Prime should be capable of tuning based on channel and program as well as vchannel.

Thread here where I ask about modifying a CLI script that originally started this train of thought, causing me to post here first, it would seem vchannel is preferred but channel/program is at least possible. http://www.silicondust.com/forum/viewtopic.php?t=11994

I looked into recompiling libhdhomerun on my mac last night but was getting a few errors so I haven't investigated that fully but the newest version of libhdhomerun from everything I've seen should be able to handle the prime and again based on the SiliconDust boards, also allow channel/program based tuning.

Looking at the currently compiled version of libhdhomerun in EyeTV, shown as 'hdhomerun' it does have a few @executable-path calls that would be different from a newly compiled version so I don't know how EyeTV would deal with that.

It's beginning to make me wonder if hdhomerun_config supposedly can handle a Prime like an HDHR, with the added methods supported by the Prime maybe their is a change to the discover api that I haven't noticed yet thats just not allowing the EyeTV to detect the Prime and that given its ability to see it like an HDHR and the Primes ability to handle encrypted channels you might be able to hack something together.

Or at least that was the original thought behind this thread, and seeing if anyone else more skilled was equally as interested in such an experiment.

Update:
Adding a newer compiled version and headers definitely breaks EyeTV with an 'unknown file type' error (which is odd because its a compiled .SO just like the one in EyeTV. Replacing the broken new one with the original but keeping the new header files actually produces an interesting result... Detection of a Prime as an HDHR, complete with seeing both tuners, and both Primes I have (only selecting one of course to test).

However, upon a full extensive Clear QAM scan that took about an hour, it appears the EyeTV is unable to pull any channels, which isnt all that surprising. I do however find it interesting that updating the headers allows for detection, its one step closer.
tinycg is offline  
post #12 of 23 Old 01-05-2012, 06:26 PM
Member
 
rpineau's Avatar
 
Join Date: May 2005
Posts: 44
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
EyeTV is 32 bit so make sure you compile libhdhomerun in 32 bit (use the -m32 flag on your gcc and linker option).
Rodolphe
rpineau is offline  
post #13 of 23 Old 01-05-2012, 07:51 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Good point, Rodolphe however compiling it at 32-bit still produces the same crash at start and same generic error message.

I just realized that my TV guide subscription has expired, not sure if that would fix the auto-tune? Not sure I want to drop money on renewing it if people don't think it's related.

The EyeTVAutoScan.log seems to pick up the Prime but doesnt seem to pull any channel data down despite running through 812 QAM Cable channels earlier, it just shows blank. Curious.
tinycg is offline  
post #14 of 23 Old 01-05-2012, 08:50 PM
AVS Special Member
 
qz3fwd's Avatar
 
Join Date: Sep 2005
Posts: 2,808
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 25 Post(s)
Liked: 29
Prime doesn't need channel scan since the cablecard provides the channel lineup.
Maybe if you can access the cablecard channel map and intercept the channel frequencies and return the appropriate response you could get the scan to work, plus channel scanning would be lightning fast.
qz3fwd is online now  
post #15 of 23 Old 01-06-2012, 05:34 AM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Yeah good point I hadn't really thought about that.

I dug into it more last night and came across a few things first the location of what appears to be EyeTV's Channel Listing XML is in

Code:
Library/Application Support/EyeTV/Shared
Along with the EyeTVEPG.db which of course is useless without a set of channels

Attempts to inject dummy channels just to see if they would show up in EyeTV didn't seem to work which leads me to believe something has to kick off parsing that xml file and it may not always be read at launch.

So the 2 current issues still seem to be seeing if we can inject a new/custom compile of libhdhomerun into EyeTV as I still think we'll need it for tuning logic. And second some way to inject that channel information into EyeTV not through 'auto-tune'.

EyeTV does have a 'Channel Set Import' but without having a way to map say CableCard.xml to the EyeTV XML format I don't think thats of much help right now.

Potentially if someone had an HDHR that could run a QAM scan and export the EyeTV channel list we may be able to create a map for the Prime.
tinycg is offline  
post #16 of 23 Old 01-06-2012, 06:31 PM
AVS Special Member
 
Joseph S's Avatar
 
Join Date: Aug 2001
Posts: 1,978
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 10
Here is an export for channel listings for HDHR (Original 2 tuner ATSC/QAM) and HDHR Prime 6 CC Tuner Box.

I have two HDHR Prime 6 CC boxes (12 Tuners) and two of the 2 tuner original HDHRs (4 tuners). I cannot get any QAM channels from the Prime to appear. It does appear that the channels are recoginzed with scanning, but show "This channel is currently not available." The digital cable stations have a lock icon beside them. For the most part, I disable the HDHR Prime tuners from EyeTV to avoid recording conflicts. I have attached an export of the EyeTV channel listings. If you could get this working it would be great. I love the standard design of the 6 CC tuner channel box as opposed to stacked EyeTV 500s x 3 and HDHR x 2 used previously. Thanks.

 

HDHR and Prime QAM Export.zip 74.548828125k . file
Joseph S is offline  
post #17 of 23 Old 01-06-2012, 08:31 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks Joseph this gives me some more to dig through tomorrow. Looking at it briefly its package contents contain a channellist.plist which seems like a bundled up version of ChannelList.xml, which makes sense.

Just so I have something to map against, would you mind telling me your zip code?

p.s. - I thought I was aggressive with 2 3-CCs (on sale when I got them so ended up cheaper than 1 6-CC), what do you use 12 cable card tuners for if you dont mind me asking?
tinycg is offline  
post #18 of 23 Old 01-06-2012, 09:06 PM
AVS Special Member
 
Joseph S's Avatar
 
Join Date: Aug 2001
Posts: 1,978
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 10
Main zip code: 89101

The reason for the the 12 tuners is that I wanted more than 6 tuners. At the start of TV seasons it frequently becomes difficult to record shows back to back and on multiple channels since EyeTV doesn't have any way to share a buffer for where one show overruns another. So for only 3 shows on 3 channels during 8 and the 9 o'clock hours you can require 6 tuners alone, especially with the ABC shows that in the past have run 5-7 minutes beyond the hour. The 6 tuner version comes in a nice stackable form factor which fits in the stereo rack easily. This is a nicer setup to maintain compared to the mess of wires I had before. To run 3 EyeTV 500s, 2 HDHRs, and an EyeTV 250 it required a sea of coax, firewire, Cat6, and splitters. Now I have just 4 coax and 4 cat6e and 2 power cables. I'm still using the old HDHRs because I really don't like WMC very much and use EyeTV for most of the local QAM network station recordings which I can play on any of my Macs.
Joseph S is offline  
post #19 of 23 Old 01-07-2012, 11:19 AM
AVS Special Member
 
qz3fwd's Avatar
 
Join Date: Sep 2005
Posts: 2,808
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 25 Post(s)
Liked: 29
Quote:
Originally Posted by Joseph S View Post

Main zip code: 89101

The reason for the the 12 tuners is that I wanted more than 6 tuners. At the start of TV seasons it frequently becomes difficult to record shows back to back and on multiple channels since EyeTV doesn't have any way to share a buffer for where one show overruns another. So for only 3 shows on 3 channels during 8 and the 9 o'clock hours you can require 6 tuners alone, especially with the ABC shows that in the past have run 5-7 minutes beyond the hour. The 6 tuner version comes in a nice stackable form factor which fits in the stereo rack easily. This is a nicer setup to maintain compared to the mess of wires I had before. To run 3 EyeTV 500s, 2 HDHRs, and an EyeTV 250 it required a sea of coax, firewire, Cat6, and splitters. Now I have just 4 coax and 4 cat6e and 2 power cables. I'm still using the old HDHRs because I really don't like WMC very much and use EyeTV for most of the local QAM network station recordings which I can play on any of my Macs.

Yeah-I hear you about a sea of cabling. I have 6 original HDHomeRun's, 1 6CC, 3 500's, 2 FireDTV S2's, 1 crummy TheTube Stick tuner, 2 Tvix 5000's, 1 Tvix 4000, 3 HDTV's 4 Tivo S3's/Premiere, Panny Tuner, Sony DHG, and a couple DVHS decks all with HDTV tuners. HDTV recording technologies from 1998 up to today. (Located in 3 rooms mind you)

So on top of coax dist amps for ATSC & QAM, HDMI & Component switching, and gigabit network, I have a firewire network connecting all of the firewire devices in the beedroom, office, living room.

I had to use powerpoint to map out each of the individual networks with soo many components.
qz3fwd is online now  
post #20 of 23 Old 01-07-2012, 12:47 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Both your setups trump mine.

Digging into this further it seems like EyeTV just marks encrypted channels as "Pay TV" and locks it because it doesn't believe they're viewable, a fair assumption given its official support.

Manipulating the key value for the 'logical channel number' in ChannelList.xml which it seems to set to '0' in this case to the actual vchannel value doesnt seem to want to stay on relaunch. Thus resetting to 0, keeping it 'locked' and doesnt appear when I poll the tuner to send a channel change request.
Correction: ChannelList.xml appears to be a passive xml file that gets loaded/re-loaded when a channel lineup is selected using data from:

Code:
/Library/Application Support/EyeTV/Locations
Joseph did you say that your Primes are detected by EyeTV out of the box? or just the HDHRs? (Because I had to hack EyeTV to even get the primes detected.)

Other World Computing is having a sale on HDHRs so I figured I'd pick one up which should be here Tuesday. At that point I should be able to do some more testing and try to setup some event listeners with EyeTV.
tinycg is offline  
post #21 of 23 Old 01-07-2012, 10:36 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
More info for people following along. I'll probably start updating the first post in the thread with this info as its figured out.

1. EyeTV 3.4.3 seems to provide a better out-of-box experience than 3.5.4 (the former is still available through EyeTV's support site).

2. Unmodified EyeTV 3.4.3 and 3.5.4 must allow connections on UDP port 65001 to 127.255.255.255 (which seems to be communicating with EyeTV Helper or something else.) I have a pretty strict firewall setup and didn't think of this until today.

Doing so allows EyeTV to actually pull QAM channels from auto-tune from the Prime. However, 3.5.4 will not properly allow tuning to several Clear QAM unencrypted channels that I am easily able to access through 3.4.3

3. EyeTV 3.5.4 did away with the libhdhomerun header files, or they're buried somewhere else leading me to believe that either my modification of 3.4.3's header files changed how it communicated with the Prime so that my firewall wasnt blocking it?

4. In 3.4.3 and sometimes in 3.5.4 I'm able to access premium channels which appear as Clear QAM but I'm 99% sure are encrypted copy-freely? Where other channels show 'encrypted', which I still believe is a flag set in the channellist.plist upon auto-tuning, and that if we can identify the values marking it as encrypted we may be able to allow tuning to it.

4. Yes, tuning works, the Prime is happily accepting 'channel : program' information from EyeTV by unblocking that port.
tinycg is offline  
post #22 of 23 Old 01-09-2012, 05:03 PM - Thread Starter
Member
 
tinycg's Avatar
 
Join Date: Dec 2006
Posts: 39
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Edited first post with general summary of updates and progress I've made from this investigation.
tinycg is offline  
post #23 of 23 Old 02-03-2014, 02:58 AM
Newbie
 
techweenie1's Avatar
 
Join Date: Sep 2010
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Sorry can someone explain how you allow connections on UDP port 65001 to 127.255.255.255? I have my firewall off on OS X (192.168.1.108) but my router (192.168.1.1) does have a firewall on it running. I have a port forwarding option that asked for a Port Protocol and IP, I was thinking something like the following attached screenshot but that doesn't seem to be working with EyeTV 5.4.3 as it doesn't pick up any of the channels except the two unencrypted ones through auto tune, EyeTV 5.5.6 and 5.6.x pick up the channels but they show up as Encrypted with the blue screen ScreenShot2014-02-03at4.55.27AM.png 63k .png file
techweenie1 is offline  
Reply HTPC - Mac Chat

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off