DVB-IP MediaPortal IPTV Source Filter

Discussion in 'General Development (no feature request here!)' started by georgius, May 17, 2011.

Thread Status:
Not open for further replies.
  1. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    What is it?
    It is possible to watch TV not only via DVB-T, DVB-S or DVB-C, but you can also watch TV via DVB-IP aka IPTV. The TV streams are transmitted on your internet connection. More and more ISP's offer TV on their networks.



    DVB-IP in MediaPortal
    The good thing is that the TvServer already comes with a software DVB-IP MediaPortal IPTV Source Filter card. You can enable it in the TV config under "TV Servers" -> <your Servername>.

    The bad thing is that version provided with MP is little bit older and many people have problems with this version (especially in UDP part). There are (at least) two threads concerning about DVB-IP filter: older one and newer one. There can you find information about development. Thanks Dimka and Stepko for developing this version.

    New version, supported protocols, supported URLs' formats
    New version of filter should be more stable and reliable than version provided with MP. Latest (non-experimental) version supports:
    • file sources
    • HTTP sources
    • UDP sources
    • RTP sources
    • RTSP sources (only IPv4, doesn't support specifying network interface)
    Supported URLs' formats and examples
    File sources
    • Formats
      • file://[server]/path
    • Comments
      • all spaces in path have to be replaced by %20
    • Examples
      • file:///c:/temp/video.ts
      • file:///c:/temp%20folder/video%20with%20spaces.ts
    HTTP sources
    • Formats
      • http://server[:port]/path
    • Comments
      • server can be DNS name or IP address (IPv4 or IPv6)
      • authentication is not supported
      • proxy server is not supported
      • SSL not supported (HTTP port 443)
    • Examples
      • http://test.tv/channel
      • http://test.tv:80/channel
    UDP sources
    • Formats
      • udp://[[sourceServer[:sourcePort]]@]localServer:localPort
    • Comments
      • sourceServer and localServer can be DNS name or IP address (IPv4 or IPv6)
      • localServer can be unicast or multicast IP address
    • Examples
      • udp://233.10.12.1:7777
      • udp://@233.10.12.1:7777
      • udp://192.168.15.50@233.10.12.1:7777
      • udp://192.168.15.50:4477@233.10.12.1:7777
    RTP sources
    • Formats
      • rtp://[[sourceServer[:sourcePort]]@]localServer:localPort
    • Comments
      • sourceServer and localServer can be DNS name or IP address (IPv4 or IPv6)
      • localServer can be unicast or multicast IP address
      • if failed with parsing of RTP packets it automatically switch to UDP protocol
    • Examples
      • rtp://233.10.12.1:7777
      • rtp://@233.10.12.1:7777
      • rtp://192.168.15.50@233.10.12.1
      • rtp://192.168.15.50:4477@233.10.12.1:7777
    RTSP sources
    • Formats
      • rtsp://[username:password@]server/path
    • Comments
      • server can be DNS name or IP address (IPv4)
      • doesn't support specifying network interface
    • Examples
      • rtps://test.tv/channel
      • rtsp://user:password@test.tv/channel
    Need your help
    New version was hugely tested, but still can be there some issues - in performance or in stability.

    Compatibility
    New version is compatible and tested with MP 1.1.3, MP 1.2.0 Beta, MP 1.2.0 RC, MP 1.2.0, MP 1.2.1, MP 1.2.2, MP 1.2.3 and MP 1.3.0 (Alpha, Beta, RC, final).

    Installation
    For proper filter working you need Microsoft Visual C++ 2010 Redistributable Package (x86).

    To use the new version just follow these simple steps:
    1. stop the TV service in the TV-Server Configuration (under "Manual Control")
    2. go to the TV server folder (e.g. C:\Program Files\Team MediaPortal\MediaPortal TV Server)
    3. optional - make a backup of the original MPIPTVSource.ax and MPIPTV_*.dll files (if exist)
    4. copy or replace files in TV server folder with files in MPIPTVSource.zip archive
    5. optional - copy or replace MPIPTVSource.ini file in TV Server data folder (e.g. [DRIVE]:\ProgramData\Team MediaPortal\MediaPortal TV Server)
    6. optional - edit configuration in MPIPTVSource.ini file
    7. start the TV Service in the TV-Server Configuration
    You also need a playlist file for your ISP to scan channels.

    Specifying network interface card
    Caution: This part was tested only with MP 1.2.0, MP 1.2.1, MP 1.2.2, MP 1.3.0 (Alpha, Beta, RC) and it doesn't work with RTSP protocol (sorry for that).
    There is workaround how to specify network interface card. You'll need to change your existing playlist urls to another form (and also use latest version of MediaPortal IPTV Source Filter) and rescan your channels. Assume that you have current address
    Code (Text):
    1. udp://233.60.10.5:1234
    and you want to specify 'Local Area Connection' network card. The address must be transformed to
    Code (Text):
    1. C:|interface=Local Area Connection|url=udp://@233.60.10.5:1234
    To be correct, the first letter ('C') can be anything, but the second must be colon (':').

    Change SID and PID in stream
    If you have provider which change SID and PID values in streams (e.g. when provider obtains streams for various sources or simply has its own set-top-boxes which don't care about SID and PID) then with every change you need to rescan channels to get them work back. If it happens often, it's very annoying. I've added possibility to change these values in IPTV filter, so you will not need to rescan channels when provider change these values. Of course, I assume that channel is still streamed on same address. The way how to change values is same as for specifying network interface card (so, you will need to change your playlist file):
    Code (Text):
    1.  
    2. C:|url=udp://233.10.12.1:7777|SidValue=10|PidValue=50
    3.  
    where SidValue is new SID and PidValue is new PID (ONID). For each channel you need another PID value (valid PID values are from 32 to 8190), SID values can be same. You don't have to know old SID and PID values. Changing SID and PID values doesn't work in case that in stream isn't only one channel.

    Changelog
    Show Spoiler

    • 26th of April, 2012
      • HTTP - fix: returned data length was not always as assumed
      • removed KARTINA protocol
    • 18th of January, 2012
      • HTTP - fix: removed special request header from HTTP request
    • 8th of January, 2012
      • HTTP - fix: removed not necessary logging in HTTP protocol
      • all protocols - fix: fixed default log verbosity (wasn't set when configuration file is not found)
      • all protocols - fix: fixed analysing discontinuity in case of MPEG TS NULL packet (wrong value)
      • all protocols - fix: changed name of length dump packet file (from TS to TXT)
    • 6th of January, 2012
      • RTP - fix: possible stuttering caused by logging each packet
      • all protocols - improvement: added possibility to change SID and PID in stream
      • all protocols - fix: fixed analysing discontinuity in case of MPEG TS NULL packet
      • all protocols - improvement: checking parameters from configuration file
      • all protocols - improvement: added logging information from where is configuration file read
      • all protocols - improvement: added possibility to dump input packets
      • all protocols - changed configuration file
    • 21th of November, 2011
      • RTP - fix: processing RTP header
    • 20th of October, 2011
      • UDP, RTP - fix: unsubscribe from multicast group didn't work correctly
      • all protocols - fix: NULL packets (PID 0x1FFF) doesn't use continuity counter, they were excluded from discontinuity detection
    • 26rd of September, 2011
      • all protocols - fix: problem with specifying network interface when multicast IP address of channel is used
    • 23rd of September, 2011
      • all protocols - improvement: temporary made workaround to specify network interface card
    • 22nd of September, 2011
      • all protocols - fix: stream PID for discontinuity detection wasn't correctly computed
    • 21st of September, 2011
      • all protocols - fix: access to buffer from more threads was not safe
      • RTP - fix: extension header length wasn't computed correctly
    • 11th of September, 2011
      • common - added new log verbosity value for data, now verbose value 4 doesn't write methods (FillBuffer(), ReceiveData(), DoBufferProcessingLoop()) working with data into log file, verbose value 5 write these methods into log file
      • all protocols - improvement: added discontinuity detection, discontinuity detection can be disabled in configuration file
      • all protocols - fix: reworked memory management, some memory leaks fixed
      • all protocols - improvement: added maximum attemtps of opening connection
      • all protocols - improvement: added new configuration options to set internal buffer size
      • all protocols - improvement: internal buffer can be resized if needed
      • RTP - improvement: reworked almost from scratch
      • RTSP - improvement : added protocol
    • 13th of June, 2011
      • improvement: added configuration file
      • improvement: restricted maximum log size, if current log file exceeded maximum size, then is backuped and new log file is created
    • 7th of June, 2011
      • UDP, RTP, HTTP, KARTINA - fix: when used with conditional access (MDAPI) than conditional access doesn't work properly
      • improvement: added FILE protocol - url in format: file://[server]/path, e. g. file:///c:/temp/video.ts, all spaces in path have to be replaced by %20 (file:///c:/temp%20folder/video%20with%20spaces.ts)
    • 4th of June, 2011
      • UDP, RTP, HTTP, KARTINA - fix: when used with conditional access (MDAPI) than conditional access doesn't work properly
    • 28th of May, 2011
      • UDP, RTP, HTTP, KARTINA - improvement: when "Dump raw TS" option in TV Server Configuration tool is checked then raw TS file is created in log directory - removed, option added to configuration file
    • 26th of May, 2011
      • UDP, RTP, HTTP, KARTINA - fix: TvService crash when multiple DVB-IP cards working simultaneously
    • 24th of May, 2011
      • UDP, RTP, HTTP, KARTINA - fix: parsing url (especially UDP and RTP with specified source server: e .g udp://1.2.3.4@5.6.7.8:1234)
      • UDP, RTP, HTTP, KARTINA - improvement: in MP 1.2.0 Beta added support for specifying network interface (more detailed here)
    • 17th of May, 2011
      • KARTINA - fix: when closed connection and opened new one the old connection ticket was used

    Attachements
    • MPIPTVSource.zip - zip archive with latest compiled version of filter
    • MPIPTVSourceIni.zip - zip archive with ini file in default configuration
    Reporting bugs or problems
    When you report bug or problem, please attach log files, which in best case can be obtained by this procedure:
    1. stop TvService and MP
    2. clear TvService and MP log folder
    3. set verbosity level to 4 (set LogVerbosity parameter in configuration file to 4)
    4. start TvService
    5. run MP
    6. watch channel
    7. wait for bug or problem occur
    8. close MP
    9. stop TvService
    10. post all logs from TvService and MP log folder
     

    Attached Files:

    Last edited: March 18, 2013
    • Like Like x 27
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. djan2511

    djan2511 Portal Member

    Joined:
    October 9, 2009
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Hi Attached the TVServer logs. Not sure if it helps, cause I get 'no free card available' on the mediaportal client when I want to view a channel that is already streaming on the MP Server. It only does this for DVB-IP, for DVB-S and DVB-C it works oko.

    Thx for having a look at this.

    Regards,

    DJ
     
    • Like Like x 1
  4. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    It helps, because allocating free card is Tv Server task. It's clear in log, that no free card was found. It's not problem of IPTV filter, but Tv Server has wrong implementation of DVB-IP card. I'll check if same issue has MP 1.2.0 Beta. If yes, I'll try to investigate where is problem.
     
    • Like Like x 1
  5. djan2511

    djan2511 Portal Member

    Joined:
    October 9, 2009
    Messages:
    7
    Likes Received:
    1
    Ratings:
    +1 / 0
    Ok, thx a lot for checking this. To describe exactly what was done:

    - 1 DVB-IP card is defined in TV Server
    - DVB-IP channel is streaming on HTPC (TV Server and MP Client running on same machine)
    - Another MP Client is running on Laptop. When trying to tune to the same DVB-IP channel then it says 'no free card available'
    - When repeating this test with a DVB-C or DVB-S channel then this works fine; the same channel shows on both Laptop and HTPC, even when there is only 1 TV card defined (so no multiple tuners available).

    Version is MP 1.1.3, OS Windows 7
     
  6. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    Hi,

    I can confirm that same issue has MP 1.2.0 Beta. I've started thread, where I hope this issue will be fixed.
     
  7. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,900
    Likes Received:
    709
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,223 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Hi.
    I don't know if I have the same problem as yours or not.
    In my case http dvb-ip scan results in nothing with "no PMT found" error.
    vlc plays them normally.
    Maybe you have some advices.
     
  8. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    I assume that you're using MP 1.2.0 Beta. If yes, than your problem was solved in this thread (this post). Fix is in current SVN (it was fixed in SVN revision 27966), so you can download and build new MP.
     
    • Like Like x 1
  9. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,900
    Likes Received:
    709
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,223 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Thanks, scan is working in 27966 with your source filters.
    I found if somehow iptv channel is detected as not FTA when you try to preview it you get "ChannelNotMappedToAnyCard"
     
  10. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    Can you reproduce this again and attach logs? Maybe it's some bug and it should be reported.
     
  11. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,900
    Likes Received:
    709
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +1,223 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    My logs with with fta detection problem.
    I droped mysql database and did full rescan.
    I suppose channels are the same in each time.
    tv-15, tv-19, tv-17 are shows as not fta. It is interesting but provider name "RSCC"(don't know what doesit mean) in tv channels list is shown only for them.
    If i try to preview one of them I get "ChannelNotMappedToAnyCard"

    Code (Text):
    1. 2011-07-21 01:38:22.593750 [(5)]: Controller: epg stop
    2. 2011-07-21 01:38:24.468750 [(6)]: Filter listview for
    3. 2011-07-21 01:38:29.609375 [(6)]: Finished filtering 15 items for
    4. 2011-07-21 01:41:39.453125 [(5)]: Controller: StartTimeShifting 7TV 8
    5. 2011-07-21 01:41:39.531250 [(5)]: Controller: find free card for channel 7TV
    6. 2011-07-21 01:41:39.687500 [(5)]: Controller: find card for channel 7TV
    7. 2011-07-21 01:41:41.515625 [(5)]: Controller:   got 1 tuning details for 7TV
    8. 2011-07-21 01:41:41.546875 [(5)]: Controller:   channel #1 DVBIP:tv:RSCC 7TV Freq:0 ONID:4369 TSID:4 SID:2 PMT:0x25 FTA:False LCN:10000 Url:http://domsar.net:8000/tv-15
    9. 2011-07-21 01:41:41.593750 [(5)]: Controller:    card:3 type:RadioWebStream cannot tune to channel
    10. 2011-07-21 01:41:41.609375 [(5)]: Controller:    card:2 type:Analog cannot tune to channel
    11. 2011-07-21 01:41:42.062500 [(5)]: Controller:    card:1 type:DvbIP channel is encrypted but card has no CAM
    12. 2011-07-21 01:41:42.093750 [(5)]: Controller: found 0 card(s) for channel
    13. 2011-07-21 01:41:42.093750 [(5)]: AdvancedCardAllocation.GetAvailableCardsForChannel took 2407 msec
    14. 2011-07-21 01:41:42.093750 [(5)]: Controller: found 0 free card(s)
    15. 2011-07-21 01:41:42.093750 [(5)]: AdvancedCardAllocation.GetFreeCardsForChannel took 2574 msec
    16. 2011-07-21 01:41:42.093750 [(5)]: Controller: StartTimeShifting failed:ChannelNotMappedToAnyCard
    17. 2011-07-21 01:42:12.484375 [PowerEventThread(8)]: TV service PowerEventThread 49352
     
Loading...
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!