MERGING MediaPortal Url Source Splitter & IPTV Filter

Discussion in 'General Development (no feature request here!)' started by georgius, August 20, 2013.

  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
    JIRA MP1-4155 : Rework of DVBIP RTSP Filter
    https://issues.team-mediaportal.com/browse/MP1-4155

    GIT branch: https://github.com/MediaPortal/Medi...TV_filter_and_MediaPortal_Url_Source_Splitter

    Supported protocols
    Filter should be more stable and reliable than version provided with MediaPortal. Latest version supports protocols:
    • IPTV (TV Service)
      • UDP sources
      • RTP sources
      • HTTP sources
      • RTSP sources
      • M3U8 sources (Apple HTTP live streaming)
    • splitter (OnlineVideos)
      • UDP sources
      • RTP sources
      • HTTP sources
      • RTSP sources
      • RTMP sources
      • AFHS sources (Adobe Flash HTTP streaming)
      • MSHS sources (Microsoft HTTP streaming)
      • M3U8 sources (Apple HTTP live streaming)
    Note: Filter doesn't have ability to transcode or to mux incoming stream to MPEG2 TS format (yet). This is planned to be added but later (after all things, which are already planned).

    Compatibility
    Filter is compatible and tested with MP 1.7.1. If you found that filter is compatible with any other MP version, let me know to update.

    Compatibility with standard MediaPortal IPTV filter
    Filter is partially backward compatible with standard MediaPortal IPTV filter delivered by MediaPortal installer. It can partially handle URL parameters from standard MediaPortal IPTV filter. From standard MediaPortal IPTV filter URL parameters are supported parameters:
    [TABLE][TR][TD]MediaPortal IPTV filter parameter name[/TD][TD]MergedMediaPortal IPTV filter and url source splitter parameter name[/TD][TD]Specification[/TD][/TR][TR][TD]url[/TD][TD]Url[/TD][TD]The URL to open.
    [/TD][/TR][TR][TD]interface[/TD][TD]Interface[/TD][TD]The name of network card interface to use to open URL.
    [/TD][/TR][TR][TD]SidValue[/TD][TD]Mpeg2TsProgramNumber[/TD][TD]The program number in program association section (PAT) and in transport stream program map section (PMT).[/TD][/TR][TR][TD]PidValue[/TD][TD]Mpeg2TsProgramMapPID[/TD][TD]The program map PID in program association section (PAT) or PID of packet containing transport stream program map section (PMT).[/TD][/TR][/TABLE]Note: The URL from standard MediaPortal IPTV filter don't have to be changed to MediaPortal IPTV filter and url source splitter URL format.

    TV Plugin
    From version 2.1.3.5440 is in filter installer included TV plugin to edit scan playlist with possibility to set various filter parameters for each url. The TV plugin is available from TV-Server Configuration tool. After enabling plugin in Plugins section, you can edit playlist or set default parameters for several protocols.

    On main_screen_with_playlist.png image is main screen with loaded playlist. There is Channel name, Url, Protocol, Filter url and special icon column. Below playlist is property grid, when can be changed various settings for select url(s). It is possible to select mutiple urls, after that is possible to change settings for multiple urls.

    In special column is by default blue question mark. It is possible to test URL by clicking on icon, while testing url is shown two arrows in circle (testing_channel.png). If testing is successful, green tick icon is shown (testing_channel_successful.png) else red cross icon is shown (testing_channel_failed.png). The reason of failure is shown in tool tip over the red cross icon.

    Next to playlist editor tab are tabs with general settings for protocols. Each protocol has its own general settings. These settings are applied to url default settings on loading of playlist or pressing Apply settings button. If some settings have wrong value, then next to value is shown exclamation mark with short description of error (in tool tip over icon).

    When some filter url exceedes maximum length of url in TV server database (by default 200 characters), the Update database button is shown. In that case is needed to update database (press button) or you have to find exceeding url(s) and change settings to fit url in database.

    From version 2.1.4.5454 is included in TV plugin also database editor to update channel url directly in database (no scanning is necessary in this case). Database editor is very similar to playlist editor. After urls editing is needed to store changes into database by pressing Store changes button. By pressing Set M2TS parser button are set transport stream ID, program number and program map PID to MPEG2 TS parser settings in channel url.

    From version 2.2.8.5875 is possible to specify remote server authentication and proxy server authentication for HTTP, AFHS, MSHS and M3U8 protocols.

    HTTP protocol settings
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Interface[/TD][TD]System default[/TD][TD]The name of network card interface to use to open URL (in default case is network interface card chosen by operating system).[/TD][/TR][TR][TD]Open connetion timeout[/TD][TD]5000[/TD][TD]The timeout to open HTTP url in milliseconds.[/TD][/TR][TR][TD]Open connection sleep time[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]Total reopen connection timeout[/TD][TD]60000[/TD][TD]The total timeout to open HTTP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored.[/TD][/TR][/TABLE]
    RTMP protocol settings
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Interface[/TD][TD]System default[/TD][TD]The name of network card interface to use to open URL (in default case is network interface card chosen by operating system).[/TD][/TR][TR][TD]Open connetion timeout[/TD][TD]20000[/TD][TD]The timeout to open RTMP url in milliseconds.[/TD][/TR][TR][TD]Open connection sleep time[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]Total reopen connection timeout[/TD][TD]60000[/TD][TD]The total timeout to open RTMP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored.[/TD][/TR][/TABLE]
    RTSP protocol settings
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Interface[/TD][TD]System default[/TD][TD]The name of network card interface to use to open URL (in default case is network interface card chosen by operating system).[/TD][/TR][TR][TD]Open connetion timeout[/TD][TD]1500[/TD][TD]The timeout to open RTSP url in milliseconds.[/TD][/TR][TR][TD]Open connection sleep time[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]Total reopen connection timeout[/TD][TD]60000[/TD][TD]The total timeout to open RTSP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored.[/TD][/TR][TR][TD]Client port range[/TD][TD]50000 - 65535[/TD][TD]The minimum and maximum UDP port to be used in UDP transport.[/TD][/TR][TR][TD]Connection preference[/TD][TD]same connection, UDP, UDP multicast[/TD][TD]The preference of each type of streaming. If negotiation of type of streaming failed, then filter tries to negotiate another type of transport. Changing preference order usually lead to faster opening of RTSP url.[/TD][/TR][TR][TD]Ignore RTP payload type[/TD][TD]false (not checked)[/TD][TD]Specifies if filter have to ignore RTP packet payload type (in other case is RTP packet payload type compared to payload type specified in SDP).[/TD][/TR][/TABLE]
    UDP or RTP protocol settings
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Interface[/TD][TD]System default[/TD][TD]The name of network card interface to use to open URL (in default case is network interface card chosen by operating system).[/TD][/TR][TR][TD]Open connetion timeout[/TD][TD]1000[/TD][TD]The timeout to open UDP or RTP url in milliseconds.[/TD][/TR][TR][TD]Open connection sleep time[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection. UDP multicast protocol sometimes needs additional time to subscribe and unsubscribe from multicast group. In that case is recommended 200 milliseconds.[/TD][/TR][TR][TD]Total reopen connection timeout[/TD][TD]60000[/TD][TD]The total timeout to open UDP or RTP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored.[/TD][/TR][TR][TD]Receive data check interval[/TD][TD]500[/TD][TD]The time in milliseconds to check incomming data. If length of incoming data is same, then connection is assumed as lost and is closed and opened new connection.[/TD][/TR][/TABLE]
    MPEG2 Transport Stream parser settings
    When successfully tested stream (in playlist or database editor), you can access to MPEG2 Transport stream parser settings (m2ts_parser_in_editor.png). The MPEG2 Transport Stream parser settings are divided into three sections: basic settings, filtering program elements and stream analysis.

    The basic settings (m2ts_basic.png) controls simple parser functionality. Align to MPEG2 TS packet checkbox controls aligning stream to MPEG2 TS packet boundary. If this is not checked, then other functionality of MPEG2 TS parser will not work. Detect discontinuity checkbox controls detecting discontinuities in MPEG2 TS packets in stream. The information about discontinuity is logged into filter's log file. Set stream as not encrypted checkbox controls filter ability to clear all encryption flags and data in stream. It doesn't decrypt stream. This option can be useful if stream is not encrypted, but TV service detects stream as encrypted.

    Force stream identification box allow to change stream identification for TV service. It can be useful when stream identification is changing (e.g. because of provider), but channel is still same. When stream identification is changed TV service cannot tune to channel. Values for transport stream ID, program number and program map PID can be found in stream analysis section or can be set in playlist or database editor by pressing Set M2TS parser button. Forcing stream identification is not recommended in case of multiple programs in stream. In this case is also shown warning about multiple programs (m2ts_multiple_programs_warning.png).

    Filtering program elements section is used to filter specific programs in stream (e.g. single radio channel in multiple radio channels stream). After successful stream test is this section populated with detected information from stream. Each tab represents one Transport Stream program map section (PMT) with all program elements (audio, video, subtitles, etc).

    Transport stream program map PID text box can be used to manually create new filtering tab. Add button adds new filtering tab, Remove button remoes actually selected tab.



    Allow filtering program elements allows filter to leave selected program elements in stream. Leave program elements is populated with program element PIDs and only selected program elements are left in stream.

    Future plans
    • add back missing protocols and parsers (MMS)
    • transcoding to MPEG2 TS format
    Installation
    For proper filter working you need Microsoft Visual C++ 2013 Redistributable Package (x86). Install through MediaPortal Extensions Installer or download MPEI package.

    Reverting filter installation:
    1. close MediaPortal
    2. uninstall MediaPortal IPTV filter and url source splitter in MediaPortal Extensions Installer
    3. if you're using OnlineVideos, install MediaPortal Url Source Splitter through MediaPortal Extensions Installer
    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 MediaPortal
    2. clear TvService and MediaPortal log folder
    3. start TvService
    4. run MediaPortal
    5. watch channel in TV or watch video in OnlineVideos
    6. wait for bug or problem occur
    7. close MediaPortal
    8. stop TvService
    9. post all logs from TvService and MediaPortal log folder
    Note: In case of crash (MP or TvService) filter produce crash dump files in log folder (MP or TvService, it depends on which component crashed). Crash dump files are generated only in case, when any filter component is cause of crash. These files are big (approx. 200 MB), so they can't be packed and posted.

    Technical documentation
    Show Spoiler

    Supported URLs' formats
    Because filter comes from MediaPortal Url Source Splitter, which is part of OnlineVideos, then all URL's must conform of general URL format for OnlineVideos. General format for URL has this structure (used ABNF syntax, RFC 5234):
    Code (Text):
    1. URL         = PROTOCOLURL *1("####" PARAMETERS)
    2. PARAMETERS  = PARAMETER *("&" PARAMETER)
    3. PARAMETER   = NAME "=" VALUE
    4. NAME        = 1*ALPHADIGIT
    5. VALUE       = 1*(ALPHADIGIT / "%")
    6.  
    7. HOSTPORT    = HOST [ ":" PORT ]
    8. HOST        = HOSTNAME | HOSTNUMBER
    9. HOSTNAME    = *[ DOMAINLABEL "." ] TOPLABEL
    10. DOMAINLABEL = ALPHADIGIT | ALPHADIGIT *[ ALPHADIGIT | "-" ] ALPHADIGIT
    11. TOPLABEL    = ALPHA | ALPHA *[ ALPHADIGIT | "-" ] ALPHADIGIT
    12. PORT        = 1*DIGIT
    13. ALPHADIGIT  = ALPHA | DIGIT
    14. ALPHA       = LOWALPHA | HIGHALPHA
    15. LOWALPHA    = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
    16.               "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
    17.               "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
    18.               "y" | "z"
    19. HIGHALPHA   = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
    20.               "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
    21.               "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
    22. DIGIT       = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
    If in URL is specified ####, then HEADER part is ignored. In many cases is sufficient to specify only HEADER part of URL. Each parameter value MUST BE encoded for URL (in C# System.Web.HttpUtility.UrlEncode() method), this ensures that all special characters in parameter value (like space, ampersand (&), cross (#), equal (=), etc.) are properly encoded.

    General filter parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Url[/TD][TD]Empty[/TD][TD]The URL to open.[/TD][/TR][TR][TD]Interface[/TD][TD]Empty[/TD][TD]The name of network card interface to use to open URL (in default case is network interface card chosen by operating system).[/TD][/TR][TR][TD]LogFileName[/TD][TD]
    • Common application data\Team MediaPortal\MPIPTVSource.log - for IPTV
    • Common application data\Team MediaPortal\MPUrlSourceSplitter.log - for splitter
    [/TD][TD]Specifies log file name for filter.[/TD][/TR]
    [TR][TD]LogMaxSize[/TD][TD]10485760[/TD][TD]The maximum size of log file in bytes (default is 10 MB).[/TD][/TR][TR][TD]LogVerbosity[/TD][TD]4[/TD][TD]Log file verbosity level. Possible values are:
    • 0 - no messages are logged to log file
    • 1 - error messages are logged to log file
    • 2 - warning messages are logged to log file
    • 3 - information messages are logged to log file
    • 4 - verbose messages are logged to log file
    [/TD][/TR][TR][TD]MaxPlugins[/TD][TD]256[/TD][TD]The maximum value of plugins to be loaded.[/TD][/TR][TR][TD]CacheFolder[/TD][TD]
    • Common application data\Team MediaPortal\MPIPTVSource - for IPTV
    • Common application data\Team MediaPortal\MPUrlSourceSplitter - for splitter
    [/TD][TD]Specifies cache folder for filter. Here are stored temporary files for splitter or IPTV. They are used to minimize memory consumption and for faster seeking in streams.[/TD][/TR][TR][TD]LiveStream[/TD][TD]
    • 0 - for splitter
    • 1 - for IPTV
    [/TD][TD]The flag specifying that stream is live stream. Live streams should set this parameter to 1. IPTV has always this flag set to 1.[/TD][/TR][TR][TD]DumpProtocolInputData[/TD][TD]0[/TD][TD]The flag specifying that protocol input data should be dumped. The possible values are:
    • 0 - disabled
    • 1 - enabled
    [/TD][/TR]
    [TR][TD]DumpProtocolOutputData[/TD][TD]0[/TD][TD]The flag specifying that protocol output data should be dumped. The possible values are:
    • 0 - disabled
    • 1 - enabled
    [/TD][/TR][TR][TD]DumpParserInputData[/TD][TD]0[/TD][TD]The flag specifying that parser input data should be dumped. The possible values are:
    • 0 - disabled
    • 1 - enabled
    [/TD][/TR][TR][TD]DumpParserOutputData[/TD][TD]0[/TD][TD]The flag specifying that parser output data should be dumped. The possible values are:
    • 0 - disabled
    • 1 - enabled
    [/TD][/TR][TR][TD]DumpOutputPinData[/TD][TD]0[/TD][TD]The flag specifying that output pin data should be dumped. The possible values are:
    • 0 - disabled
    • 1 - enabled
    [/TD][/TR][/TABLE]
    Note: Unknown parameters are ignored by filter.

    UDP and RTP protocols
    UDP and RTP protocols URLs are in this format:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" *1(SOURCEHOST "@") LOCALHOST
    2. SCHEME      = 1*1("UDP" | "RTP")
    3. SOURCEHOST  = HOSTPORT
    4. LOCALHOST   = HOSTPORT
    The scheme of protocol can be "UDP" or "RTP", it doesn't matter. The protocol is determined on first received packet.

    Examples:
    • udp://233.10.12.1:7777
    • udp://@233.10.12.1:7777
    • udp://192.168.15.50:4477@233.10.12.1:7777
    UDP and RTP protocol parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]UdpOpenConnectionTimeout[/TD][TD]2000[/TD][TD]The timeout to open UDP or RTP url in milliseconds.[/TD][/TR][TR][TD]UdpOpenConnectionSleepTime[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection. UDP multicast protocol sometimes needs additional time to subscribe and unsubscribe from multicast group. In that case is recommended 200 milliseconds.[/TD][/TR][TR][TD]UdpTotalReopenConnectionTimeout[/TD][TD]60000[/TD][TD]The total timeout to open UDP or RTP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored in case of live stream (IPTV or specified live stream in OnlineVideos).[/TD][/TR][TR][TD]UdpReceiveDataCheckInterval[/TD][TD]500[/TD][TD]The time in milliseconds to check incomming data. If count of incoming data is same, then connection is assumed as lost and is closed and opened new connection.[/TD][/TR][/TABLE]
    Example of UDP URL with url (udp://@233.10.12.1:7777) and network interface (Local Area Connection):
    Code (Text):
    1. udp://@233.10.12.1:7777####Url=udp%3a%2f%2f%40233.10.12.1%3a7777&Interface=Local%20Area%20Connection
    HTTP protocol
    HTTP protocol URL is defined in RFC 1738. By general in format:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "http" | "https"
    Examples:
    • http://test.tv
    • http://test.tv/channel
    • http://test.tv:5678/channel
    HTTP protocol parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]HttpOpenConnectionTimeout[/TD][TD]20000[/TD][TD]The timeout to open HTTP url in milliseconds.[/TD][/TR][TR][TD]HttpOpenConnectionSleepTime[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]HttpTotalReopenConnectionTimeout[/TD][TD]60000[/TD][TD]The total timeout to open HTTP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored in case of live stream (IPTV or specified live stream in OnlineVideos).[/TD][/TR][TR][TD]HttpReferer[/TD][TD]Empty[/TD][TD]The value of referer HTTP header to send to remote server.[/TD][/TR][TR][TD]HttpUserAgent[/TD][TD]Empty[/TD][TD]The value of user agent HTTP header to send to remote server.[/TD][/TR][TR][TD]HttpCookie[/TD][TD]Empty[/TD][TD]The value of cookie HTTP header to send to remote server.[/TD][/TR][TR][TD]HttpVersion[/TD][TD]0[/TD][TD]Forces to use specific HTTP protocol version. Possible values are:
    • 0 - automatic HTTP protocol version (by default it is HTTP 1.1)
    • 1 - forces to use HTTP 1.0
    • 2 - forces to use HTTP 1.1
    [/TD][/TR][TR][TD]HttpIgnoreContentLength[/TD][TD]0[/TD][TD]Specifies if content length HTTP header have to be ignored (e.g. because server reports bad content length). Possible values are:
    • 0 - doesn't ignore content length HTTP header
    • 1 - ignore content length HTTP header
    [/TD][/TR][TR][TD]HttpCookiesCount[/TD][TD]0[/TD][TD]Specifies the count of HTTP cookies parameters (HttpCookie00000000, HttpCookie00000001, etc.).[/TD][/TR][TR][TD]HttpCookie%08u[/TD][TD]Empty[/TD][TD]The value of specific HTTP cookie in Netscape or Mozilla format or regular HTTP style cookie header. HTTP cookies are used to initialize cookie engine, but used are only these cookies, which are related to HTTP url. The parameters are indexed from zero.[/TD][/TR][TR][TD]HttpSeekingSupported[/TD][TD]0[/TD][TD]Specifies if seeking is supported by specifying range HTTP header in request. The possible values are:
    • 0 - seeking is not supported
    • 1 - forces seeking support
    [/TD][/TR][TR][TD]HttpSeekingSupportDetection[/TD][TD]1[/TD][TD]Enables or disables automatic detection of seeking support. The possible values are:
    • 0 - automatic detection is disabled (in that case is seeking support specified by HttpSeekingSupported parameter)
    • 1 - automatic detection is enabled
    [/TD][/TR][TR][TD]HttpServerAuthenticate[/TD][TD]0[/TD][TD]Enables or disables remote server authentication. The possible values are:
    • 0 - authentication is disabled
    • 1 - authentication is enabled
    [/TD][/TR][TR][TD]HttpServerUserName[/TD][TD]Empty[/TD][TD]The remote server user name.[/TD][/TR][TR][TD]HttpServerPassword[/TD][TD]Empty[/TD][TD]The remote server password.[/TD][/TR][TR][TD]HttpProxyServerAuthenticate[/TD][TD]0[/TD][TD]Enables or disables proxy server authentication. The possible values are:
    • 0 - proxy server authentication is disabled
    • 1 - proxy server authentication is enabled
    [/TD][/TR][TR][TD]HttpProxyServer[/TD][TD]Empty[/TD][TD]The URL or IP address of proxy server.[/TD][/TR][TR][TD]HttpProxyServerPort[/TD][TD]Empty[/TD][TD]The proxy server port.[/TD][/TR][TR][TD]HttpProxyServerUserName[/TD][TD]Empty[/TD][TD]The proxy server user name.[/TD][/TR][TR][TD]HttpProxyServerPassword[/TD][TD]Empty[/TD][TD]The proxy server password.[/TD][/TR][TR][TD]HttpProxyServerType[/TD][TD]1[/TD][TD]The type of proxy server. The possible values are:
    • 0 - no proxy server type, invalid value
    • 1 - HTTP proxy server
    • 2 - HTTP/1.0 proxy server
    • 3 - SOCKS4 proxy server
    • 4 - SOCKS5 proxy server
    • 5 - SOCKS4A proxy server
    • 6 - SOCKS5 proxy server with resolving hostname
    [/TD][/TR][/TABLE]Example of HTTP URL with url (http://www.youtube.com), referer (http://www.test.tv) and user agent (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0):
    Code (Text):
    1. http://www.youtube.com####Url=http%3a%2f%2fwww.youtube.com&HttpReferer=http%3a%2f%2fwww.test.tv&HttpUserAgent=Mozilla%2f5.0+(Windows+NT+6.1%3b+WOW64%3b+rv%3a24.0)+Gecko%2f20100101+Firefox%2f24.0
    RTSP protocol
    RTSP protocol URL has same format as HTTP protocol URL, except scheme:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "rtsp"
    Examples:
    • rtsp://test.tv
    • rtsp://test.tv/channel
    • rtsp://test.tv:5678/channel
    RTSP protocol parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]RtspOpenConnectionTimeout[/TD][TD]20000[/TD][TD]The timeout to open RTSP url in milliseconds.[/TD][/TR][TR][TD]RtspOpenConnectionSleepTime[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]RtspTotalReopenConnectionTimeout[/TD][TD]60000[/TD][TD]The total timeout to open RTSP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored in case of live stream (IPTV or specified live stream in OnlineVideos).[/TD][/TR][TR][TD]RtspMulticastPreference[/TD][TD]2[/TD][TD]The preference of multicast UDP transport.[/TD][/TR][TR][TD]RtspUdpPreference[/TD][TD]1[/TD][TD]The preference of unicast UDP transport.[/TD][/TR][TR][TD]RtspSameConnectionTcpPreference[/TD][TD]0[/TD][TD]The preference of interleaved TCP transport.[/TD][/TR][TR][TD]RtspClientPortMin[/TD][TD]50000[/TD][TD]The minimum UDP port to be used in UDP transport.[/TD][/TR][TR][TD]RtspClientPortMax[/TD][TD]65535[/TD][TD]The maximum UDP port to be used in UDP transport.[/TD][/TR][TR][TD]RtspIgnoreRtpPayloadType[/TD][TD]0[/TD][TD]Value set to 1 ignores check of received RTP packets payload type against payload type specified in SDP.[/TD][/TR][/TABLE]
    The RTSP protocol negotiate way how to transport data from server to client. The filter needs to know which transport is more preferred by user (e.g. because of firewalls, NATs, routers, etc.). For this purpose there are three parameters: RtspMulticastPreference, RtspUdpPreference and RtspSameConnectionTcpPreference. More preferred transport is that with lower value. In default configuration is transport of data negotiated in this order: same TCP connection, new UDP connection and last is new multicast UDP connection. If your server supports only specific type of connection or you simply want to reorder negotiations, just change these three parameters values. Reordering negotiations can lead to faster opening of RTSP URLs, because filter doesn't create RTSP requests which are denied by remote RTSP server (because of unsupported transport).

    For UDP connection there are two additional parameters: RtspClientPortMin and RtspClientPortMax. They specify minimum and maximum UDP ports to be used in negotiating transport.

    Example of RTSP URL with url (rtsp://test.tv:5678/channel), network interface (Local Area Connection), preferred order of transports (first UDP, second same TCP, third multicast UDP) and minimum UDP client port (55000):
    Code (Text):
    1. rtsp://test.tv:5678/channel####Url=rtsp%3a%2f%2ftest.tv%3a5678%2fchannel&Interface=Local%20Area%20Connection&RtspUdpPreference=0&RtspSameConnectionTcpPreference=1&RtspClientPortMin=55000
    RTMP protocol
    RTMP protocol is proprietary protocol. RTMP protocol URL is in format:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "rtmp" | "rtmpt" | "rtmpe" | "rtmpte" | "rtmps" | "rtmpts"
    Examples:
    • rtmp://test.tv
    • rtmp://test.tv/channel
    • rtmp://test.tv:5678/channel
    RTMP protocol parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]RtmpOpenConnectionTimeout[/TD][TD]20000[/TD][TD]The timeout to open RTMP url in milliseconds.[/TD][/TR][TR][TD]RtmpOpenConnectionSleepTime[/TD][TD]0[/TD][TD]The time in milliseconds to sleep before opening connection.[/TD][/TR][TR][TD]RtmpTotalReopenConnectionTimeout[/TD][TD]60000[/TD][TD]The total timeout to open RTMP url in milliseconds. It is applied when lost connection and trying to open new one. Filter will be trying to open connection until this timeout occurs. This parameter is ignored in case of live stream (IPTV or specified live stream in OnlineVideos).[/TD][/TR][TR][TD]RtmpApp[/TD][TD]Empty[/TD][TD]Name of application to connect to on the RTMP server.[/TD][/TR][TR][TD]RtmpTcUrl[/TD][TD]Empty[/TD][TD]URL of the target stream.[/TD][/TR][TR][TD]RtmpPageUrl[/TD][TD]Empty[/TD][TD]URL of the web page in which the media was embedded.[/TD][/TR][TR][TD]RtmpSwfUrl[/TD][TD]Empty[/TD][TD]URL of the SWF player for the media.[/TD][/TR][TR][TD]RtmpFlashVer[/TD][TD]Empty[/TD][TD]Version of the Flash plugin used to run the SWF player.[/TD][/TR][TR][TD]RtmpAuth[/TD][TD]Empty[/TD][TD]Authentication string to be appended to the connect string.[/TD][/TR][TR][TD]RtmpArbitraryData[/TD][TD]Empty[/TD][TD]Appends arbitrary AMF data to the Connect message. The type must be B for Boolean, N for number, S for string, O for object, or Z for null. For Booleans the data must be either 0 or 1 for FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or 1 to end or begin an object, respectively. Data items in subobjects may be named, by prefixing the type with 'N' and specifying the name before the value, e.g. NB:myFlag:1. This option may be used multiple times to construct arbitrary AMF sequences. E.g. conn=B:1 conn=S:authMe conn=O:1 conn=NN:code:1.23 conn=NS:flag:ok conn=O:0[/TD][/TR][TR][TD]RtmpPlayPath[/TD][TD]Empty[/TD][TD]The play path of media.[/TD][/TR][TR][TD]RtmpPlaylist[/TD][TD]0[/TD][TD]If the value is 1, issue a set_playlist command before sending the play command.[/TD][/TR][TR][TD]RtmpLive[/TD][TD]0[/TD][TD]If the value is 1, specifies that the media is a live stream. This flag is only for RTMP protocol and it has different meaning as LiveStream parameter.[/TD][/TR][TR][TD]RtmpSubscribe[/TD][TD]Empty[/TD][TD]Name of live stream to subscribe to.[/TD][/TR][TR][TD]RtmpBuffer[/TD][TD]30000[/TD][TD]Sets buffer time to specified value in milliseconds.[/TD][/TR][TR][TD]RtmpToken[/TD][TD]Empty[/TD][TD]Key for SecureToken response, used if the server requires SecureToken authentication.[/TD][/TR][TR][TD]RtmpJtv[/TD][TD]Empty[/TD][TD]JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken.[/TD][/TR][TR][TD]RtmpSwfVerify[/TD][TD]0[/TD][TD]If the value is 1, the SWF player is retrieved from the specified RtmpSwfUrl for performing SWF Verification. The SWF hash and size (used in the verification step) are computed automatically.[/TD][/TR][/TABLE]
    Example of RTMP URL with url (rtmp://rtmp.server.tv), application (/vod/test.flv), target stream URL (rtmp://rtmp.server.tv/vod/test.flv), page URL (http://my.server.tv), SWF file URL (http://my.server.tv/sources/player.swf) and verification (1):
    Code (Text):
    1. rtmp://rtmp.server.tv####Url=rtmp%3a%2f%2frtmp.server.tv&RtmpApp=%2fvod%2ftest.flv&RtmpTcUrl=rtmp%3a%2f%2frtmp.server.tv%2fvod%2ftest.flv&RtmpPageUrl=http%3a%2f%2fmy.server.tv&RtmpSwfUrl=http%3a%2f%2fmy.server.tv%2fsources%2fplayer.swf&RtmpSwfVerify=1
    AFHS protocol
    AFHS (Adobe Flash HTTP Streaming) protocol URL has same format as HTTP protocol URL, except scheme:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "afhs"
    Examples:
    • afhs://test.tv
    • afhs://test.tv/channel
    • afhs://test.tv:5678/channel
    AFHS protocol parameters
    All HTTP protocol parameters are allowed for AFHS protocol. The following parameters are added for AFHS protocol:
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]AfhsSegmentFragmentUrlExtraParameters[/TD][TD]Empty[/TD][TD]Specifies string, which is added to each segment and fragment HTTP URL.[/TD][/TR][TR][TD]AfhsBootstrapInfo[/TD][TD]Empty[/TD][TD]The content of bootstrap info in BASE64 encoding.[/TD][/TR][TR][TD]AfhsBaseUrl[/TD][TD]Empty[/TD][TD]The base URL to create stream segements and fragments URL. Created from manifest URL, omitted is everything including last forward slash of path.[/TD][/TR][TR][TD]AfhsMediaPartUrl[/TD][TD]Empty[/TD][TD]The content of url attribute of media element in manifest.[/TD][/TR][TR][TD]AfhsMediaMetadata[/TD][TD]Empty[/TD][TD]The content of metadata element in media element in manifest.[/TD][/TR][TR][TD]AfhsMediaBootstrapInfoUrl[/TD][TD]Empty[/TD][TD]The URL to bootstrap info (if specified in manifest).[/TD][/TR][TR][TD]AfhsManifestUrl[/TD][TD]Empty[/TD][TD]The URL to manifest.[/TD][/TR][TR][TD]AfhsManifestContent[/TD][TD]Empty[/TD][TD]The content of Flash Media Manifest (F4M file).[/TD][/TR][/TABLE]Note: DRM protected streams are not supported.

    MSHS protocol
    MSHS (Microsoft Smooth HTTP Streaming) protocol URL has same format as HTTP protocol URL, except scheme:

    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "mshs"
    Examples:
    • mshs://test.tv
    • mshs://test.tv/channel
    • mshs://test.tv:5678/channel
    MSHS protocol parameters
    All HTTP protocol parameters are allowed for MSHS protocol. The following parameters are added for AFHS protocol:
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]MshsBaseUrl[/TD][TD]Empty[/TD][TD]The base URL to create stream fragments URL. Created from manifest URL, omitted is everything including last forward slash of path.[/TD][/TR][TR][TD]MshsManifest[/TD][TD]Empty[/TD][TD]The content of manifest, zipped and encoded to BASE64 encoding.[/TD][/TR][/TABLE]Note: DRM protected streams are not supported.
    Note: From family of possible video and audio formats are supported:
    • video: H264
    • audio: AACL
    M3U8 protocol
    M3U8 (Apple HTTP live streaming) protocol URL has same format as HTTP protocol URL, except scheme:
    Code (Text):
    1. PROTOCOLURL = SCHEME "://" HOSTPORT [ "/" PATH ]
    2. SCHEME      = "m3u8"
    Examples:
    • afhs://test.tv
    • afhs://test.tv/channel
    • afhs://test.tv:5678/channel
    M3U8 protocol parameters
    All HTTP protocol parameters are allowed for MSHS protocol. The following parameters are added for M3U8protocol:
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]M3u8PlaylistUrl[/TD][TD]Empty[/TD][TD]The M3U8 playlist URL.[/TD][/TR][TR][TD]M3u8PlaylistContent[/TD][TD]Empty[/TD][TD]The playlist content (compressed by zlib) in BASE64 encoding.[/TD][/TR][/TABLE]Note: DRM protected streams are not supported.
    Note: Currently are supported only media playlists up to version 7, but tested were only up to version 3.

    Parsers
    The filter can parse and handle several types of files:
    This means that you don't have to specify specific AFHS, MSHS or M3U8 protocol url, just specify HTTP url to F4M file, MSHS manifest file or M3U8 playlist file.

    MPEG2 Transport Stream parser
    MPEG2 Transport Stream parser do several changes to MPEG2 stream:
    • align MPEG2 transport stream packets to their boundary
    • detects discontinuity in MPEG2 stream based on continuity counters of MPEG2 transport stream packets
    • can change transport stream ID in program association section (TSID in PAT)
    • can change program number in program association section (program number in PAT) and transport stream program map section (program number in PMT)
    • can change program map PID and PID of PSI packets containing transport stream program map (PMT PID)
    The last three options (changing transport stream ID, changing program number and/or changing program map PID) you need to use in case that your provider is chaning this identificators in stream and you need to rescan channels in TV-Server Configuration tool.

    Note: MPEG2 Transport Stream parser can change program number and/or program map PID only in case that in MPEG2 stream is only one program.

    MPEG2 Transport Stream parser parameters
    [TABLE][TR][TD]Parameter name[/TD][TD]Default value[/TD][TD]Specification[/TD][/TR][TR][TD]Mpeg2TsDetectDiscontinuity[/TD][TD]1[/TD][TD]Enables or disables discontinuity detection by analysing continuity counters of packets. Possible values are:
    • 0 - discontinuity detection is disabled
    • 1 - discontinuity detection is enabled
    [/TD][/TR][TR][TD]Mpeg2TsAlignToMpeg2TSPacket[/TD][TD]1[/TD][TD]Align MPEG2 Transport Stream packets to their boundaries. It is strongly recommended to have this option left in default configuration. Without properly aligned MPEG2 packets, other functions in parser will not work. Probably also filter stops working (depending if you're using splitter or IPTV filter). Possible values are:
    • 0 - aligning of packets is disabled
    • 1 - aligning of packets is enabled
    [/TD][/TR][TR][TD]Mpeg2TsTransportStreamID[/TD][TD]Empty[/TD][TD]The value of transport stream ID in program association section (PAT).[/TD][/TR][TR][TD]Mpeg2TsProgramNumber[/TD][TD]Empty[/TD][TD]The value of program number in program association section (PAT) and transport stream program map section (PMT).[/TD][/TR][TR][TD]Mpeg2TsProgramMapPID[/TD][TD]Empty[/TD][TD]The value of program map PID in program association section (PAT) and PID of packet containing transport stream program section (PMT).[/TD][/TR][/TABLE]
     

    Attached Files:

    Last edited: February 1, 2016
    • Thank You! Thank You! x 8
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,379
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    About FFmpeg : the next step is to use NUGET.
    @Sebasti.

    But : the first approch is to find Bug (but who said, it is bugged ???? :whistle: )
    Cable card support if we have regression ( maybe no relation ) or enhancement ...

    Eh, maybe ready for the RED line of MP 1.6 :D many thanks. :notworthy:
     
  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
    Probably impossible to include FFmpeg as NUGET. Filter/splitter has slightly changed FFmpeg libraries (mainly because of seeking in streams). Also each compilation of FFmpeg produce specific set of header files, which must be included into project.

    Edit: same with CURL and RTMP.
     
    Last edited: August 20, 2013
  5. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,379
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,237
    Likes Received:
    6,201
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,199 / 9
    Home Country:
    France France
    Show System Specs
    So next step will be to do like other filter (build from BOT/Batch) :)
     
  7. 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 should be ready for compilation. Try to open MPUrlSourceSplitter.sln and try to build. As I remember, only DSHOW_BASE variable must be set. I know that this is changed in newer version of MP and I change it ASAP. And also I'll add whole MPUrlSourceSplitter solution into Filters solution.
     
    • Like Like x 1
  8. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,379
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    Info :
    Georgius : your (next) title commit should includ the Jira number MP1-4155 on each commit for have view ( change) in Jira
     
    • Agree Agree x 1
  9. azzuro
    • Team MediaPortal

    azzuro Test Group

    Joined:
    May 10, 2007
    Messages:
    8,379
    Likes Received:
    2,467
    Occupation:
    technician HVAC
    Location:
    France - IDF
    Ratings:
    +4,123 / 13
    Home Country:
    France France
    Show System Specs
    few error for compil
    Code (Text):
    1.     2   IntelliSense : impossible d'ouvrir le fichier source "streams.h"    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   28  1   MPUrlSourceSplitter_Interfaces
    2.     1   IntelliSense : impossible d'ouvrir le fichier source "ParameterCollection.h"    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   26  1   MPUrlSourceSplitter_Interfaces
    3.     9   IntelliSense : impossible d'ouvrir le fichier source "MediaPacketCollection.h"  e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iparserplugin.h 27  1   MPUrlSourceSplitter_Interfaces
    4.     5   IntelliSense : identificateur "HRESULT" non défini e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   55  11  MPUrlSourceSplitter_Interfaces
    5.     4   IntelliSense : identificateur "GUID" non défini    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   50  11  MPUrlSourceSplitter_Interfaces
    6.     3   IntelliSense : identificateur "CParameterCollection" non défini    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   35  3   MPUrlSourceSplitter_Interfaces
    7.     6   IntelliSense : identificateur "CParameterCollection" non défini    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   62  33  MPUrlSourceSplitter_Interfaces
    8.     8   IntelliSense : identificateur "CParameterCollection" non défini    e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   63  44  MPUrlSourceSplitter_Interfaces
    9.     7   IntelliSense : identificateur "configuration" non défini   e:\svnroot\1.mediaportal\mediaportal-1\directshowfilters\mpurlsourcesplitter\mpurlsourcesplitter\mpurlsourcesplitter_interfaces\iplugin.h   62  55  MPUrlSourceSplitter_Interfaces
    10.  
    EDIT :
    Streams.h was not available on my system (DX10 SDK installed)

    i have installed PSDK
    http://www.microsoft.com/en-us/download/details.aspx?id=6510

    now is available but VS2010 don't found it!
     
    Last edited: August 20, 2013
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,237
    Likes Received:
    6,201
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,199 / 9
    Home Country:
    France France
    Show System Specs

    Hi,
    We should get rid of :
    DirectShowFilters\bin_Win32
    DirectShowFilters\bin_Win32d
    It give 28mb for each branch.

    Do you think it's possible to build within building process ? (There is no bin in lavsplitter too and all dll are build from a batch).
    In fact, we need to submodule ffmpeg code (if needed) and then add in build process.
    Update the wiki if needed extra config/tool (MSYS maybe) etc. :)
     
    • Agree Agree x 1
  11. 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
    Were you compiling initial commit? It has dependency on DSHOW_BASE and WIN 7 SDK (probably you don't have installed).
     
Loading...

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!