[Approved] - Fix for stuttering/corrupted streaming of live tv | Page 6

Discussion in 'Archive' started by miroslav22, December 22, 2010.

  1. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: Fix for stuttering/corrupted streaming of live tv

    What is about a sleep 10-50ms and then a retry 5 or 10 times? If it detects EOF?


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. micko

    micko Portal Pro

    Joined:
    May 27, 2006
    Messages:
    258
    Likes Received:
    24
    Ratings:
    +51 / 0
    Home Country:
    Finland Finland
    Show System Specs
    Lately I have noticed stuttering when streaming (RTSP) over network even with SD material. Local (singleseat) client can play live and recorded tv fluidly, but on remote clients there is sometimes quite bad stuttering and discontinuities. I shared that recording folder and I can play those ts-files (in myVideos) over network without any problems. Stuttering happens only when same videos are played in TV section.

    Tested binaries shared here and there is some improvement, but there could be some other problems too.

    This might not be the right place to ask, but thinking you guys have experience with this thing and you might have something on your mind already.. meaning what I can check next?
     
  4. miroslav22
    • Premium Supporter

    miroslav22 Development Group Member

    Joined:
    September 4, 2009
    Messages:
    703
    Likes Received:
    459
    Gender:
    Male
    Location:
    Warwick
    Ratings:
    +459 / 0
    Home Country:
    United Kingdom United Kingdom
    I have attached the version 2 patch and binaries to the first post for anyone who would like to test this.

    Thanks for all the testing and feedback so far.
     
    • Like Like x 5
  5. DJBlu

    DJBlu Portal Pro

    Joined:
    August 14, 2007
    Messages:
    1,670
    Likes Received:
    789
    Location:
    Llanelli
    Ratings:
    +894 / 1
    Home Country:
    United Kingdom United Kingdom
    Thanks m8,

    will test it later.

    P.S. Looking for a little help on the Sky Thread if you can help.
     
  6. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Are the binaries compiled for latest SVN?
    If not, could you provide then? I only need .ax (DirectShowFilters) binaries.. :)
     
  7. Mr Hipp
    • Premium Supporter

    Mr Hipp Retired Team Member

    Joined:
    April 2, 2006
    Messages:
    1,261
    Likes Received:
    187
    Location:
    Malmö
    Ratings:
    +187 / 0
    Home Country:
    Sweden Sweden
    In version 2 I see that you have decided to use two buffer sizes 10 & 172.
    I think a better solution would be to adapt the #of buffers to the bitrate, so the playback time keept in the buffers are constant i.e low bitrate - low # of buffers, high bitrate - high # of buffers. A easy solution to this would be to measure the bitrate and calcuate # of buffers.

    void CDiskRecorder::Write(byte* buffer,int len)
    {
    ...
    if(m_MyPacketCounter == 0)
    m_iFirstPacketGetTime = timeGetTime();
    else if (m_MyPacketCounter == 10000) // calc after 10000 packets
    {
    DWORD now = timeGetTime();
    unsigned int bytesPerMsSec;
    unsigned int bufferSize;
    // Handle wrap
    if(now > m_iFirstPacketGetTime)
    bytesPerMsSec = (10000*188)/(now-m_iFirstPacketGetTime);
    else
    bytesPerMsSec = (10000*188)/(m_iFirstPacketGetTime-now);
    // Arbitary scaling
    bufferSize = bytesPerMsSec/25;

    if (bufferSize<10)
    m_iBufferSize=10*188;
    else if(bufferSize>100)
    m_iBufferSize = 100*188;
    else
    m_iBufferSize = bufferSize*188;
    }
    m_MyPacketCounter++;
    }

    A side benifit would be that the patch would not be so intrusive.
     
    • Like Like x 3
  8. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    It wouldn't require as much changes since radio and tv would be handled the same way. No need to pass the radio/tv information from C# side.

    I smell a debug setting for the:

    Code (Text):
    1.  
    2. bufferSize = bytesPerMsSec/25;
    3.  
    ...it would help people to troubleshoot issues (TsReader input drying on some PCs, old HDDs not keeping up with small buffer size on multiple simultaneous recordings).
     
  9. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: Re: Fix for stuttering/corrupted streaming of live tv

    thanks! But could you perhaps tell us / me what are the differences to the 1st version?
     
  10. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Re: AW: Re: Fix for stuttering/corrupted streaming of live tv

    Look at first post :)
     
    • Like Like x 1
  11. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: Fix for stuttering/corrupted streaming of live tv

    uups sorry
     
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!