Live TV Audio/Video Sync (1 Viewer)

bluebear

Portal Pro
September 19, 2008
75
2
Thank you all for the input. Interesting indeed.
I cant´t say for sure because my problem seems to be intermittent. But usually the audio is lagging.
I have seen framedrops, most likely resyncs, I have also noticed that syncing is worsening sometimes. Yes, I know its alot of nothing at the moment. Anyways, I will go back and have second look. Possibly update drivers and see what happens. It seems to be working fine for most.

Cheers, bluebear.
 

hoborg

Portal Pro
June 13, 2008
4,413
1,644
Nový Jičín
Home Country
Czech Republic Czech Republic
@bluebear:

I doubt TV card drivers can have any effect on this.
Just for test, can you try nPVR and see if this problem happend here too?
I bet it will be working just fine :)
 

splatterpop

MP Donator
  • Premium Supporter
  • December 17, 2007
    177
    54
    planet ASPARAGUS
    Home Country
    Germany Germany
    I bet this issue is caused by MediaPortal TS reader.

    Caused or triggered? The bug can be in TsReader or ffdshow, as far as I know no one has ever has proven which is the broken component (or even both could be).

    My bet is quite oppisite than hoborg's - I bet that ffdshow doesn't cope with the timestamp changes that TsReader is doing.

    Hard to say. But users report the same A/V sync issue with LAVF audio decoder too, not only with FFDshow audio decoder.

    There is no such issues when MS demultiplexer is in use (in other PVR software) + FFDshow audio/video decoders - perfect sync. This pointing to Mepo TS reader.

    EDIT:
    Maybe there are two issues after all.
    Some users are using audio passthrough - this can be problem too.
    I tell them to disable passthrough and try againg, but most of time there is no answer...

    I am using the ffdshow decoders without any audio pass-through, and the problem reproduces both with spdif and analog out (on 2 different machines, if this should be significant). Also, the amount of lag appears to vary from time to time. I feel some tv channels have a higher tendency for lagging than others, and in my opinion these are the ones with lower image quality and which also sometimes cause problems in the deinterlacing filter. That is of course only my personal impression.

    I noticed that lagging only occurs with live tv, not with recorded of timeshifted tv. My personal workaround is to timeshift 15 seconds to the past to have A/V in sync again, and it never failed me.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    OK guys,

    Attached is a replacement Core.dll for MP 1.2.0 Beta only, with an experimental workaround hack for the FFDShow video decoder A/V sync problem with Live TV.

    Please try it and report back....

    Tony
     

    Attachments

    • Core_120b_FFDShow_sync_hack_1.zip
      1,016.6 KB

    CCob

    Portal Pro
    November 10, 2008
    111
    8
    OK guys,

    Attached is a replacement Core.dll for MP 1.2.0 Beta only, with an experimental workaround hack for the FFDShow video decoder A/V sync problem with Live TV.

    Please try it and report back....

    Tony

    Looks good so far with me. Haven't done extensive testing. I will leave ffdshow as the video codec for TV for a few days. Will let you know if occurs with the new Core.dll.

    Thanks Owlsroost.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    A quick note - the modified Core.dll only has a fix for the initial sync problem after TV start or channel change (it lets it play for 0.5 sec then seeks back 0.2 sec, to flush the old data out of the graph - a kludgy hack really).

    It can still drift out of sync if there are discontinuity errors in the stream - enabling 'Don't drop discontinued packets in TsReader' in MP Config (TV Client section) might help with that problem, but I haven't tried it myself.

    I'm pretty convinced that the base problem is that FFDShow video decoder doesn't behave properly with respect to sample timestamps supplied by the preceeding splitter filter (TsReader in this case) - I suspect it uses it's own idea of timestamps internally (maybe derived from the MPEG packet headers) so when TsReader modifies the sample timestamps to correct A/V sync FFDshow video ignores it....(but FFDShow audio decoder does behave correctly :confused:)

    (Unless of course the timestamp problem is the other way around :confused: - but all the other decode filters seem to behave properly with TsReader....)

    Tony
     

    tony72

    MP Donator
  • Premium Supporter
  • August 15, 2009
    180
    61
    Home Country
    England England
    Owlsroost - I've been testing the modified core.dll today, it does correct the sync issue on my system as well. I'll also leave ffdshow as my tv codec and see how it goes. Thanks.
     

    CCob

    Portal Pro
    November 10, 2008
    111
    8
    Audio sync doesn't appear to be a problem. But one thing that has come up once (although may have been present before, but I didn't use ffdshow for any particular amount of time because of the sync issue), watching a channel for while, the audio goes into a loop for around 5 seconds and is repeated endlessly, but the video stream continues as normal. A stop of live tv and then play solves the problem.

    But at the moment I can live with that since it's only happened once in the two days using it. Using the various post decode filters in ffdshow produces an excellent quality upscale which far outweighs that issue.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,539
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Attached is a better fix for the FFDShow video problem - this is a replacement 'TsReader.ax' file.

    You need to revert back to the original MP 1.2.0 Beta 'Core.dll' and replace the original TsReader.ax with the new one.

    This fix should handle stream corruption/discontinuities properly so A/V sync is maintained.

    (I think this *may* work in MP 1.1.3 as well, but I haven't tried it)

    EDIT ....and for comparision, I've added a 'TsReader_FFDShow_fix_3' version with a shorter delay before it corrects the sync at start-of-play/channel change - please try/compare/report back versus the 'TsReader_FFDShow_fix_2' version.

    Tony
     

    Attachments

    • TsReader_FFDShow_fix_2.zip
      155.2 KB
    • TsReader_FFDShow_fix_3.zip
      155.2 KB

    Spooky

    MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    Nice, I'll also try this once I have a chance to do so on an MP system with LiveTV :). Finally a solution after all this time :D
     

    Users who are viewing this thread

    Top Bottom