Multiseat: A lot of stuttering, artifacts, pixelation, freezes with RTSP/UNC (2 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Just thinking... maybe you could try and see if playing recorded TV is any different. It also uses RTSP in multi-seat, but the recording is complete so maybe there is additional buffering.

    Also tag to @Owlsroost who might be interested to check out the "TSReader read file Error 0x80090006: Invalid Signature" messages (assuming you can provide the logs) and/or be able to provide better advice than I can.
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Hi,

    thanks for your help and sorry for late reply. I will test all those things as fast as possible!

    Since 2 days I am testing with a Gbit wired connection from my HTPC to my ASUS router, instead of using Wifi. Now everything is working great without any visible issues. I only still see a few log entries like this:

    [2014-08-24 10:49:26,051] [15980048] [13f0] - Vid/Ref : 38.960, ?-frame(00), Compensated = 38.550 ( 0.652 A/V buffers=00/29), Clk : 37.898125, SampCnt 1888, stallPt 2.500
    [2014-08-24 10:49:26,053] [15980048] [13f0] - Vid/Ref : 38.920, ?-frame(00), Compensated = 38.510 ( 0.612 A/V buffers=00/28), Clk : 37.898125, SampCnt 1889, stallPt 2.500
    [2014-08-24 10:49:26

    But really only a couple of them and not hundreds as before. And as said, I don't see any stuttering, artifacts, etc.

    But I don't understand this. As said my Wifi is fast ennough, so that is not the problem. What else could exactly be the problem with Wifi? As said watching movies is working 100% perfect and that uses up to 4x bandwidth. mm said, that TV playback is different. OK, but why is it still not working if I watch 30 secs, rewind 30 secs and watch from that point on? In this case it is not live and should be like a movie or recording where enough data could be buffered? Or am I wrong?

    The problem is, that I can't use a wired connection. If it is impossible to use Wifi I have to move the TV card back to my HTPC. Of course I also tried different Wifi settings (e.g. enable multimedia streaming mode, use 2,4 GHz instead 5 GHz, etc.)[DOUBLEPOST=1408872871][/DOUBLEPOST]Here are log files with UNC and Gbit wired. There are no visible issues with UNC and Gbit wired connection, but you see those entries in the log file.
     

    Attachments

    • Client.zip
      24.5 KB
    • Server.zip
      11.2 KB
    Last edited:

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    These sort of lines in the TsReader.log (at start of play) are normal, so don't worry about them:

    Code:
    [2014-08-24 11:28:59,159] [15100048] [ d1c] - Vid/Ref : 0.628, I-frame(00), Compensated = 0.298 ( 0.298 A/V buffers=03/25), Clk : 0.000000, SampCnt 0, stallPt 2.500
    [2014-08-24 11:28:59,163] [15100048] [1698] - Aud/Ref : 0.258, Compensated = 0.320 ( 0.320 A/V buffers=03/24), Clk : 0.000000, SampCnt 1, Sleep 1 ms, stallPt 1.100
    [2014-08-24 11:28:59,169] [15100048] [1698] - Aud/Ref : 0.378, Compensated = 0.440 ( 0.440 A/V buffers=02/24), Clk : 0.000000, SampCnt 2, Sleep 1 ms, stallPt 1.100
    .......
    [2014-08-24 11:28:59,239] [15100048] [ d1c] - Vid/Ref : 0.708, ?-frame(00), Compensated = 0.417 ( 0.365 A/V buffers=00/28), Clk : 0.052000, SampCnt 1, stallPt 2.500
    [2014-08-24 11:28:59,241] [15100048] [ d1c] - Vid/Ref : 0.668, ?-frame(00), Compensated = 0.357 ( 0.304 A/V buffers=00/27), Clk : 0.054000, SampCnt 2, stallPt 2.500
    [2014-08-24 11:28:59,243] [15100048] [ d1c] - Vid/Ref : 0.648, ?-frame(00), Compensated = 0.327 ( 0.272 A/V buffers=00/26), Clk : 0.056000, SampCnt 3, stallPt 2.500
    .......
    [2014-08-24 11:28:59,354] [15100048] [1698] - Aud/Ref : 0.738, Compensated = 0.800 ( 0.633 A/V buffers=03/18), Clk : 0.167000, SampCnt 5, Sleep 1 ms, stallPt 1.100
    [2014-08-24 11:28:59,454] [15100048] [1698] - Aud/Ref : 0.858, Compensated = 0.920 ( 0.649 A/V buffers=02/18), Clk : 0.271000, SampCnt 6, Sleep 1 ms, stallPt 1.100

    You can force TsReader to buffer more data internally by changing this registry setting:

    HKEY_CURRENT_USER\Software\Team MediaPortal\TsReader, set "BufferingDelayInMilliSeconds" to a (decimal) value in milliseconds (range is 0 to 2000, default is 0). Note - this will add delay to live TV channel changes since it needs to build up the buffer before play starts. Using 'UNC paths' will help to minimise the extra delay since it enables TsReader to 'read ahead' when playing recorded TV.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    In addition to what Owlsroost said...

    As said my Wifi is fast ennough, so that is not the problem. What else could exactly be the problem with Wifi?
    The issue with Wifi is usually more about latency and consistency. TsReader needs a smooth consistent and continuous flow of data from the server. If your Wifi is delivering large frames irregularly (better suited for scenarios where the client/server can read ahead - eg. file transfers), TsReader may run out of buffer in between frames... or if your Wifi is not consistent due to non-optimal connection (intermittent drop-outs, interference), some frames may be arriving too late. These are just two examples of possible scenarios. Suffice to say: it is quite a complex situation, and not always easy to explain. Easier to just accept that it is happening and try the suggestions than look for a full technical explanation. :)

    OK, but why is it still not working if I watch 30 secs, rewind 30 secs and watch from that point on?
    When you rewind, the 30 seconds of video/audio are not kept in any buffer on the client side. They're re-read from the server when you replay. In other words, there is no difference between the first time you play and the second time after rewind. This also suggests you have a general issue with the buffer size being too small for the characteristics of your network. Hopefully Owlsroost's suggestion to increase the buffer size will help you.
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Ok, thanks!

    I upaded my ASUS Router, now Wifi is a little bit faster and it is working better, but still not good.

    It also seems that it is better on some channel than on others. E.g. "ZDF HD" (720p, Free-TV) has lot more problems than 1080i, Pay-TV channels.

    I tried 1 and 2 seconds delay with Registry, but the result is the same. On ZDF HD the tv playback very often stops after a few minutes. On other channels you only see artifacts, stuttering, etc.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    So did you have any problems with ProSieben HD? It doesn't look like it.

    On ZDF HD the tv playback very often stops after a few minutes.
    Looks like the codec gives up decoding. You can see this by these messages:
    memorybuffer:put full buffer (134218840)

    This comes after some continuity errors, so possibly they caused the video decoding to fail. In my experience this is much more likely when DXVA is enabled, so you could try to disable that... but ultimately the only fix is to sort out the network issue.

    @Owlsroost
    I've always wondered: in such a situation, is it possible for TsReader to "reset" the codec in some way... or would the graph have to be rebuilt?
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Oh sorry guys! I forgot to change that setting! I will test this today!

    Some results from yesterday (with Wifi, RTSP, 2 secs delay):
    - Watching 1080i, Pay-TV-Channels like "ProSieben HD" worked almost good. I saw artifacts for 1-2 secs every 10-20 minutes. So much better than before!
    - Watching 720p, Free-TV channel "ZDF HD" (100% signal quality and level) worked without any artifacts, but as posted above, playback stopped after XX minutes. Then I rewind for 15 secs and from now on it worked for 1-2 hours until I exited MP, so maybe it had worked endless.
    - I also tried Kodi 14 Alpha 2 (XBMC) with MP PVR Addon. I used TSReader Mode and the XBMC TV Server Plugin. Due to an error I could'nt use "RTSP" mode, so I think it uses UNC? "ZDF HD" worked great and I didn't saw any artifacts on any channel.

    So it seems that it could work with MP too, if I change to UNC. I hope so! If not, then there is something different with the TSReader of Kodi.
     

    Users who are viewing this thread

    Top Bottom