HDSurfer Plug-in for HDHomeRun

Thanks for the info, you're right, too bad, I hadn't seen that. I have a HDHR3 myself.

When the new HDHR4's with built-in transcoding comes out in the next couple of months, it should be possible to do a really nice Plex channel (that doesn't tax the CPU at all) :)

Yea, I was researching using Wallop but for the reasons mentioned I decided against it... I'm thinking that once the HD Surfer plug-in becomes "stable" I'll add options to allow you to choose a backend so that HD Surfer would work with whatever backend (Wallop, HDSurferWave, HDHR4-direct, etc) you have it configured to use.

I think that the biggest thing right now is trying to figure out how to "scale" the plug-in so that it doesn't 'just work', it actually plays nice with the HDHR devices and provides the user with a rich video experience as with other plug-ins...

On another note, I'm hoping to get an updated version of both HDSurferWave and HD Surfer out in the next couple days that supports some type of better deinterlacing (fyi: I've found a way to duplicate the interlacing issues people have been reporting so I'm able to actively work on a fix) and it also includes another 'goodie' I've been testing for the past 3 weeks...

PlexPass PHT 1.0 RC1 was released today. I was excited and decided to take it for a spin. Instead of playing something from my library, the first thing I tried was live TV with my new favorite channel – HDSurfer.

The TV channel interface has changed, but still manageable. I go to fire up a local broadcast station and nothing. I checked settings, HDHomerun_Config Utility and last build of PHT 0.9.10.1.20. It works, but not RC1.

Messing around trying to see if I could get some information about the stream, I pressed the "P" key on the keyboard and it started.

*** Update: looks like hitting the "enter" key twice works too. *****

I suspect that the stream may be treated as playlist and after you select the channel, you need to start the playlist?

I wanted to share my experience to help others.

-End

PlexPass PHT 1.0 RC1 was released today. I was excited and decided to take it for a spin. Instead of playing something from my library, the first thing I tried was live TV with my new favorite channel – HDSurfer.

The TV channel interface has changed, but still manageable. I go to fire up a local broadcast station and nothing. I checked settings, HDHomerun_Config Utility and last build of PHT 0.9.10.1.20. It works, but not RC1.

Messing around trying to see if I could get some information about the stream, I pressed the "P" key on the keyboard and it started.

I suspect that the stream may be treated as playlist and after you select the channel, you need to start the playlist?

I wanted to share my experience to help others.

-End

Thanks @End I have put the note about PHT 1.0 RC1 on my "TODO" and I'll take a look as time permits... hopefully it's something simple.

Working on CentOS 6.4.  I'm not sure easy_install vlc worked though, it complained every time I ran it.  But it runs anyway.

The only complaint I have is that the channel scan doesn't order the channels in any meaningful way, but that's really an accessibility fix than it is a usability fix.  I can fix up the XML file myself later.  I'm sure a usable UI will come later.  Right now, I'm just happy that it works.

Working on CentOS 6.4.  I'm not sure easy_install vlc worked though, it complained every time I ran it.  But it runs anyway.

The only complaint I have is that the channel scan doesn't order the channels in any meaningful way, but that's really an accessibility fix than it is a usability fix.  I can fix up the XML file myself later.  I'm sure a usable UI will come later.  Right now, I'm just happy that it works.

@SunnyD Thanks for the confirmation on CentOS 6.4! The zip file ships with both of the vlc and PyHdHomeRun python modules so things should still work even when the easy_install fails and vlc is installed on the system. I put the commands in the README to see what kind of feedback I would get since it requires some additional packages to be installed. I'll put some verbage in the next ALPHA that mentions the commands may not be required for the system to work.

Thanks for the tip on channel sorting... I only have about 10 channels I'm testing with and I just manually adjust the xml file. I've put it on the roadmap to add some more channel sorting and naming features. Thanks!

TwoOneSix, hope you'll release a new version soon, with deinterlacing support, etc. :)

Thanks

TwoOneSix, hope you'll release a new version soon, with deinterlacing support, etc. :)

Thanks

I've been testing some of the changes for the past week or so... sometimes it seems like the interlacing issue is fixed and at other times it doesn't seem to be fixed. It's really puzzling to me but I do believe I've found a way to tell VLC to force deinterlacing (transcode) but the process chews up a lot of CPU since both VLC and Plex transcode the stream before it hits the client... it also causes a slight quality hit to the video.

At any rate, I'll do my best to make some time to wrap up the current code so I can package an ALPHA release.

Hi all,

I'm using Ubuntu 12.04.3 here and I set up an upstart script that loads HDSurferWave on boot in the background.

Here's what I did:
- Copied the HDSurferWave folder into /usr/bin

- Created a VERY simple script inside the HDSurferWave folder called "HDSurferStart.sh":

cd /usr/bin/HDSurferWave
python /usr/bin/HDSurferWave/hdsurferwave.py start

- set it to executable

- create a file in /etc/init called "HDSurferStart.conf":

# HDSurfer
#
# Start HDSurferWave Live TV Server

description “Start HDSurferWave Live TV Server”

start on runlevel [2345]
stop on runlevel [!2345]

exec /usr/bin/HDSurferWave/HDSurferStart.sh

Give the machine a reboot and it should just load up in the background without having to be logged in, etc.

Hope this helps!

HDHomeRun Prime on sale at Amazon for $99.  I'm going to jump into the fray and try this out.  Thanks for the development of this very promising channel!

Alright, sorry for the delay in updates recently but here is ALPHA 0.3. This wasn't intended to be a big release but since I waited so long and worked a lot more on the code it ended up becoming a pretty big update. Here are some of the changes:
  • Gave an option to enable experimental deinterlacing flags to VLC (manual change, line 53 of hdsurferwave.py)
  • Plug-in now shows the active channel (shown as a *) and allows multiple clients to view the same stream at the same time
  • Updated the handling of channel scan XML
  • Basic HD Surfer Plex Plug-in code changes
  • Hack together a current(?) show channel listing using the TVRage API
  • Major overhaul of HDSurverWave codebase

Even if you're upgrading, make sure you read the README file as it includes information about replacing ALPHA 0.2 and such. Also, since there was some major code changes, backup your existing folders in case 0.3 doesn't work right and you need to go back to 0.2.

Download here: [sharedmedia=core:attachments:22360]

@TwoOneSix

Thank you.

Running latest beta of PMS on Mac OS 10.7, and official PHT 1.0 on a Mac OS 10.6.8.

The start up script is nice. However it failed for me on the channel scan, but offered the fall back. I recycled my version 0.2 channel.xml.

I added the tv_data_name to the channels.xml. The Display TV Data settings did not stick in PHT, but did in Plex Web and carried over to PHT. I see the TV listings in web, but not in PHT.

Image below is Plex web over PHT watching the same channel.

Still my most used plugin. Thanks again.

-Endweb-pht.jpg

TwoOneSix,

Thanks a lot for the ALPHA 0.3 release :)

Two questions:

1. With TV data this plugin will be perfect, unfortunately TV channels from Denmark aren't supported on tvrage.com.

Do you think that you could add support for TimeFor.TV XML (http://en.timefor.tv)? - they support more than 2000 european TV channels, and they have XML EPG feeds.

Here is an example of how the EPG xml is formatted:

https://www.dropbox.com/s/2ufp6lcrfem24st/epg.xml.zip

2. What is the command that is send when I click "Stop Live TV" in HD Surfer on Plex Web?

I would like to do a simple bash script on my server that sends this command automatically every night, when I know I don't use the TV anymore.

Thanks

TwoOneSix,

Thanks a lot for the ALPHA 0.3 release :)

Two questions:

1. With TV data this plugin will be perfect, unfortunately TV channels from Denmark aren't supported on tvrage.com.

Do you think that you could add support for TimeFor.TV XML (http://en.timefor.tv)? - they support more than 2000 european TV channels, and they have XML EPG feeds.

Here is an example of how the EPG xml is formatted:

https://www.dropbox.com/s/2ufp6lcrfem24st/epg.xml.zip

2. What is the command that is send when I click "Stop Live TV" in HD Surfer on Plex Web?

I would like to do a simple bash script on my server that sends this command automatically every night, when I know I don't use the TV anymore.

Thanks

Yea, adding those shouldn't be a problem. The next time I get to sit down with the code I'll download the example you posted and look more into that guide data service. The guide data delivery code is already written so I would just need to add some code for that API, no problem.

The command below tells the device to simply stop streaming to HDSurferWave. The only problem you'll encounter with running the command directly is that the HD Surfer plug-in will continue to show the (*) next to the last channel tuned since it doesn't know the stream has stopped... the fix for that is to hit the stop button in HD Surfer or to restart the hdsurferwave script as both of those would clear the flag.

hdhomerun_config $DEVICE_ID set /tuner/channel none

I'll make note of this and maybe I'll add a flag to the backend that you could call to handle that process a little more cleanly for you... there are only a couple of milestones for the 0.4 release so hopefully it will be out sooner rather than later.

@enduser

Yea, I disabled the settings and 'stop' buttons on iOS and Android because they didn't work anyway so I need to disable the settings display options on PHT, too. :-( For some reason the only way I can get them to work reliably is on PlexWeb and to 'fix' that I need to add some code to the HD Surfer plug-in that I'm not sure I want to add yet as it might conflict with the ability to add more tuners in the future... I need to chew on that one until I figure out about the multiple tuners... which, yes, should be coming in a future release.  :)

Has anyone tried uncommenting the deinterlacing flags yet? I'm curious to know how it looks for others. I tried it on my setup but I would rather deal with the slight interlacing then the video quality hit... also, if anyone tweaks those transcoding settings and gets better results please feel free to post here for others.

Having issues getting this to work on Linux Mint 64bit on a PC (NOT MAC).

Error: Cannot Load M3U8: 404 not found

Python: 2.7.3

Plex Media Server: 0.9.8.10

I'm setting up Alpha 0.3.

Using an HDHR 3

I had an error installing vlc python modules: (sudo easy_install vlc)

Searching for vlc
Best match: vlc 0.0.1
Processing vlc-0.0.1-py2.7.egg
vlc 0.0.1 is already the active version in easy-install.pth
 
Using /usr/local/lib/python2.7/dist-packages/vlc-0.0.1-py2.7.egg
Processing dependencies for vlc
Searching for appscript
Reading https://pypi.python.org/simple/appscript/
Best match: appscript 1.0.1
Downloading https://pypi.python.org/packages/source/a/appscript/appscript-1.0.1.tar.gz#md5=6447b3bef966613bb5ddaedfe32c4558
Processing appscript-1.0.1.tar.gz
Writing /tmp/easy_install-CaLL1i/appscript-1.0.1/setup.cfg
Running appscript-1.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-CaLL1i/appscript-1.0.1/egg-dist-tmp-m09y_a
In file included from appscript_2x/ext/ae.c:12:0:
appscript_2x/ext/aetoolbox.h:17:27: fatal error: Carbon/Carbon.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
 
NOTE: Googling reveals Carbon appears to have something to do with MAC/Apple products?!?  This isn't a MAC/Apple device/PC/Server...
 
I had *NO* other errors at any point.
 
The HDSurferWave is running:
python hdsurferwave.py start
 
Enter the following info into the Plex HD Surfer v0.5 plug-in preferences:
---------------------------------------
        Stream Server IP: 10.0.0.100
        Stream Server Port: 23013
        Communication Port: 8000
        HDHomeRun ID: 10321B9D [FOUND: 10.0.0.202]
        HDHomeRun Tuner: 1
---------------------------------------
HDSurferWave ALPHA-0.3 is now up and running!
 
Automatic channel scan worked great!
 
However when I try to view a channel, I get the "Cannot Load M3U8: 404 not found" error.
 
HDSurferWave still says it is up and running, with no output.  Not sure what's going on.  Can anyone assist?
 
Error(s):

Tried playing video through Roku Plex front end - Says it can't load the stream.

Tried playing video through Plex/Web - Error: Cannot Load M3U8: 404 not found

 
Troubleshooting:

Tried setting tuner to 0 - Same issues.

Tried setting tuner to 1 - Same issues.

Tried setting server ips to 127.0.0.1 instead of eth0 IP - Same issues.

Tried changing all the ports to something else (xmlrpcport = 60110, tuner0port = 60111, stream0port = 60112) - Same issues.

Resolved:

So, I read the instructions so many times (Readme) that I thought I had everything covered.  Then I reread it again and _really_ paid attention to every detail.  Apparently I missed this detail:

NOT WINDOWS:
1. You must have VLC installed on the server running HDSurferWave
2. You must have the hdhomerun_config binary (or link [ln -s]) in the same location as the script OR callable in your path
NOTE: #2 will go away from the requirements at some point but further development is needed.
 
See the bold/underlined.
 
Lesson Learned: hdsurferwave.py will _not_ give you any errors/warnings that it doesn't have the hdhomerun_config in the local directory.  It silently fails.
 
Solution was to:
sudo apt-get install hdhomerun_config
Then go into the directory with hdsurferwave.py and type:
sudo ln -s /usr/bin/hdhomerun_config
 
Solved.
 
Now to attempt to fix the awful quality issues!
And the fact that it won't play on the Roku Plex front end application.

Rotide, I had similar problems with Mint.  First, you don't need to run the easy_installs at all, so don't worry about that.

Try changing the port that it runs on.  I use 8989 and it fixed a similar issue I was having.

Latest alpha working great here, although the program information is just wrong.  I put in "ABC" "CBS" etc in my channels file and it's grabbing info, but it's incorrect info.

Rotide, I had similar problems with Mint.  First, you don't need to run the easy_installs at all, so don't worry about that.

Try changing the port that it runs on.  I use 8989 and it fixed a similar issue I was having.

Thank you for the suggestion, unfortunately it didn't resolve my issue.

UPDATE: RESOLVED! See original post for fix details.  Essentially I didn't read the README.. or at least I didn't pay attention...

I changed all the ports to something in the 60,000 range.

xmlrpcport = 60110
tuner0port = 60111
stream0port = 60112
 
python hdsurferwave.py start
 
Enter the following info into the Plex HD Surfer v0.5 plug-in preferences:
---------------------------------------
        Stream Server IP: 127.0.0.1
        Stream Server Port: 60111
        Communication Port: 60110
        HDHomeRun ID: 10321B9D [FOUND: 10.0.0.202]
        HDHomeRun Tuner: 0
---------------------------------------
HDSurferWave ALPHA-0.3 is now up and running!
 
Same issue...
Anything else I can attempt?
 
UPDATE: RESOLVED!  See post #74 for details.
 
Although, it won't play on Plex for Roku.. anyone else have that issue or know how to resolve it?

Thank you for the suggestion, unfortunately it didn't resolve my issue.

UPDATE: RESOLVED! See original post for fix details.  Essentially I didn't read the README.. or at least I didn't pay attention...

I changed all the ports to something in the 60,000 range.

xmlrpcport = 60110
tuner0port = 60111
stream0port = 60112
 
python hdsurferwave.py start
 
Enter the following info into the Plex HD Surfer v0.5 plug-in preferences:
---------------------------------------
        Stream Server IP: 127.0.0.1
        Stream Server Port: 60111
        Communication Port: 60110
        HDHomeRun ID: 10321B9D [FOUND: 10.0.0.202]
        HDHomeRun Tuner: 0
---------------------------------------
HDSurferWave ALPHA-0.3 is now up and running!
 
Same issue...
Anything else I can attempt?
 
UPDATE: RESOLVED!  See post #74 for details.
 
Although, it won't play on Plex for Roku.. anyone else have that issue or know how to resolve it?

You bring up a great point... I need to add an option to look for the binary before the script executes since it currently required that to function... sorry for the confusion but thanks for the feedback, I'll have something rough together for the next ALPHA release.

If you can see the stream on PlexWeb you should be able to see it on the Roku. What version of the Roku do you have? I have tested on the Roku 2 XD and the Roku 3...

Latest alpha working great here, although the program information is just wrong.  I put in "ABC" "CBS" etc in my channels file and it's grabbing info, but it's incorrect info.

That's interesting... I wonder if TVRage isn't giving you the correct data for your location. Can you tell what is incorrect about the info? Is the time of the programs off or are they just completely wrong? What country code did you use during the setup? Just trying to see if it's something easy to track down.

If you can see the stream on PlexWeb you should be able to see it on the Roku. What version of the Roku do you have? I have tested on the Roku 2 XD and the Roku 3...

Roku 3.  I'll attempt troubleshooting step #1 and give it a reboot.  I'll update this post with the results.

Update: Reboot didn't help.

I'm trying to install this on Ubuntu 12.04 with Python upgraded to 2.7.5.  Unfortuantely it exits the intial HDSurferWave script because it can't import the required scripts even though they are in the same directory.  Can anyone help me understand this?

themorey@Media-NAS:~/Downloads/HDSurfer-ALPHA-0.3/HDSurferWave$ ls
gconfig.py   hdhomerun_config  libhdhomerun.py   libhdswutils.py   vlc.py
gconfig.pyc  hdsurferwave.py   libhdhomerun.pyc  libhdswutils.pyc
themorey@Media-NAS:~/Downloads/HDSurfer-ALPHA-0.3/HDSurferWave$ python hdsurferwave.py start
FR14. Make sure libhdswutils.py and gconfig.py are in the same location as this file.
themorey@Media-NAS:~/Downloads/HDSurfer-ALPHA-0.3/HDSurferWave$