Jump to content

Help with LiveTV


gte709p

Recommended Posts

I've been having trouble with my LiveTV.  It's been happening for awhile now, but just now getting around to looking at it.  I want to stream LiveTV through the web browser.  When I try to select and play a channel in the browser, usually I just get a spinning circle, or no activity at all.  I spent some time looking at it today, and finally got one channel to load and play.  However, when I stopped playing that channel, then returned to try and play another channel, I received an error: "There was an error playing the video.  Please ensure there is an open tuner available".  When I check the ServerWMC log, I can see where the LiveStream is requested by the client, and it also looks like the client requested the LiveStream to close, which I did not.  I am using a Ceton InfiniTV 6 tuner card and verified all the tuners are online.  I use Windows Media Center on the backend and I can play live TV through there, so I'm assuming it has something to do with my ServerWMC settings.  I've attached an Emby log as well as a ServerWMC log and a couple transcode logs.  Any assistance is appreciated.  Thanks.

ServerWMC.1.zip

Link to comment
Share on other sites

I just had a look through your logs and I think this line is the cause:

 

tartWcfHost> error: System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL http://+:9180/serverwmc.stream/ because TCP port 9180 is being used by another application. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process

 

Are you sure that you don't have another application that is using port 9180 from this error it is saying that you have.

Link to comment
Share on other sites

Thanks for the reply, denz. I noticed that the other day.

 

I ran netstat and tracked down the PID for the image that was using 9180. Looks like it is running in System. Since that is OS critical, I can't just stop it without crashing the computer. Unfortunately I don't know how to adjust the port for whatever service in there is using that port. Is there a way to adjust the ports that server WMC listens for instead?

In the Server WMC > General tab, the Port number for client connection is listed as 9080, but under Http Service, the URL has the port listed http://IPADDRESS:9180. Should these be the same port? If not, what is the difference?

Link to comment
Share on other sites

Another twist: So I had a look at the config.xml file in the serverwmc programdata folder and there is a setting there for <WcfPort>9180</WcfPort>

I adjusted this to port 9185 I instead and it updated the URL under the Http tab of ServerWMC. Then I ran another netstat to see what was listening on 9185 and System is now using 9185 port instead of 9180. So if adjusting the ServerWMC config file also adjusts the listening port, I'd imagine that something related to ServerWMC runs under System image. Make sense to anyone or am I way off base?

Link to comment
Share on other sites

Did you trying uninstaling serverwmc and also delete the folder of serverwmc i think it is located in program data and then reinstall.

 

I have attached couple of screenshots when you click on the status webpage do you get a webpage

 

Also when you changed the port did you close serverwmc and when you restarted it did you get a windows notification ucl that command netsh and you need to accept the changes this is in win 7

 

Restarting the pc also helps

 

56c87c2e885b1_Capture1.png

 

 

56c87c7397674_Capture7.png

 

 

 

56c881975f528_20160220_150305711_iOS.jpg

Edited by denz
Link to comment
Share on other sites

Hi denz,

I'll try my best to answer.

I did uninstall ServerWMC, made sure program files and programdata folders were removed, then reinstalled v12.28. After reinstall, I enabled Http and UAC prompted for the necessary firewall changes. I checked netstat again and noticed that port 9180 was being used again by System. I can only imagine this is some normal backend of the ServerWMC process, even though the listening port is set to 9080.

ServerWMC was having trouble locating my tuners. It kept throwing a fatal error and closing. Resetting the tuners didn't seem to help. I checked WMC and found it was crashing and required me to run as administrator for it to open, which shouldn't have been the case. I subsequently reinstalled WMC as well, ran through live tv setup and verified live tv was working on WMC. ServerWMC was then able to open without crashing and located my tuners. I'm getting a live tv stream through Emby now, but it's still very hit or miss. If I start a stream, I can see the request reach ServerWMC and the tuner gets allocated, then I see the .ts file get created in the default Recorded TV path, and the subsequent transcode files start writing to %appdata%\Emby\temp-transcode, but only sporadically does it actually start to play on the client. If I'm lucky, I may get one steady stream, but if I close it and try reopening it usually errors out, telling me no tuners are available, even though I see tuners on ServerWMC and live tv works fine through WMC. I'm just not sure where the bottleneck is here, but at least it's playing now. If it will play once but not subsequent times, could this be a resource issue on the PC? Tuner drivers are up to date as well as the serverwmc program, Emby and the serverwmc plugin. With six available tuners i wouldn't expect the kind of experience I'm getting. Any thoughts what to try next? Let me know if you'd like some more logs.

Link to comment
Share on other sites

One thought, could it be that the PC is not releasing port 9180 properly? I was thinking back on your earlier post that 9180 was in use. I think it is ServerWMC using that port, because when I changed the port in the config file to 9185 for testing, the System image also started listening on that port, so I think they are related. Maybe when I close my stream, something is not properly releasing 9180 or not fast enough, so when Emby tries to get the stream again it can't connect.

Link to comment
Share on other sites

Something is definitely not right it looks like that port is not being released It almost feels when I look at your serverwmc logs that there are two instances of serverwmc running because you have a lot of these   Failed to delete old log 'ServerWMC_Service_20160210.log': Access to the path 'ServerWMC_Service_20160210.log' is denied.

 

 

Did you try installing the stable version 1225 and beta or stable version of emby. Because if you are using dev it says things can be broken.

 

Can you disable the firewall and antivirus that is one of the first things I do when troubleshooting.

 

I had issues with live tv with exact same error but found out it occurs in edge if I use firefox I don't get that error can you run it from the same machine that has serverwmc installed hopefully emby is installed on the same machine as me.

 

Untick start when windows start and then restart and try accessing live tv through emby web client or try using netstat just to see is now the port 9180 being used if it is then you are running as a service.

 

 

 

 

I also found this infor in kodi.wiki/view/ServerWMC could it be that you are running it as a service as well.

  • Installation
    • Stop ServerWMC app from the system tray if it is running.
    • Install ServerWMC_Service by running InstallService.bat (in the installed program directory) as administrator.
    • Edit the ServerWMC config file (%ProgramData%\VDSoftware\ServerWMC\config.xml) and change RunAsService=false to RunAsService=true
    • Start/Stop the ServerWMC service from the Windows Services admin interface.
    • Use the ServerWMC app (now aware that you are running the service) to maintain settings.
    • Restart the service whenever you make a change to settings via the UI or editing the config.xml manually
    • The port specified in the service must be manually opened in he firewall

Edited by denz
Link to comment
Share on other sites

I think you are on to something.  I did at one point have ServerWMC configured to run as a service, b/c I wanted it to start up when the computer booted so I wouldn't have to leave the user account signed in all the time, but it didn't work very reliably, so I stopped the service and started running it from the system tray again.  I thought when I uninstalled the program one of these past times that it also would have cleaned that up, but I checked services and it was still there.  I looked at the InstallService.bat file to see what it is doing and it looks like it registers the ServerWMC_service.exe under .NET, so I'm guessing that's why I was seeing this port 9180 opened, even when the system tray icon is closed.  I uninstalled ServerWMC again, removing the %ProgramData%\VDSoftware folder as well.  I also uninstalled .NET, and ran through my system registry for any entries relating to ServerWMC and removed them.  I also removed the open ServerWMC ports from the firewall.  Removing .NET of course breaks Emby, so I reinstalled it, then reinstalled the stable v12.25 of ServerWMC.  I checked netstat and I only see 9080 listening.  Then I reenabled the Http Service and ran netstat again and I see 9180 is listening now, again as part of the System image.  I toggled this a couple of times to verify the port closes when I uncheck it.  I've been able to run multiple live streams to my Roku player now, which I was unable to before without the entire Emby app crashing, but I'm still having inconsistent behavior on the browsers (I'm using Edge and IE11 on 3 different systems - Emby host tower PC w/ Win7, Windows tablet running Win8 and a Surface Pro w/ Win10).  Just as before, I can see the temporary Recorded file get created in the default Recorded TV folder, then I see the .ts files written to the Emby transcoding-temp folder, but then it closes back to the Video Error saying that no tuners are available.  I am wondering if this isn't a browser issue, as live TV has been working well through the Roku app ever since I reinstalled ServerWMC and .NET and cleaned up the vestiges of the ServerWMC_service.exe install.  I'd hoped that Edge would work more reliably because I don't like to install additional software when possible, but I'll install Firefox on one of the systems tomorrow and see if that works any better.  If it does, I think it's safe to say the problem is limited now to consistency with Edge and IE playback.  Unfortunate, but I can live with it.  Thoughts?

Link to comment
Share on other sites

Glad that you are getting closer.

 

ie I am not sure as I mostly use edge and firefox but I know it works perfectly using firefox inside my home and outside the home so I have sticked with firefox when using emby.  

Link to comment
Share on other sites

krustyreturns

Sorry, I've been offline for a week.  To help me get up to speed, can you post a current serverwmc log after you try to start a live stream?  Thanks.

Link to comment
Share on other sites

Here is the current log.  I just tried running Live TV from the host PC through IE11 and it kicked back with a Video Error - no tuners available.  Then I installed Firefox on the host and started the stream through there no problems.  Then I tried Edge from offsite - same Tuner error on the Video Stream.  Installed Firefox and got right in.  Looks like everything starts around 17:38 on the log.  Client sequence was:

IE on localhost (fail)

Firefox on localhost (success)

Edge on remote pc (fail)

Firefox on remote pc (success)

 

FYI, I chose not to import any settings for either install.

ServerWMC.log

Link to comment
Share on other sites

krustyreturns

Sorry then, about having you do that - I thought you were having problems with the web server.  The problem with playback not working in IE and Edge is not something serverwmc can control (it does that same thing for all browsers).

Link to comment
Share on other sites

Ok, so playback problems with edge and ie are known issues? Which browsers do you test with for ServerWMC? I know ie is typically slower in general with the Emby web interface. Are you saying ie and edge playback issues are to be expected?

Link to comment
Share on other sites

krustyreturns

I usually test with chrome, and occasionally firefox.  I've never had IE work and I have never tried Edge, but that it doesn't work too is not surprising.  IIRC there was a time when Luke said there was a trick to get IE to work - like some extension - but I don't know if that still the case (or even if I remember it right).

Link to comment
Share on other sites

Yeah, I seem to recall that as well. If it isn't tested in these browsers then I certainly don't expect an ideal experience in them. Edge is definitely faster than IE in general use for Emby playback, but it still feels like a beta browser compared to IE or Chrome or Firefox. I typically do live TV through my Roku anyway, which is running much better since cleaning up the serverwmc run as service remnants, so I should be fine. For the occasional time I want to watch on my tablet I'll just install chrome or Firefox. Thanks for taking a look. Maybe edge will start working better with future updates as it gets more mature.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...