Automatically Tune to Strongest Duplicate Channel (1 Viewer)

vapourEyes

Portal Pro
July 31, 2013
142
43
United Kingdom United Kingdom
Country flag
Started on: 2020-03-16
last update: 2020-06-30

Summary:
When multiple FreeView Transmitters are available in a single area, you can often get duplicate channels. Lets try and get their signal strengths and grab the strongest one. Surface the option to do this in the TvTuner. We could call it 'Take Strongest Channel' or something ?

Area:
TV Tuner

Description:
The TvTuner is able to do 'Channel movement detection'. Is it possible that it can do 'Strongest Channel Selection' too, if not already ?
I have 2 transmitters in my area and I can pull channels from both, but channel strength varies widely. This is because one transmitter is in one direction and the other transmitter is in the completely opposite direction. The aerial (naturally) faces only one direction.

Would it be possible to surface a UI element to enable this behaviour?
 
Last edited:

vapourEyes

Portal Pro
July 31, 2013
142
43
United Kingdom United Kingdom
Country flag
A current work-around seems to be 'tune strongest last'. Or better still, tune 'all' then strongest last.
So, if your strongest transmitter is in the Proxima Centauri star constellation, you do a general 'all' tune, then tune your strongest transmitter.
 

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    2,024
    1,260
    Southampton
    United Kingdom United Kingdom
    Country flag
    When multiple FreeView Transmitters are available in a single area, you can often get duplicate channels.
    At my location, the main service transmitter (Rowridge) is roughly due south, but there is another transmitter (Hannington) that is roughly due north. I am just about midway between them. My aerial points to Rowridge, but all Yagi aerials have secondary reception lobes in their polar diagrams, and one of the lobes is at 180 degrees from the direction in which the aerial is pointing. So I have a secondary reception lobe pointing at Hannington.

    When I tune my Humax DVR, it often picks up one of the Hannington MUXes, although it rarely picks up more than one. However, MP never picks up Hannington. The reason is that MP uses a "tuning parameters" file that defines the frequencies of the MUXes for Rowridge, so MP never tries to tune Hannington.

    MP can perform a "blind scan", whereby it tries to receive every frequency in existence. If you do this, then you can receive signals from multiple transmitters. If you live in an area served by more than one transmitter, you may want to receive signals from more than one transmitter (e.g. to receive local content that differs between the transmitters).

    To receive only the MUXes that you want, you should modify the tuning parameters file so that it specifies the wanted MUXes, and excludes the unwanted MUXes. The wanted MUXes might be all from a single transmitter, or might be a combination of MUXes from two or more different transmitters.

    Would a "Pick strongest" setting be useful for "TV Server"? Yes, extra options are always useful in specific situations, but I don't think that it would be widely used.

    -- from CyberSimian in the UK
     

    vapourEyes

    Portal Pro
    July 31, 2013
    142
    43
    United Kingdom United Kingdom
    Country flag
    MP can perform a "blind scan", whereby it tries to receive every frequency in existence. If you do this, then you can receive signals from multiple transmitters. If you live in an area served by more than one transmitter, you may want to receive signals from more than one transmitter (e.g. to receive local content that differs between the transmitters).
    -- from CyberSimian in the UK
    Agreed. I switch off the Channel Movement Detection feature and then I do a 'blind scan' that catches all signals. Then I do a focussed localised scan of my strongest transmitter. This then overwrites the now existing channels from the 'blind scan' with the strongest transmitter channels, where they are duplicate.

    Thinking about the implementation, I was hoping it could be a few lines of code to compare signal strength at tuning time between existing and 'new incoming' channel and let the strongest make it into the Channel Mapping section.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,024
    1,260
    Southampton
    United Kingdom United Kingdom
    Country flag
    then I do a 'blind scan' that catches all signals.
    I have never performed a blind scan, but I suspect that it is quite time consuming? At my location, I can theoretically receive nine MUXes, but the three weakest are too weak to receive reliably (I use a loft aerial rather than an external aerial). So I have edited the tuning parameters file to remove the definitions of the three MUXes that are too weak. (Life is too short to wait for "TV Server" to scan for MUXes that I cannot receive.)

    If you know what MUXes you want to receive from each transmitter, you could create your own customised tuning parameters file. In this way, each time you need to perform a rescan (i.e. every few weeks in the UK, because of new/moved/discontinued channels), the scan can proceed quickly, without requiring manual fix-ups (mostly).

    -- from CyberSimian in the UK
     

    vapourEyes

    Portal Pro
    July 31, 2013
    142
    43
    United Kingdom United Kingdom
    Country flag
    I have never performed a blind scan, but I suspect that it is quite time consuming?
    It is time consuming. But if you want all channels you can get at the best quality :)

    Does anyone know where I need to narrow my search in the code ?
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,024
    1,260
    Southampton
    United Kingdom United Kingdom
    Country flag
    Does anyone know where I need to narrow my search in the code ?
    Unfortunately, the one-and-only expert who knows about "TV Server" has effectively retired from the team (he no longer contributes to these fora). :(

    I don't think that there is anyone else who can guide you in your investigations. :(

    -- from CyberSimian in the UK
     

    vapourEyes

    Portal Pro
    July 31, 2013
    142
    43
    United Kingdom United Kingdom
    Country flag
    I'm honing in...

    1584446909175.png


    Soon, I should arrive at a set of code-vectors that are candidates for change.
    I'm seeing what happens on a CreateTuneRequest.

    I can't see a VS .sln for DirectLib ???
     

    vapourEyes

    Portal Pro
    July 31, 2013
    142
    43
    United Kingdom United Kingdom
    Country flag
    @ DvbBaseScanning.c : 450

    C#:
        ///<summary>
        /// Scan NIT channel
        ///</summary>
        ///<param name="channel">Channel</param>
        ///<param name="settings">Scan Parameters</param>
        ///<returns>Found channels</returns>
        public List<IChannel> ScanNIT(IChannel channel, ScanParameters settings)
        {
          try
          {
            _card.IsScanning = true;
            _card.Scan(0, channel);
            _analyzer = GetAnalyzer();
            if (_analyzer == null)
            {
              Log.Log.WriteFile("Scan: no analyzer interface available");
              return new List<IChannel>();
            }
            _analyzer.SetCallBack(null);
            _analyzer.ScanNIT();
            Thread.Sleep(settings.TimeOutTune * 1000);
            ResetSignalUpdate();
            Log.Log.WriteFile("ScanNIT: tuner locked:{0} signal:{1} quality:{2}", _card.IsTunerLocked, _card.SignalLevel,
                              _card.SignalQuality);
            if (_card.IsTunerLocked || _card.SignalLevel > 0 || _card.SignalQuality > 0)
            {
              int count;
    
              _event = new ManualResetEvent(false);
              _event.WaitOne(16000, true);
              _event.Close();
              List<IChannel> channelsFound = new List<IChannel>();
              _analyzer.GetNITCount(out count);
              for (int i = 0; i < count; ++i)
              {
                int freq, pol, mod, symbolrate, bandwidth, innerfec, rollOff, chType;
                IntPtr ptrName;
                _analyzer.GetNITChannel((short)i, out chType, out freq, out pol, out mod, out symbolrate, out bandwidth,
                                        out innerfec, out rollOff, out ptrName);
                string name = DvbTextConverter.Convert(ptrName, "");
                if (chType == 0)
                {
                  DVBSChannel ch = new DVBSChannel();
                  ch.Name = name;
                  ch.Frequency = freq;
                  Log.Log.Debug("{0},{1},{2},{3}", freq, mod, pol, symbolrate);
                  switch (mod)
                  {
                    default:
                    case 0:
                      ch.ModulationType = ModulationType.ModNotSet;
                      break;
                      //case 1: ch.ModulationType = ModulationType.ModQpsk; break;
                    case 2:
                      ch.ModulationType = ModulationType.Mod8Psk;
                      break;
                    case 3:
                      ch.ModulationType = ModulationType.Mod16Qam;
                      break;
                  }
                  ch.SymbolRate = symbolrate;
                  ch.InnerFecRate = (BinaryConvolutionCodeRate)innerfec;
                  ch.Polarisation = (Polarisation)pol;
                  ch.Rolloff = (RollOff)rollOff;
                  channelsFound.Add(ch);
                }
    We have located the hidden base...
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    vapourEyes Automatically Re-Tune Periodically Improvement Suggestions 1
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    W [solved] [FIXED] Survivor season 40 not automatically matching My TVSeries 1
    G Switch to new channel at begining of program automatically Feature Requests 0
    C How do I get MediaPortal to separate recording files by channel and month? General 2
    H MP1.21F video database scan, can it be scheduled to automatically run in background General Support 5
    Steve.Rayner61 Online Videos - Automatic Updates fails 'Automatic update disabled. Check your internet connection' OnlineVideos 10
    greybox 1.20 final does not update video duration automatically 1.20 10
    greybox 1.20 final does not update video duration automatically 1.20 Pre Release 1
    M TV Server can't tune to some DVB-S multiplexes while other software can General 0
    bribbon [Pending] DVB-C Tuning Parameters: Switzerland.UPC Cablecom [NID 43020] v.7.xml Submit: EPG-Grabbers and tuningdetails 0
    J DVB-S2 card fails to tune? Subchannel count increasing Television (MyTV frontend and TV-Server) 3
    M Tuning channels with quad tuner question General 6
    E [solved] Vodafone Kabel dvb-c Braunschweig Tuning Liste (Stand 31.01.2019) TV / Streaming 0
    A VB-IP SPAIN Movistar plus tunning details (Update 26 dec 2018) Submit: EPG-Grabbers and tuningdetails 1
    M Wrong DVB-T tuning parameters for Sweden, Vannas - Granlundsberget 1.20 Pre Release 1
    U Client cannot tune channels General 1
    Charlie TV [solved] Channels disappeared after transmitter changes (Midhurst) General Support 4
    Top Bottom