MERGING MediaPortal Url Source Splitter & IPTV Filter (11 Viewers)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Georgius, it's not easy to reproduce with DVB EPG but i think i'm able to force by tuning channel, so i will post log from this test :

    I have 4 DVB-IP card. (1 / 6 / 7 and 8 ID)
    TF1 TNT is mapped to DVB-IP ID card 8.
    6TER TNT is mapped to DVB-IP ID card 1 and 8.

    From SetupTV, i'm timeshift TF1 TNT.
    From MP, i try to tune 6TER TNT (so it try Card1)

    So it can't tune because TF1 and 6TER are not on same mux.
    So it try to use DVB-IP card 1 while TF1 is already running.

    In that special case, memory goes up each time i try to tune 6TER (it take 5mb on each tune and so on and so on).

    So i suppose when i have see TvService to 1.7GB of ram, it's because in 24H it try to grab some EPG between few channel (wrongly mapped).
    But that lead to the fact that something is wrong, it's maybe not a memory leak lol.
    And here the timeshift file timeout is not respected, so maybe we need an event to force to close IPTV tuning when it reach timeshift timeout.

    Not sure if it helps, i will log the above scenario with 3 tuning try (6TER channel).

    Seb.
     

    Attachments

    • SetupTV_Config.JPG
      SetupTV_Config.JPG
      150.9 KB

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    I tested it with the OctopusNet as source and it isn't working.
    I'm not sure if I do something wrong, maybe you can tell me more :)

    Edit:
    Maybe I should say that I did a channel scan in SetupTv :)
    It's little bit complicated. Your provider doesn't answer on SETUP RTSP request as filter excepts (filter specifies ports where is listening, but answer doesn't contain these ports). After this request, is approx. one minute of failures (it seems that requesting same stream fail for one minute, because previous request (request with bad answer) is not ended.

    I try to made some changes, I hope that you can make some tests for me.
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    47
    Germany - Bonn
    Home Country
    Germany Germany
    I tested it with the OctopusNet as source and it isn't working.
    I'm not sure if I do something wrong, maybe you can tell me more :)

    Edit:
    Maybe I should say that I did a channel scan in SetupTv :)
    It's little bit complicated. Your provider doesn't answer on SETUP RTSP request as filter excepts (filter specifies ports where is listening, but answer doesn't contain these ports). After this request, is approx. one minute of failures (it seems that requesting same stream fail for one minute, because previous request (request with bad answer) is not ended.

    I try to made some changes, I hope that you can make some tests for me.

    first rtsp by sat2ip Devices uses 554
    the rtp can you Chose rtcp should be rtp +1 so is it describe in the spec
    here a exsample of my Sat2Ip Library http://code.google.com/p/sat2ip/sou...rary/trunk/Sat2Ip.Library/Rtsp/RtspSession.cs

    Code:
    public bool Setup(string query)
     
    		{
     
    			var result = false;
     
    			if ((_rtspSocket==null))
     
    			{
     
    				Connect();
     
    			}
     
    			var sb = new StringBuilder();
     
    			if (string.IsNullOrEmpty(_rtspSessionId))
     
    			{
     
    				sb.AppendFormat("{0} ", "SETUP");
     
    				sb.AppendFormat("rtsp://{0}:{1}/?{2} RTSP/1.0\r\n", RtspDevice.RtspServerAddress,RtspDevice.RtspServerPort, query);
     
    				sb.AppendFormat("CSeq: {0}\r\n", (++_rtspSequenceNum).ToString(CultureInfo.InvariantCulture));
     
    				sb.AppendFormat("Transport: RTP/AVP;unicast;client_port={0}-{1}\r\n\r\n",  RtspDevice.RtpClientPort, RtspDevice.RtcpClientPort);
     
    			}
     
    			else
     
    			{
     
    				sb.AppendFormat("{0} ", "SETUP");
     
    				sb.AppendFormat("rtsp://{0}:{1}/?{2} RTSP/1.0\r\n", RtspDevice.RtspServerAddress, RtspDevice.RtspServerPort, query);
     
    				sb.AppendFormat("CSeq: {0}\r\n", (++_rtspSequenceNum).ToString(CultureInfo.InvariantCulture));
     
    				sb.AppendFormat("Session: {0}\r\n", _rtspSessionId);
     
    				sb.AppendFormat("Transport: RTP/AVP;unicast;client_port={0}-{1}\r\n\r\n",  RtspDevice.RtpClientPort, RtspDevice.RtcpClientPort);
     
    			}
     
    			result = SendRequest(sb.ToString());
     
    			result = GetResponse();
     
    			var lineArray = Regex.Split(RtspResponse, @"[\r\n]+");
     
    			foreach (var s in lineArray)
     
    			{
     
    				if(s.Contains("Date:"))
     
    				{}
     
    				if (s.Contains("Session:"))
     
    				{
     
    					var sessionline = s;
     
    					if (string.IsNullOrEmpty(sessionline))
     
    					{
     
     
     
    					}
     
    					var sessionlinevalues = sessionline.Split(';');
     
    					var sessionvalues = sessionlinevalues[0].Split(':');
     
    					_rtspSessionId = sessionvalues[1];
     
    					if(sessionlinevalues.Length> 1)
     
    					{
     
    						var ttlvalues = sessionlinevalues[1].Split('=');
     
    						_rtspSessionTimeToLive = int.Parse(ttlvalues[1]);
     
    					}
     
    				 
     
    				}
     
    				if (s.Contains("Transport:"))
     
    				{
     
    					var transportline = s;
     
    					if (string.IsNullOrEmpty(transportline))
     
    					{
     
     
     
    					}
     
    					var transportvalues = transportline.Split(';');
     
    					foreach (var transportvalue in transportvalues)
     
    					{
     
    						if (transportvalue.Contains("server_port"))
     
    						{
     
    							var serverportvalues = transportvalue.Substring(("server_port").Length)
     
    																.Trim()
     
    																.Split('=');
     
     
     
    							var ports = serverportvalues[1].Split('-');
     
    							ServerRtpPort = ports[0];
     
    							ServerRtcpPort = ports[1];
     
    						}
     
    						if (transportvalue.Contains("destination"))
     
    						{
     
    							var destinationvalues = transportvalue.Substring(("destination").Length)
     
    																.Trim()
     
    																.Split('=');
     
    							Destination = destinationvalues[1];
     
    						}
     
    						if (transportvalue.Contains("source"))
     
    						{
     
     
     
    						}
     
    					}
     
    				}
     
    				if (s.Contains("com.ses.streamID:"))
     
    				{
     
    					RtspStreamId = s.Substring(("com.ses.streamID:").Length).Trim();
     
    				}
     
    			}
     
     
     
    			return result;
     
    		}

    PS dont add &fe or &fec attributes and values to query Digital Devices send than a Bad Request
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    PS dont add &fe or &fec attributes and values to query Digital Devices send than a Bad Request
    Hmmm, will have to have a chat to DD about that. We'd prefer to use fe because MP would control the tuner allocation. Some other tuners might require fec so better if DD could ignore it rather than responding with "bad request".
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    I tested it with the OctopusNet as source and it isn't working.

    I'm not sure if I do something wrong, maybe you can tell me more :)



    Edit:

    Maybe I should say that I did a channel scan in SetupTv :)

    It's little bit complicated. Your provider doesn't answer on SETUP RTSP request as filter excepts (filter specifies ports where is listening, but answer doesn't contain these ports). After this request, is approx. one minute of failures (it seems that requesting same stream fail for one minute, because previous request (request with bad answer) is not ended.



    I try to made some changes, I hope that you can make some tests for me.



    first rtsp by sat2ip Devices uses 554

    the rtp can you Chose rtcp should be rtp +1 so is it describe in the spec

    here a exsample of my Sat2Ip Library http://code.google.com/p/sat2ip/sou...rary/trunk/Sat2Ip.Library/Rtsp/RtspSession.cs

    As I can see, you support only one type of transport of possible four (there are interleaved transport, multicast, UDP (this type you support) and TCP). And also I didn't that you support more than one track. Or I'm wrong?

    Anyway, the core of problem is, that server have to respond to my request with my client ports specified. But server responds with client ports 0 and 0. So, in that case I'm not sure, if server understand my request correctly.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Hmmm, will have to have a chat to DD about that. We'd prefer to use fe because MP would control the tuner allocation. Some other tuners might require fec so better if DD could ignore it rather than responding with "bad request".
    could you set me CC again, please? :)


    I try to made some changes, I hope that you can make some tests for me.
    Sure, I will test it as soon as you provide a new version :p At least I will do my best to do it as soon as possible ;)
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    I try to made some changes, I hope that you can make some tests for me.
    Sure, I will test it as soon as you provide a new version :p At least I will do my best to do it as soon as possible ;)
    Can you try attached version? You should get same result as with previous, but I need to check if after SETUP request will be in case of failure called TEARDOWN (if version from first it isn't called). So, clean all logs and don't forget to attach new.
     

    Attachments

    • MPUrlSourceSplitter_IPTV.zip
      4.2 MB

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I will test it in the near future. The Onet dropped out again (see private conversation). So I have to disassemble it and check the battery :/ Hopefully it will work than again... This seems to be a really rare issue and is already addressed in some change in the production as far as I know :)

    And thanks for your work (y)
     
    Last edited:

    Users who are viewing this thread

    Top Bottom