[mythtv] framesPlayed
Peter Bennett
pb.mythtv at gmail.com
Mon Jul 1 20:06:28 UTC 2019
Hi Mark
I assume that means we can reinstate the lines you commented? I could
make them a bit more intelligent, by only adjust framesPlayed when it
goes off by more than a certain amount, which would reduce discontinuities.
I think I should remove the fpsMultiplier logic - it is getting wrong
results and then they are overwritten by the AVSync2 logic.
Reagrds
Peter
On 7/1/19 3:54 PM, Mark Kendall wrote:
> Hi Peter
>
> Having looked at framesPlayed a little more - I think we are trying to
> do too much with one variable - which is bound to fail at some point.
> I plan on using a distinct variable in VideoFrame to track
> discontinuities which should make things a little cleaner.
>
> With respect to fpsMultiplier, I suspect MediaCodec is deinterlacing
> adaptively - at least for some content. So in certain circumstances
> (e.g. telecined material) it probably returns a mixture of raw
> progressive and deinterlaced progressive frames which may result in a
> variable frame rate? I've noticed that the fpsMultiplier code gets
> triggered repeatedly for VAAPI decoder deinterlacing (in the render
> branch) with certain material - again I think telecined.
>
> That said, I can't think of an alternative to detecting what
> MediaCodec is returning - unless there is something in the portions of
> the API that FFmpeg exposes?
>
> Regards
> Mark
>
> On Sun, 30 Jun 2019 at 19:21, Peter Bennett <pb.mythtv at gmail.com> wrote:
>> Hi Mark
>>
>> I am looking into different ways to fix the bug
>> https://code.mythtv.org/trac/ticket/13416
>>
>> There is another area that may cause you problems with framesPlayed.
>>
>> The shield has frame-doubling deinterlace built in, and the result was
>> the elapsed time was being calculated at double the correct rate. This
>> had bad consequences for many things. I added some code in
>> avformatdecoder (line 4123 onwards), to detect that frame-doubling was
>> being done. It sets m_fpsMultiplier to 2 and then uses logic in line
>> 4160 to only increment framesPlayed on every alternate frame. Per the
>> ticket, this code is not working correctly as it seems that now the
>> timing is sometimes off by a factor of 1.5 instead of a factor of 2.
>> This may also affect your usage of framesPlayed in the render. You may
>> need to revert this code as well.
>>
>> Let me know if you revert that. I will probably revert it anyway when I
>> have figured out a real fix for the ticket 13416.
>>
>> Regards
>> Peter
>>
>>
>> _______________________________________________
>> mythtv-dev mailing list
>> mythtv-dev at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
More information about the mythtv-dev
mailing list