[Bug] Problem with DVB-IP channels with changed SID or PID (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Right, I see the problem - I missed a service ID check. Replace your TVLibrary with the attached one and see if that helps...

    [Edit: outdated attachment removed.]
     

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    Now the other problem. In channel with SID=0 and PMTPID=0 and debugoption checked it says that can't find video and audio. Other channels work. Here the logs.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Andrusha777
    Spotted another problem. Another new TVLibrary is attached...

    Stepko
    I read some of the MPEG standard today. For the PMT it says:

    Program_number is a 16-bit field. It specifies the program to which the program_map_PID is
    applicable. When set to 0x0000, then the following PID reference shall be the network PID. For all other cases the value
    of this field is user defined. This field shall not take any single value more than once within one version of the Program
    Association Table.

    To me that says that providers should not be using a service ID of zero, so it is safe to use "service ID == 0" as a flag.
     

    Attachments

    • TVLibrary[dvb_ip_patch].zip
      158.3 KB

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    Hi, mm1352000! This patch now works great! One thing to make clear for me - is abot debugoption "Always lookup PAT". Is am right, that if this option is checked, tv server would never right down a new pmt in sql server table? If this option is NOT checked, that a new PMT will be fixed in table and next time tv service want to show channel, it can get this pmt from table and don't look up for that in stream?
    So, a few minutes of testing - looks good...
    Would that patches be integrated in new version of MP? It is a good idea to make some kind of checkbox in tv server config, smth like "always get channels from url", for iptv only, of course, so no need to scan iptv playlist, only to import that!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    This patch now works great!
    That is good! :D
    I'm sorry it took so much time and the extra patches...

    One thing to make clear for me - is abot debugoption "Always lookup PAT". Is am right, that if this option is checked, tv server would never right down a new pmt in sql server table? If this option is NOT checked, that a new PMT will be fixed in table and next time tv service want to show channel, it can get this pmt from table and don't look up for that in stream?
    The PMT PID in the DB is always updated no matter what you do - you can't stop that from happening. The debug option makes the TV Server look for the correct PMT PID in the stream (technically: the PAT) and ignore the PMT PID in the DB. If you turn the debug option off then TV Server will use the PMT PID in the DB. Both methods should be the same speed, however if you turn the debug option off then tuning could fail or take a long time if the PMT PID for the channel changes. It is up to you whether you turn the debug option off, but I'd recommend that you leave it on...

    Would that patches be integrated in new version of MP?
    That is not my decision to make.
     

    mm1352000

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

    I apologise for the delay in response. :sorry:
    In answer to your questions: my patch included an alternate patch that had the same effect as Rik's patch for scanning. I've now removed that and updated to the latest SVN revision (Rik's patch is now in SVN). I've also integrated the network interface specification patch and I'm providing patches and binaries here. The combined patch contains both my patch and AlexPlas's network interface patch. The mm1352000 patch only contains my patch...

    Note: the attached patches are only for MP 1.2.0b. They will not work with any other version, and they have no effect for anything other than DVB-IP. Please don't ask for patches for other versions...

    Installation Instructions
    1. Stop TV Server.
    2. Take a backup of the following files in your TV Server install folder:
    - SetupControls.dll
    - SetupTv.exe
    - TsWriter.ax
    - TvBusinessLayer.dll
    - TVDatabase.dll
    - TVLibrary.dll
    3. Download and extract the attached files from either DVBIP[combined_27970].zip or DVBIP[mm1352000_27970].zip into your TV Server install folder.
    4. Copy TVDatabase.dll and TvBusinessLayer.dll into your MediaPortal install folder.
    5. Start TV Server.
    6. Rescan channels if necessary.

    Usage Instructions
    1. If your channels have unique ONID + TSID + SID and the provider changes the PMT PID occasionally then you don't need this patch (unless for the network interface selection). Simply turn on the "always use PAT lookup" debug option or rescan your channels more frequently.
    2. If your channels have unique ONID + TSID + SID but ONID + SID and/or the provider changes the PMT PID occasionally then you don't need this patch (unless for the network interface selection). Simply turn on the "always use PAT lookup" debug option or rescan your channels more frequently if the PMT PID changes, and always scan with the "provider doesn't uniquely identify channels..." option turned on.
    3. If your channels:
    - have unique ONID + SID or ONID + TSID + SID, but the provider changes the SID and/or PMT PID occasionally
    - OR do not have unique ONID + SID or ONID + TSID + SID
    ...then you need this patch! :)
    Turn on the "always use PAT lookup" debug option and always scan with the "provider doesn't uniquely identify channels..." option turned on.

    Notes
    - I take no credit whatsoever for AlexPlas's patch - all credit goes to him! :)
    - I take no responsibility whatsoever for and problems with the combined patch - I'm providing it only as a convenience for people that need both patches but aren't able to compile them together for themselves
    - please report any problems with the mm1352000 patch

    Instructions For Turning On "Always Use PAT Lookup"
    1. Open a command line.
    2. Change directory to your TV Server install directory (example: cd "C:\Program Files\MediaPortal 1.2.0b\TV Server").
    3. Type SetupTv.exe /DebugOptions.
    4. TV Server configuration should start with a new section in the left hand side called "Debug Options".
    5. Turn on "always use PAT lookup".
    6. Close TV Server configuration.

    Best regards,
    mm1352000
    :)

    ----------------------------------------------------------
    Update
    19-06-11 - Fix for scanning channels that are not yet in the DB.
     

    Attachments

    • DVBIP[mm1352000_27970].zip
      1 MB
    • DVBIP[combined_27970].zip
      1 MB

    felix_clerc

    Portal Pro
    October 28, 2009
    82
    6
    Home Country
    Switzerland Switzerland
    Hello,

    I applied the patch (combined) as I had scanning issues, and the result is :

    It successfully updated channels I had entered manually (both radios and TV channels)
    It fails if I manually select my dedicated NIC attached to the port my ISP is streaming the TV and radios channel

    So, it's better than before, still not perfect. I have about 65 channels, and I manually entered tuning detail for about 10 of them. When I scan, it goes till the last I entered then stop saying scanis finished.
    Sadly, I tried to create manually the channels without tuning details (quite long to do and boring - add channel, then add tuning entering each time 1, 8442, 1, 2001, 67, IP) hoping it would then recognize them and add the tuning details for me, but it didn't work.
    I guess I must have the defined channels mapped to the DVBIP card, meaning they must have the tuning details (at least one) before doing a scan.

    The logs are attached.
    Thanks anyway for the help on that matter, I guess my provider is not the only one streaming that way, so fixing this would be great.

    Let me know if you'd like me to do some other test.

    Best regards,
    Felix
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    It fails if I manually select my dedicated NIC attached to the port my ISP is streaming the TV and radios channel...
    I really don't know anything about AlexPlas's patch. Do you need the combined patch because you have more than one NIC?

    So, it's better than before, still not perfect. I have about 65 channels, and I manually entered tuning detail for about 10 of them. When I scan, it goes till the last I entered then stop saying scanis finished.
    Sadly, I tried to create manually the channels without tuning details (quite long to do and boring - add channel, then add tuning entering each time 1, 8442, 1, 2001, 67, IP) hoping it would then recognize them and add the tuning details for me, but it didn't work.
    I guess I must have the defined channels mapped to the DVBIP card, meaning they must have the tuning details (at least one) before doing a scan.
    I don't know very much about DVB-IP, but I'm suspicious of the format of your M3U file:

    #EXTINF:10,BFM
    udp://@225.1.1.152:1111
    #EXTINF:-1,BFM
    udp://@225.1.2.11:1111

    Why are all the EXTINF lines after the 10th one using "EXTINF:-1", and could that be a problem? Does TV Server scan extra URLs if you change the -1s to 11, 12, 13 etc.?

    Sorry I can't be of more help. :sorry:

    @Stepko, Georgius... any comments?

    mm
     

    felix_clerc

    Portal Pro
    October 28, 2009
    82
    6
    Home Country
    Switzerland Switzerland
    Hello mm,

    :D for your help, I really appreciate...

    I did some tests and here is what I found:

    Effectively, the channel must exist, have VALID tuning details (I mean all but the ip address, which is corrected during the scan) to be updated. They have also to be mapped to a DVBIP card, and scan must be done on that card.

    So I'm actually populating the list of channels, adding them the subchannels (it must match the number of entries in the list, or the scan stop: ie I entered 3 BFM subchannels with the same IP and they've been updated, if I enter only one the scan stops after BFM)

    Regarding the "-1" entries in my m3u, this is the normal entry for streaming, this value is normally the length of the media in seconds. I have entries 1, 2, 3, etc as I tested this, but I now only have "-1" in my list and that is fine.

    Let me know if I can help in anyway, do some tests or post some logs...

    Again, thanks for your support - my wife would kill me if no TV anymore :rolleyes:
     

    Users who are viewing this thread

    Top Bottom