TV Server: weak DVB-S signals (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi all

    I have a couple of questions and a potential bug report for the developers. Let me start by giving some brief background...

    I have a 90cm [offset] satellite dish with 2 twin output LNBs (one centre position, the second offset by 8 degrees to the left) which are controlled by a 9x8 multiswitch (which provides the feeds for my PC TV tuner cards). Signal strength/quality on the offset LNB is never going to be ideal, however it is adequate for all of the transponders except for 2. DVBViewer 4.2.1.0 is able to pick up the stronger of those 2 transponders (~85% quality) relatively consistently as long as the weather is reasonable. It can also pick up the weakest transponder (~70% quality) with some pixelation when the weather is good. Unfortunately I have found that MediaPortal (version 1.1.0, 1.1.1, SVN) is not able to match DVBViewer. Using the same tuner, MediaPortal can only occasionally pick up the '85% transponder'. I have only known MediaPortal to pick up the '70% transponder' on 2 occasions in the last 2-3 months.

    When comparing MediaPortal and DVBViewer I use:
    - the same tuner
    - the same cable
    - try to tune at approximately same time (within 10 seconds, and obviously not at the same time)

    This situation is quite frustrating for me because I really enjoy watching some of the channels on the weak transponders. MediaPortal is my software of choice for TV :)D) so it is not ideal to have to use DVBViewer for the channels on the two weak transponders!

    I have tried a couple of things to improve my chances of receiving the weak transponders in MediaPortal:
    - increased the scan timeouts (tune = 10 seconds)
    - increased the TV Server priority to real time
    - tried to mimic the settings in DVBViewer (such as stop graph rather than pause)
    Nothing seems to have made any difference...

    The relevant section of my log is below. As you can see, the signal is simply not being locked because it is bad or weak.

    Code:
    2010-10-17 03:29:19.843750 [(6)]: Blackgold: CommitChanges() Succeeded
    2010-10-17 03:29:19.953125 [(6)]: dvb:  LockedInOnSignal waiting 20ms
    2010-10-17 03:29:19.984375 [(6)]: dvb:  LockedInOnSignal waiting 20ms
    2010-10-17 03:29:20.015625 [(6)]: dvb:  LockedInOnSignal waiting 20ms
    2010-10-17 03:29:20.046875 [(6)]: dvb:  LockedInOnSignal waiting 20ms
    2010-10-17 03:29:20.078125 [(6)]: dvb:  LockedInOnSignal waiting 20ms
    2010-10-17 03:29:39.984375 [(6)]: dvb:  LockedInOnSignal could not lock onto channel - no signal or bad signal
    2010-10-17 03:29:39.984375 [(6)]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=False

    Now I come to the two questions for the developers:
    1. In the log above, my tune timeout was 20 seconds and my TV Server priority was real time. As you can see, the server definitely waits 10 seconds for lock, *however* after the first 5 attempts (~800ms) the TV Server will sleep for the remaining ~19 seconds!!! Surely this shouldn't happen. As a programmer I know that thread scheduling is not something you can control, however this behaviour is very consistent for me. 5 attempts, and then sleep for the remaining time, no matter what priority the TV Server has or how long or short the timeout is. The only trouble is that the minute I try and insert any extra debugging to see where the time is being spent, the thread will behave like I expect it should (more regular scanning). Looking at the code (TVLibrary.Implementations.DVB.Graphs.TvCardDvbBase.LockedInOnSignal()) I can't see any reason why this should happen *but it does*. Perhaps this behaviour is related to characteristics of the CLR scheduler?

    2. I notice there is a put_SampleTime() function in the IBDA_SignalStatistics class. I wondered whether there was a reason that this function is not used when checking the signal for lock?

    Any comments would be welcome! :D

    [Edit: note that I am using Windows XP SP3]
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    No comments?

    Well, I have discovered that the logging code limits the number of repeats of the same line. A line of debug may only be repeated up to 5 times. Any further repeats of the same line are not logged. I guess this is an attempt to prevent spurious debug entries from loops in the code. What this means is that the thread is not sleeping for longer than it should. It is just that the logging has detected repeated lines and is not printing them. That answers the first question.

    As for the second question: I have added some extra code to the TVLibrary.Implementations.DVB.Graphs.TvCardDvbBase.LockedInOnSignal() function to determine what sort of signal characteristics my TV card is returning for the weaker transponders:

    Signal locked: false
    Signal present: true
    Signal quality: 0
    Signal strength: ~85

    For experimental purposes I tried changing the lock detection condition to:

    Code:
    if (isLocked || isPresent || (quality > 0) || (strength > 0))
    {
      // Tuner is locked
    }

    After this modification, the function returns true for the weak transponders. *This allowed channels on the weak transponders to be successfully watched with perfect picture quality!*. There are ZERO video discontinuities in the TS reader log. Unfortunately the problem is that when the signal really is too weak, my card's driver returns the same signal characteristics. Video may show, however it will often stutter or pixelate; audio tends to play fine. In this case the TS reader log is full of video discontinuities. Because the signal characteristics are the same, there is no way to distinguish between weak signals that could still be watched and weak signals that are completely unwatchable. I'd say this is a fault of my TV card's driver - the lock threshold seems to be set slightly too high...

    FYI, my card is a Pinnacle PCTV 7010ix. I'm using the Blackgold BGT3540 drivers (version 6.0.0.49) and I'm running on Windows XP SP3.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Sure :) The patch (for SVN head) is attached. It is nothing fancy...

    Warning:
    I'm fairly certain the issues I'm having are specific to my card and its driver - like I said earlier, I think the DVB-S lock threshold is set too high. Other similar cards such as the Pinnacle PCTV 710ix and Blackgold BGT3540 might also be affected, however I don't know this for sure. Applying this patch may cause TV Server to think your card can lock frequencies that it would not otherwise lock. This may lead to lots of "unable to tune to channel - no signal" errors.
     

    Attachments

    • DvbLock[SVN_HEAD_26601].zip
      586 bytes

    toga67

    Portal Pro
    October 15, 2010
    181
    11
    Home Country
    Germany Germany
    Hi all,
    i have exactly the same problem with my technotrend S2-1600 card. The log says:
    2010-10-25 20:00:41.314671 [(21)]: **************************************************
    2010-10-25 20:00:41.314671 [(21)]: ***** SIGNAL LEVEL: 90, SIGNAL QUALITY: 100 *****
    2010-10-25 20:00:41.314671 [(21)]: **************************************************
    and some lines later:
    2010-10-25 20:07:43.928843 [(23)]: dvb: LockedInOnSignal waiting 20ms
    2010-10-25 20:07:44.015848 [(23)]: dvb: LockedInOnSignal waiting 20ms
    2010-10-25 20:07:44.102853 [(23)]: dvb: LockedInOnSignal waiting 20ms
    2010-10-25 20:07:44.191858 [(23)]: dvb: LockedInOnSignal waiting 20ms
    2010-10-25 20:07:44.278863 [(23)]: dvb: LockedInOnSignal waiting 20ms
    2010-10-25 20:07:45.894956 [(23)]: dvb: LockedInOnSignal could not lock onto channel - no signal or bad signal
    2010-10-25 20:07:45.894956 [(23)]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=False

    I use win 7 x64 and mediaportal 1.1.1.

    It would be nice if this issue would be fixed in 1.2 alpha.
    Do i really have a bad dvb-s signal? DVBViewer works great on the same computer.
     

    Attachments

    • tv.zip
      107.1 KB

    toga67

    Portal Pro
    October 15, 2010
    181
    11
    Home Country
    Germany Germany
    Sure :) The patch (for SVN head) is attached. It is nothing fancy...

    Warning:
    I'm fairly certain the issues I'm having are specific to my card and its driver - like I said earlier, I think the DVB-S lock threshold is set too high. Other similar cards such as the Pinnacle PCTV 710ix and Blackgold BGT3540 might also be affected, however I don't know this for sure. Applying this patch may cause TV Server to think your card can lock frequencies that it would not otherwise lock. This may lead to lots of "unable to tune to channel - no signal" errors.

    Hi,
    thanks a lot for your patch. Could you please provide me a fixed dll because i have not the posibillity and skills to compile the code.

    Thanks in advance.

    Thomas
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi,
    thanks a lot for your patch. Could you please provide me a fixed dll because i have not the posibillity and skills to compile the code.

    Thanks in advance.

    Thomas

    Sure, since you ask so nicely :)
    What version of MediaPortal are you running - 1.1.0 or 1.1.1?
    Also, what kind of TV card you have? I don't really need to know that, however there are a couple of other patches that I have made that may be useful for you if you have a Pinnacle or Blackgold card...
     

    toga67

    Portal Pro
    October 15, 2010
    181
    11
    Home Country
    Germany Germany
    Thanks,
    i am running the version 1.1.1 with the StreamedMP skin. My TV card is the technotrend S2-1600.
    I am very happy that you have fixed the issue because i think it is a very special card driver problem. With my other pc which has an Tevii TV card i have not this issue.

    Thomas
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Okay, Thomas.

    The patch is attached to this post. I'm putting it here so that anyone can try it if they want to. I'd like to reiterate that I'm providing this with no guarantees that it will help... Having said that, I hope it *does* help :)

    Instructions:
    1. Stop the TV Server
    - Go to TV Server configuration
    - Click on "manual control" in the left hand side
    - Click on "stop service"
    - Close the configuration
    2. Navigate to your MediaPortal TV Server install folder.
    3. Take a backup copy of TVLibrary.dll
    4. Download the binary patch from this post. Unzip the TVLibrary.dll into your TV Server install folder.
    5. Restart the TV Server
    - Go to TV Server configuration
    - You should see a popup asking you whether you want to start the TV Server service.
    - Click "yes"
    Done!

    [Edit: updated attachment added]
     

    Attachments

    • DvbLock[1.1.1_26460].zip
      151 KB

    toga67

    Portal Pro
    October 15, 2010
    181
    11
    Home Country
    Germany Germany
    AW: Re: TV Server: weak DVB-S signals

    Hi,
    the dll seems not to work. After installing the dll the card type was unknown and the channels are not mapped to the TV card anymore. Please see the attached hardcopies.

    Thomas
     

    Attachments

    • TV_Servers.png
      TV_Servers.png
      59.4 KB
    • NotMapped.jpg
      NotMapped.jpg
      24.7 KB

    Users who are viewing this thread

    Top Bottom