[fixed] LiveTV - Zap some seconds back jumps to the Start of Timeshift. (1 Viewer)

Status
Not open for further replies.

Brudertac

MP Donator
  • Premium Supporter
  • October 26, 2006
    978
    277
    Augsburg
    Home Country
    Germany Germany
    Thanks for the recording :cool:

    It may take a while to work out where the problem is (and fix it properly), but attached is a TsReader.ax with a workaround which should allow you to skip around (with lower accuracy than normal) in the 'problem' channels. Just unzip it and copy it into C:\Program Files (x86)\Team MediaPortal\MediaPortal (it is compatible with MP 1.2.3 and 1.3.0)

    Tony

    Awesome! It works very good now. I´m glad that you found something. :)
    Is there a chance to see the final Fix in 1.3.0 Beta?

    Many Thanks!!!!

    Brudertac
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Awesome! It works very good now. I´m glad that you found something. :)
    Is there a chance to see the final Fix in 1.3.0 Beta?
    I may have misinterpreted, but I think Tony was saying that he hasn't found the problem yet... and after that the problem still has to be fixed.

    The TsReader that you're using is just a "hack".

    @Owlsroost: it seems that pairs of PCR packets are being inserted by TsWriter. I'm still to confirm why that is happening, but I might know more in a couple of hours...
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Aha, I see what is going on here... I think.
    It is not TsWriter that is inserting PCR twice. Rather, it is that the PMT says that there is a dedicated PCR PID, but the video PID also has PCR timestamps with a different time base. By somewhat of a coincidence, TsWriter is rewriting the PCR into the video PID stream. This will obviously cause PCR timestamp clashes/confusion if the timestamps in the two streams aren't complimentary (ie. from the same clock)... which they aren't.

    So really TsWriter needs to either use a separate PID for PCR, or it needs to wipe any PCR timestamps in the PID that it chooses for PCR.

    The first solution is probably easier to implement and could consume less processor time, and in fact from the code it looks like that may have been how things were sometime in the past.

    @Owlsroost, @tourettes, @miroslav22, @georgius, @DJBlu, @morpheus_xx, @misterd, @arion_p, @chemelli, @Ambass
    Is there any real technical advantage, compatibility issue, or other reason for having the PCR in the same PID as the video?

    Personally, I can't think of any technical advantage.
    Compatibility with certain hardware or software could be an issue I guess.
    Can't think of anything else...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hmmm, maybe one other alternative would be to mark the adaption field with the OPCR (original PCR) flag instead of wiping it completely...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Fixing issues like this makes me happy. :)

    Here is a potential fix that wipes the original PCR.
    mantis #4034
    github commit (code only - binaries can come later once the fix is confirmed)

    The effective part of the fix starts at line 1111. The other part is just a juggle of the existing code so that I didn't have to copy-paste the code to a second location.

    I chose not to go with the OPCR option as I don't think there is any need to keep the original timestamps, and it also requires pretty much the same amount of code and processing to ensure there is not already an existing OPCR that would have to be wiped to enable the PCR -> OPCR switch.

    We could still go with the dedicated PCR PID option very easily. At this point I feel there must have been some kind of reason to put the PCR into the video stream so it seems safer to stick with that approach...

    @Brudertac: if you want this fix to be included in MP 1.3b, please could you revert to the original TsReader and try the attached TsWriter. Note that it won't fix your existing RTL recordings - it only fixes the problem for timeshifting and future recordings.

    @DJBlu: this fix might well resolve the similar issue with Setanta Sports 1 Ireland that you mentioned the other week...
     

    Attachments

    • TsWriter[1.3_pcr_conflict].zip
      115.9 KB
    Last edited:

    Brudertac

    MP Donator
  • Premium Supporter
  • October 26, 2006
    978
    277
    Augsburg
    Home Country
    Germany Germany
    Fixing issues like this makes me happy. :)

    Here is a potential fix that wipes the original PCR.
    mantis #4034
    github commit (code only - binaries can come later once the fix is confirmed)

    The effective part of the fix starts at line 1111. The other part is just a juggle of the existing code so that I didn't have to copy-paste the code to a second location.

    @Brudertac: if you want this fix to be included in MP 1.3b, please could you revert to the original TsReader and try the attached TsWriter. Note that it won't fix your existing RTL recordings - it only fixes the problem for timeshifting and future recordings.

    @mm1352000,

    Glad to help to make you Happy. ;)
    With this Fix it works perfect! Can´t find any Error now.

    Many Thanks to all who Helped so fast here!

    Brudertac
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks for the feedback guys. :)

    So we know what the problem is.
    We have a potential solution.
    Are we happy with the approach and the code?
    I note that this fix has the potential to do bad things to MP and TV Server if it isn't 100% perfect. I don't want to merge it without wider testing and/or a consensus that the code is okay. Alternatively, we merge it immediately to get as much internal testing as possible and keep an eye on reports in the beta.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I'll take a look at the code later, but it sounds like the right way to fix it :)

    Tony
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom