Mailing List Archive

1 2 3  View All
Re: AVSync2 Improvements [ In reply to ]
On 3/3/2019 2:58 AM, Mark Kendall wrote:
>
>
> On Sat, Mar 2, 2019, 3:31 PM Peter Bennett <pb.mythtv@gmail.com
> <mailto:pb.mythtv@gmail.com>> wrote:
>
> > Stuttering occurs right at the start of the program with mediacodec
> > decoder. SW dec is fine. Either avsync method exhibits this so its
> > mediacodec related.
> >
> I am hoping that the direct render fixes it. Mark K said that he
> will be
> looking into direct render. Anyway I will download some of that
> file and
> see if I can do anything to understand what is happening,
>
>
> Has anyone tried increasing the number of mediacodec video buffers?
> Its only 8 at the moment. I had similar problems with VideoToolBox
> decoding this week and increasing the buffer count was the key. 8
> gives you very little headroom for the simplest of system glitches.
>
> Direct render is getting there - only problem is it crashes as soon as
> it tries to display anything:)
>
Mark,

I have tried to find this but failed :-(. where is this
constant/setting? I would like to try it as I suspect it fixes the
timing issue we are currently seeing with mediacodec.

Thanks

Mark
Re: AVSync2 Improvements [ In reply to ]
On 3/2/19 10:58 AM, Mark Kendall wrote:
>
>
> On Sat, Mar 2, 2019, 3:31 PM Peter Bennett <pb.mythtv@gmail.com
> <mailto:pb.mythtv@gmail.com>> wrote:
>
> > Stuttering occurs right at the start of the program with mediacodec
> > decoder. SW dec is fine. Either avsync method exhibits this so its
> > mediacodec related.
> >
> I am hoping that the direct render fixes it. Mark K said that he
> will be
> looking into direct render. Anyway I will download some of that
> file and
> see if I can do anything to understand what is happening,
>
>
> Has anyone tried increasing the number of mediacodec video buffers?
> Its only 8 at the moment. I had similar problems with VideoToolBox
> decoding this week and increasing the buffer count was the key. 8
> gives you very little headroom for the simplest of system glitches.
>
> Direct render is getting there - only problem is it crashes as soon as
> it tries to display anything:)
>
> Regards, Mark
>
> _______________________________________________
>
I tried the video that gives the problem. It is H264 interlaced.
Normally, mediacodec on shield should deinterlace it and hand it to
MythTV as progressive. MythTV is seeing this as progressive switching to
interlaced and back to progressive again about once every second. This
causes the OpenGL rendering and deinterlacing to be re-initialized twice
every second. It is not surprising that this results in jerky playback.

I will trace through it and see whether ffmpeg is actually switching it
back and forth between interlaced and progressive, and whether anything
can be done about it.

Regarding the video buffers - I had to set that low value, otherwise
playback would be terminated by android on the shield. Android has very
restrictive memory usage rules, and does not hesitate to shut down any
process that uses more than it thinks is reasonable. 8 buffers seemed to
be the best value that worked well. I do not think the video buffers are
the cause of the jerkiness.

Peter
Re: AVSync2 Improvements [ In reply to ]
On 3/2/19 5:03 PM, Mark Spieth wrote:
> On 3/3/2019 2:58 AM, Mark Kendall wrote:
>>
>>
>> On Sat, Mar 2, 2019, 3:31 PM Peter Bennett <pb.mythtv@gmail.com
>> <mailto:pb.mythtv@gmail.com>> wrote:
>>
>> > Stuttering occurs right at the start of the program with
>> mediacodec
>> > decoder. SW dec is fine. Either avsync method exhibits this so its
>> > mediacodec related.
>> >
>> I am hoping that the direct render fixes it. Mark K said that he
>> will be
>> looking into direct render. Anyway I will download some of that
>> file and
>> see if I can do anything to understand what is happening,
>>
>>
>> Has anyone tried increasing the number of mediacodec video buffers?
>> Its only 8 at the moment. I had similar problems with VideoToolBox
>> decoding this week and increasing the buffer count was the key. 8
>> gives you very little headroom for the simplest of system glitches.
>>
>> Direct render is getting there - only problem is it crashes as soon
>> as it tries to display anything:)
>>
> Mark,
>
> I have tried to find this but failed :-(. where is this
> constant/setting? I would like to try it as I suspect it fixes the
> timing issue we are currently seeing with mediacodec.
>
> Thanks
>
> Mark
>
>

It is in VideoOutputOpenGL::CreateBuffers - however as I mentioned in my
previous email, it seems the problem is with mis-detection of interlaced
versus progressive, and changing the video buffers will likely cause
android to terminate the app
Re: AVSync2 Improvements [ In reply to ]
On 3/2/19 5:35 PM, Peter Bennett wrote:
>
>
> On 3/2/19 5:03 PM, Mark Spieth wrote:
>> On 3/3/2019 2:58 AM, Mark Kendall wrote:
>>>
>>>
>>> On Sat, Mar 2, 2019, 3:31 PM Peter Bennett <pb.mythtv@gmail.com
>>> <mailto:pb.mythtv@gmail.com>> wrote:
>>>
>>> > Stuttering occurs right at the start of the program with
>>> mediacodec
>>> > decoder. SW dec is fine. Either avsync method exhibits this so
>>> its
>>> > mediacodec related.
>>> >
>>> I am hoping that the direct render fixes it. Mark K said that he
>>> will be
>>> looking into direct render. Anyway I will download some of that
>>> file and
>>> see if I can do anything to understand what is happening,
>>>
>>>
>>> Has anyone tried increasing the number of mediacodec video buffers?
>>> Its only 8 at the moment. I had similar problems with VideoToolBox
>>> decoding this week and increasing the buffer count was the key. 8
>>> gives you very little headroom for the simplest of system glitches.
>>>
>>> Direct render is getting there - only problem is it crashes as soon
>>> as it tries to display anything:)
>>>
>> Mark,
>>
>> I have tried to find this but failed :-(. where is this
>> constant/setting? I would like to try it as I suspect it fixes the
>> timing issue we are currently seeing with mediacodec.
>>
>> Thanks
>>
>> Mark
>>
>>
>
> It is in VideoOutputOpenGL::CreateBuffers - however as I mentioned in
> my previous email, it seems the problem is with mis-detection of
> interlaced versus progressive, and changing the video buffers will
> likely cause android to terminate the app
I found the problem with the car racing video from Mark - misdetection
of frame rate - see patch in ticket
https://code.mythtv.org/trac/ticket/13419
Peter

1 2 3  View All