IPTV not working (1 Viewer)

mikeyko

Retired Team Member
  • Premium Supporter
  • February 14, 2008
    194
    49
    Home Country
    Slovakia Slovakia
    Hi guys,

    yes, iptv source plugin did not support rtp, only raw udp

    Thank you Stepko, I will try if your changed filter works with raw udp. I will report results here

    Edit: works for me without problems, SD, I can not try HD

    Can you release your sources so I can look at your changes? It will be step forward to support rtp
     

    Stepko

    Retired Team Member
  • Premium Supporter
  • September 29, 2007
    186
    152
    Hamburg/Wolfsburg
    Home Country
    Germany Germany
    AW: Re: IPTV not working

    Here is a new version of the dx filter. I added the already mentioned features: The filter now reorders packages when they arrive in the wrong order. It also recognizes dropped packages and informs the next filter that the stream is interrupted. With the Microsoft DTV filter on my Win7 machine this works surprisingly well. All these things works only on rtp streams, of course.

    SD Channels are working fine on Hansenet/Alice with your version of MPIPTVSource now but the HD Channels don´t work anymore... Is there some workaround for this issue?
    Hansenet seems to use raw udp packets for the HD channels. This version of MPIPTVSource keeps an eye on the header of the packages. If there are 5 packages in a row with no valid rtp header it switches back to raw udp. So HD should work with this version again. BUT you should change the url of the HD channels from "rtp://..." to "udp://..." as the stream seems to be a raw udp stream.
    Can you please check if hd channels work with both urls. Thx!

    the alice wlan modem router have one dedicated port for the ip tv,but this port dont provide internet for my htpc how to make to have also internet and the ip tv from alice wlan modem router??
    Perhaps you can configure this in the adminitstration panel? Or you can use another router that puts the stream on one line, but this router must support multicast! I think the simplest way is to put a second lan adapter in the pc.


    @mikeyko: Sure, I can post the sources tonight, right now I'm at work. But I think there is a small bug in the filter. I think the filter may hang if there is a massive packet loss and the rtp sequence number resets at the same time. I will validate this during the week. Hopefully the changes can be included in the svn....

    Stepko

    Edit: New version of filter can be found here.
     

    nikos1671

    Portal Pro
    April 21, 2008
    244
    8
    47
    Germany
    Home Country
    Greece Greece
    thanks for your work and your answears, the alice wlan router have poor option for configuration,the option for second lan adapter is not possible as i use ascrock ion 330.i was wondering if i can connect both lines internet and tv port on a switch and then the ascrock what you think will this work??
     

    burnerbaum

    MP Donator
  • Premium Supporter
  • November 25, 2006
    25
    0
    Home Country
    Germany Germany
    Re: AW: Re: IPTV not working

    Hansenet seems to use raw udp packets for the HD channels. This version of MPIPTVSource keeps an eye on the header of the packages. If there are 5 packages in a row with no valid rtp header it switches back to raw udp. So HD should work with this version again. BUT you should change the url of the HD channels from "rtp://..." to "udp://..." as the stream seems to be a raw udp stream.
    Can you please check if hd channels work with both urls. Thx!

    I just tested the new filter and it works fine on SD and HD with both url. So thanks again for that work! Will test stability and so on the next days and will report issues to this thread.

    thanks for your work and your answears, the alice wlan router have poor option for configuration,the option for second lan adapter is not possible as i use ascrock ion 330.i was wondering if i can connect both lines internet and tv port on a switch and then the ascrock what you think will this work??

    I don´t think that will work cause if your router can´t handle multicast your lan will be "flooded" with multicast and probably internet will still not work. I tested different configurations of routers some time ago and finally put a second lan adapter in my htpc cause it was the easiest and most stable solution!
     

    nikos1671

    Portal Pro
    April 21, 2008
    244
    8
    47
    Germany
    Home Country
    Greece Greece
    ok thats was easy,just had around an extra wlan router dlink di-524 and hook up 2 ports from alice router and then the htpc port and nta nta they work perfect internet and tv.i will test it more to see if i have side effects in the internet speed or tv and report back.
     

    Stepko

    Retired Team Member
  • Premium Supporter
  • September 29, 2007
    186
    152
    Hamburg/Wolfsburg
    Home Country
    Germany Germany
    AW: Re: IPTV not working

    Attached you will find the source code of the MPIPTVSource filter (just the two files I edited). I think its the best if I shortly sum up what I changed:
    • I think the use of functions is now more they way microsoft intended it to be. Everything is done in FillBuffer(), which is now called from the parent class. OnThreadStartPlay() is used and DoBufferProcessingLoop() is not overwritten any longer. I removed all the thread stuff, because it is done in the parent-class (CSourceStream in source.cpp).
    • I raised the buffer of one mediaSample to 256kb, I have less stutters with this buffersize
    • Raw udp packets are passed to the mediaSample as soon as they arrive. On a raw upd stream all mediaSamples contain only the data of one packet.
    • I replaced the old buffer with a single linked list. Using a single linked list, it is easily possible to add packets somewhere in the middle of the buffer. The buffer (or a part of it) is passed to the mediaSample as soon as it reaches a maximum size or if there are enough continous packets to fill the mediaSample buffer. The single linked list is flattened and copied to the mediaSample buffer. There is one pointer to the start of the list (firstItem) and one to the end (lastItem).
    I think it would be good if you have a look at the code. Mostly I used primitive types and I think there are better datatypes for some variables. Usually I don't do programming for the Windows platform.


    To fully support rtp there are some more things to take care of: The type of data in the rtp packet should be checked. Right now the filter is assuming that it is MP2T. It also doesn't work if there is a header extension or if the padding bit is set.

    ok thats was easy,just had around an extra wlan router dlink di-524 and hook up 2 ports from alice router and then the htpc port and nta nta they work perfect internet and tv.i will test it more to see if i have side effects in the internet speed or tv and report back.
    As burnerbaum already said will your network now be flooded with multicast traffic. This isn't actually a problem, because sd channels need about 2,4 to 3,2 mbit/s and hd channels around 11 mbit/s. That is not a bit deal for a 100 mbit network. But I think you should test your wireless while watching tv.

    Stepko
     

    Ragendorf

    Portal Pro
    March 24, 2008
    531
    42
    Braunschweig
    Home Country
    Germany Germany
    AW: IPTV not working

    Can anybody confirm working T-Home with MediaPortal in Germany?

    Kind regards

    --Jens--
     

    velis

    MP Donator
  • Premium Supporter
  • July 16, 2009
    237
    50
    Radovljica
    Home Country
    Slovenia Slovenia
    Thought I should join in with the conversation:
    Stepko:
    Please make sure you also send data forward at a certain short interval.
    Low bitrate streams tend to completely fail because filling 256KB with a 64Kb/s stream takes enormously long. This is particulary important with radio streams. When I was doing modifications to the filter, I added a check to never let the data sit for more than 100ms (approx, used a quite inaccurate GetTickCount function).

    There is also the question of crappy MS TCP stack. It took me ages to find a good combination of RcvFrom and Select() that didn't lose packets on my UDP streams. I sure wish there was a good function that would just wait for a specified number of bytes received. If changing any of the UDP code, you must pay special attention to this little detail.

    Mikeyko:
    It would be great if Dimka's changes were included as well to have the additional protocols supported.
     

    Users who are viewing this thread

    Top Bottom