[Finished] Improvements to Live TV playback rate matching - for testing (1 Viewer)

Status
Not open for further replies.

Owlsroost
Country flag

Development Group
  • Team MediaPortal
  • October 28, 2008
    5,538
    5,036
    Cambridge
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #1
    A significant problem for some users is that when playing live TV, differences in the playback rate of the PC and the rate at which data arrives from the broadcaster can mean that playback has to be paused briefly to correct the situation.

    The attached versions of TsReader.ax attempt to fix this problem by manipulating the video and audio playback rates very slowly - basically forcing the renderers to drop/repeat video frames and audio samples occasionally. This is much less sophisticated than the method used by MediaPortal Audio Renderer, but in reality is almost unnoticeable (at least on my systems :)).

    Installation setup :
    You must install the x86 version of Visual C++ Redistributable Package for Visual Studio 2013 if you are using MP 1.10 or older versions.

    Before installing the new files backup the original files !

    Copy binary files :

    Path to replace TsReader.ax :
    64Bit
    Os : C:\Program Files (x86)\Team MediaPortal\MediaPortal
    32Bit
    OS : C:\Program Files\Team MediaPortal\MediaPortal

    If you are replacing TsWriter.ax, MPFileWriter.ax, StreamingServer.dll or MPIPTV_RTSP.dll you must stop the TVservice - use the 'Manual Control' section of TV Server Configuration - http://wiki.team-mediaportal.com/1_...ion/TV-Server_Configuration/11_Manual_Control

    Path to replace TsWriter.ax, MPFileWriter.ax, StreamingServer.dll and MPIPTV_RTSP.dll :
    64Bit
    Os : C:\Program Files (x86)\Team MediaPortal\MediaPortal TV Server
    32Bit
    OS : C:\Program Files\Team MediaPortal\MediaPortal TV Server

    Restart TVservice (if stopped earlier)

    Usage instructions :
    The new rate matching system works best using LAV Audio Decoder for TV with the 'Auto A/V Sync correction' option enabled in LAV Audio settings, and do not use MediaPortal Audio Renderer for TV.

    Source code :
    The Github branch with the source code is at https://github.com/MediaPortal/MediaPortal-1/tree/EXP-Upgrade_555_MM_Owlsroost

    Latest Binary Download (for MP 1.11 and later only) :

    The latest binary files are in 'EXP-Upgrade_555_MM_Owlsroost_28-04-2016_3.zip' attached below.

    This is a merge of my latest TsReader/TsWriter code with the latest 'RTSP streaming library update' code from mm1352000 (discussed in this thread - https://forum.team-mediaportal.com/threads/rtsp-streaming-library-update.132521/ )

    Install TsReader.ax into the MediaPortal (client) folder - see above for installation instructions.

    Install TsWriter.ax, MPFileWriter.ax, StreamingServer.dll and MPIPTV_RTSP.dll into the MediaPortal TV Server folder - see above for installation instructions.

    (In case you need to go back, the previous version of TsReader.ax - v4.1.0.15 - is -> here <- and the previous version of TsWriter - v3.1.31.6 - is -> here <- Note these do not include the new RTSP code)
     

    Attachments

    Last edited:

    htpchtpc
    Country flag

    MP Donator
  • Premium Supporter
  • February 14, 2012
    26
    5
    Home Country
    Canada Canada
    i believe i followed the instructions correctly... but after install had no 'audio or video signal ' come up after 30 seconds or so wait trying different channels. even after reboot . using version 4 on MP1.11
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,953
    Home Country
    Hungary Hungary
    Hi @Owlsroost ,

    my laptop display supports only 60 Hz, but the DVB-T stream is 1080i50. Is it ok?

    mp.png
     

    Owlsroost
    Country flag

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,538
    5,036
    Cambridge
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #4
    i believe i followed the instructions correctly... but after install had no 'audio or video signal ' come up after 30 seconds or so wait trying different channels. even after reboot . using version 4 on MP1.11
    Can you attach the logs please ?
     

    Owlsroost
    Country flag

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,538
    5,036
    Cambridge
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #5
    Hi @Owlsroost ,

    my laptop display supports only 60 Hz, but the DVB-T stream is 1080i50. Is it ok?

    View attachment 163827
    Yes, that's fine - the rate matching is not affected by the video frame rate, it's matching incoming data rate to audio render rate (the playback rate of a DS filter graph is normally controlled by the audio renderer).
     

    Owlsroost
    Country flag

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,538
    5,036
    Cambridge
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #7
    sorry about that... here are the logs
    Did you set the log level (in MP configuration) to 'debug' before generating the logs ? (there is very little related to TV starting in MediaPortal.log, and no TsReader or evr logs at all).

    Does it work correctly with the original (MP 1.11) version of TsReader installed ?
     

    Owlsroost
    Country flag

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,538
    5,036
    Cambridge
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #9
    First test were pretty good but today I had visible stops and desync.
    Is it better or worse than the standard MP 1.11 TsReader.ax ?

    I can see in the TsReader.log that it runs very low on audio data in a few places, which might account for the 'stops' (or the 'stops' might be caused by something else which is also affecting TsReader - I can't tell).
     

    RicoHTPC

    MP Donator
  • Premium Supporter
  • February 4, 2011
    1,441
    172
    Cuxhaven
    Home Country
    Germany Germany
    It's worse than the TS reader from the dropout thread. Haven't used the standard one.
     
    Status
    Not open for further replies.

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom