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

Status
Not open for further replies.

Owlsroost

Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Country flag
    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

    • EXP-Upgrade_555_MM_Owlsroost_28-04-2016_3.zip
      531.3 KB · Views: 218
    Last edited:

    htpchtpc

    MP Donator
  • Premium Supporter
  • February 14, 2012
    27
    5
    Home Country
    Canada Canada
    Country flag
    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,954
    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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Country flag
    • 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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Country flag
    • 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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Country flag
    • 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

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Country flag
    • 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

    Similar threads

    MP1 MP2 MQTT Plugin DE
    @Jean-Marc i add play command, but i dont test it ... No time, sorry ...
    @Jean-Marc i add play command, but i dont test it ... No time, sorry ...
    https://ci.appveyor.com/api/projects/status/yj74bbhstsucwojj/branch/master?svg=true MQTT Plugin for MediaPortal - Publish some...
    Replies
    17
    Views
    1K
    Ok I could solve my problem by myself. The logs said that the delimiter of that song is not in text form. Although it was already in text form and I deleted the music database, the title information was still not available. I ripped the song again and now it works. I think that something went wrong the first time.
    Ok I could solve my problem by myself. The logs said that the delimiter of that song is not in text form. Although it was already...
    Hi, After the update from 1.25 to 1.26 the replay gain functionality appears to be broken. I had no sound on all audio files (TV...
    Replies
    12
    Views
    989
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the next release. We allocate about one month for Pre Release testing. In that time we will only fix bugs, after which comes the final release! Highlights of this release Bugfixes: [MP1-4966] - Update Bass...
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    0
    Views
    2K
    Hier geht's weiter.
    Hier geht's weiter.
    Hallo Team Media Portal, auf der Download-Seite MediaPortal 2.2.1 Release - MEDIAPORTAL steht unter Erweiterte...
    Replies
    13
    Views
    1K
    Top Bottom