ServerWMC - Incorrectly reports All tuners for this channel are busy
#1
Hi there,

First off, let me say how impressed with XBMC (and the combination with ServerWMC) I am. I'm a longer term user of WMC - it having being our main living room TV and Entertainment system for nearly 8 years. We don't have a 'normal' TV ion the house. When one of our LinkSys extenders gave up the ghost, I decided to try replacing it with a Raspberry Pi and OpenELEC (Using ServerWMC and the PVR client of course). Pretty painless process in fact.

Anyway, onto the nub of the issue: XMBC frequently reports that all available tuners are in use, when they clearly are not (I can easily view channels in WMC and the ServerWMC itself reports them as free). To rule the Pi, network, etc out of the equation, I now also have XBMC installed on our main HTPC running WMC7, so can easily switch between them for testing.

By way of background, in case this is relevant: I have a single BlackGold card with dual DVB-S2 and dual DVB-T2 receivers. (Effectively 4 tuners in total). I am in the UK, and this basically means I receive both FreeView and FreeSat. Where a channel is broadcast on both, then I have merged the channels in the WMC guide. I will typically order the sources: DVB-S#1, DVB-S#2, DVB-T#1, DVB-T#2. The card also has a 5th tuner (FM), which I don't use.

In one particular scenario (just now): One recording was in progress. ServerWMC reported this as being on DVB-S#2 with the other 3 tuners being free. However when attempting to watch live TV (Channel 4) within XBMC, it was reported that all tuners were busy with the subsequent dialog 'Channel could not be played. Check the log for details'. There should have been 3 tuners available, which I verified by going into WMC, disabling all 4 sources for channel 4, and enabling them individually. Sure enough, the only time the channel could not be played was when DVB-S#2 was the only channel enabled. (The one the recording was taking place on).

Below is what I think is the relevant section of the log:

2014/10/23 20:07:28.544 OpenLiveStream> -----------------start------------------------
2014/10/23 20:07:28.544 OpenLiveStream> client: Wendolene requesting live stream
2014/10/23 20:07:28.556 StreamProc> live-tv started
2014/10/23 20:07:28.561 SetChannel> Channel: 4 : Channel 4 - 2136 = { (4 : Channel 4 - D9A) + [ -1 : Channel 4 - B48, 4 : Channel 4 - 11EF, 4 : Channel 4 - 11F5, 4 : Channel 4 - 11F8, 8 : Channel 4 - 1200, 8 : Channel 4 - 1206, 8 : Channel 4 - 120C, 4 : Channel 4 - 54E69B, 4 : Channel 4 - 54F2F8, 4 : Channel 4 - BB1264, 4 : Channel 4 - BB28B9, 4 : Channel 4 - BB31B7] }
2014/10/23 20:07:28.563 SetChannel> Tuners available for this channel: 5
2014/10/23 20:07:28.563 SetChannel> Tuner DecoyMethod: OnDemand
2014/10/23 20:07:28.563 SetChannel> ---
2014/10/23 20:07:28.563 SetChannel> Attempt: 0, Tuner: 7231 BDA DVBT Tuner #1 / fdaaf1f9-11a0-4128-b930-42c1981ac0a6
2014/10/23 20:07:28.563 SetChannel> > Encrypted: False
2014/10/23 20:07:28.566 SetChannel> > RecorderInfo found: True
2014/10/23 20:07:28.566 SetChannel> > Recorder Content Protection: PROT_COPY_FREE
2014/10/23 20:07:28.569 SetChannel> > Status: Available, client:
2014/10/23 20:07:28.569 SetChannel> *** requested number of available tuners found, stopping search ***
2014/10/23 20:07:28.569 SetChannel> ---
2014/10/23 20:07:28.569 SetChannel> available tuners found: 1 [decoys:0], requested: 1, searched: 1
2014/10/23 20:07:28.569 SetChannel> Tuner: 7231 BDA DVBT Tuner #1 will be used for the live stream
2014/10/23 20:07:28.571 SetChannel> Recorder acquired: True
2014/10/23 20:07:28.575 SetChannel> TuneRequest set
2014/10/23 20:07:28.878 StreamProc> wtv recording started in 0.32 sec
2014/10/23 20:07:28.878 StreamProc> stream output file: LiveTV_Wendolene_DVB-S_4_2014_10_23_20_07_28.ts
2014/10/23 20:07:28.888 StreamProc> started remux thread: 'Channel 4-4:246596'
2014/10/23 20:07:29.406 Remux::FindDescriptors> Scanning wtv for streams...
2014/10/23 20:07:37.688 Parse> Guid: 0 took 8.28 sec, it was attempted 3997 times
2014/10/23 20:07:37.689 Parse> Next 4 Guids: 0.00 sec, 0.00 sec, 0.00 sec, 0.00 sec,
2014/10/23 20:07:38.892 WaitForTsFile> COM recorder says channel is not available, throwing all tuners busy exception
2014/10/23 20:07:38.892 StreamProc> process start error: COM recorder says channel is not available calling Close()
2014/10/23 20:07:38.892 Remux::Stop> caller is requesting to stop remux thread before descriptors are found

Not that it should make any difference in theory, but I see that the first tuner ServerWMC tried was DVB-T#2, whereas in fact it should have been DVB-S#1....

I can't absolutely say for sure, but I don't think I used to have this problem, at least not to the same degree. It feels as if it has been introduced or made worse in one of the recent ServerWMC updates.

Any help appreciated. Krusty (nice name) - great job so far. Happy to provide any more info needed.

Thanks,
John
Reply
#2
My reading comprehension is off:
1) I don't understand your last comment, according to the log you posted the first tuner tried is DVB-T1 not DVB-T2.
2) Also I don't understand why you say that live-tv only fails if DVB-S2 is the only channel enabled, yet (again) the log you posted shows the channel is failing on DVB-T1.

We made changes in the last couple of revs to protect a live streams from getting stolen by a recording starting on the same channel. We have a couple of ways of solving this, but both of them rely on swmc not using the highest priority tuner for live streams - that's why the order you are setting isn't necessary the order swmc is using when it starts a live stream. If the order is important to you - and you don't mind live-tv streams stopping when a recording starts on the same channel - you can turn this feature off, change the following in the config.xml file:
<Decoy_LiveStreamProtectLevel>0</Decoy_LiveStreamProtectLevel>
then save and restart swmc. This should make it behave the way it was behaving before.

But of course that doesn't solve the problem you are getting with the live-tv stream not starting. In the log you posted the live stream is not starting if DVBT1 is chosen for the channel, and since I don't understand your test results I am not sure if its the case that DVBT1 is the only one that always fails or not. Since you know how to turn on and off channel sources, can you clarify this?

The fact that it is being reported back to you as all channels being busy is a bug in the reporting, I will try to get that fixed in the next rev.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#3
Thanks for getting back so quickly. I'm not sure that your reading comprehension was off so much as my explanation. To answer your questions:

1) I don't understand your last comment, according to the log you posted the first tuner tried is DVB-T1 not DVB-T2.

Sorry - my mistake. My line "but I see that the first tuner ServerWMC tried was DVB-T#2" is just a typo. I meant DVB-T#1 !

2) Also I don't understand why you say that live-tv only fails if DVB-S2 is the only channel enabled, yet (again) the log you posted shows the channel is failing on DVB-T1.

What I meant here was that I was doing a test in Windows Media Center to make sure that the channel I could not watch in XBMC was truly watchable in Media Center (tuner available, and good signal)by testing each of the four sources/tuners individually - i.e. only enabling one at a time. I could watch it with any one of DVBS1, DVBT1, or DVBT2 enabled, but not DVBS2 (since it was in use on the recording). Again, to clarify, this was a Windows Media Center test, not ServerWMC. I was just confirming that when trying to watch the channel through XBMC (when I always had all four sources enabled), ServerWMC should have been able to make use of any one of the three available tuners successfully - DVBS1, DVBT1, or DVBT2. That ServerWMC chose DVBT1 as being available, but then subsequently logged (and XBMC reported) that all tuners were in use is the basic issue. But that's the bug you're going to have a look at fixing in the next revision if I understand?

In terms of the order in which ServerWMC tries channels....

Based on what you say, am I right in thinking that while ServerWMC can detect that a tuner is in use by Media Center, the opposite is not true? (hence the hijacking). I might play around with Decoy_LiveStreamProtectLevel, but if that is the only workaround, then I can see why you made the recent changes and will probably stick with the default - Media Center starts at the top of the tuner priority list, ServerWMC starts at the bottom, and worst case they meet in the middle, if I follow the logic.

John
Reply
#4
Pretty much. WMC was never meant to run as a server, so it assumes any live-tv is due to wmc, especially since we are using wmc dlls to do the live stream. The hijacking only happens if you are watching live-tv on a channel and WMC starts a recording ON THE SAME channel. We have tried many things to try to stop this behavior in the rec service, but nothing worked. So our trick for solving the problem is to put swmc live-streams at a lower priority tuner, and just before wmc starts a recording we take a free higher priority tuner and turn it to the same channel, this causes the rec service to grab this 'decoy', leaving the live tv stream alone. Probably more detail then you wanted...

the protection levels are 0 (off), 1(on demand) and 2 (fixed).

I see what you did now. The bug is only with reporting, in other words, swmc is flagging the failure as being due to all channel being busy, when really the failure is that no data was found on this tuner. So that's the problem to solve: why is swmc failing on this tuner. Can you determine if the problem only happens on DVBT-1?
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#5
Not at all. The more detail the better! Quite a cunning solution actually.

I've just done another test with no recordings taking place. Egg on face moment, but extenuating circumstances...

For the channel in question there are actually 24 sources. The first four are as I described - on DVBS1, DVBS2, DVBT1, DVBT2. The others were all disabled - or so I thought (!). Actually the 24th was still enabled, and, no surprise - this was also DVBT1 but on a frequency with no signal. Now that that one is correctly disabled XBMC plays the channel no problem. There are other channels where I've experienced this and will go and check them all.

So basically it all comes down to the incorrectly phrased message (no tuners instead of no signal), the order in which ServerWMC is (now) choosing channels, and my general incompetence in performing a true 'clean' test.

Just by way of a bit more detail: DVBT in the UK (Freeview) is notorious for changing broadcast frequencies every few months, also compounded by the fact that we get signals from multiple transmitters. Standard Freeview set-top boxes can manage all this and auto-tune to the correct 'official' frequency and transmitter. No such luck with WMC: It will typically find 6 or 8 sources for a channel, on some of which the signal can be dodgy from time to time. It is quite a major effort keeping on top of this and making sure the 'correct' sources are always at the top of the priority list. (It is for this reason that I put the DVB-S sources first as the FreeSat frequencies rarely change).

Anyway, in a nutshell, the tuner / source priority is really important, so I'll maybe revert to <Decoy_LiveStreamProtectLevel>0</Decoy_LiveStreamProtectLevel> as a backup plan as you suggested.

I've got another issue with channel naming, but I won't hijack my own thread. If I can't fathom it in the next week I'll raise it separately.

Thanks for all your help on this. Great piece of software.

John
Reply
#6
Glad you got it going and thanks for the info about Freeview, I have heard of it from other users so its good to have some background. When we added the live stream protection we anticipated these types of problems if order was important, but so far we have had relatively few - so you're one of the (un)lucky ones.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#7
I forgot to mention: you can set Decoy_LiveStreamProtectLevel to level 2. In this level, rather than choosing tuners at the lowest priority for live-tv, it will choose tuners toward the top of your list, just leaving enough space for one decoy.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#8
I also started seeing this error/ No Tuners available but they are all free.

http://pastebin.com/REf6sKD6

Wasn't able to locate the Decoy_LiveStreamProtectLevel option mentioned earlier in this thread
Reply
#9
@ijourneaux

There are a number of problems in the log you posted. Can you look in your recorded tv folder for this wtv file?
<rectvfolder>/tempswmc/savedfordebug/LiveTV_BeyondTV2-PC_Digital Cable_660_2014_10_28_00_52_51.wtv

if you have the file, it would be great if you could upload it to my g-drve (i know its a pain because the file is large)
https://drive.google.com/folderview?id=0...sp=sharing

I can't tell why you couldn't start that one stream, is it happening consistently on that one channel channel (espnhd)?

about mid way down in the config.xml file you should find:
<Decoy_LiveStreamProtectLevel>1</Decoy_LiveStreamProtectLevel>
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#10
just uploaded
Reply
#11
Just started uploading or finished uploading? I don't see it in the link I posted.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#12
it should be there now
Reply
#13
I got it, thanks.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply

Logout Mark Read Team Forum Stats Members Help
ServerWMC - Incorrectly reports All tuners for this channel are busy0