[mythtv] AVSync2 Improvements
pb.mythtv at gmail.com
Sat Mar 2 22:11:08 UTC 2019
On 3/2/19 10:58 AM, Mark Kendall wrote:
> On Sat, Mar 2, 2019, 3:31 PM Peter Bennett <pb.mythtv at gmail.com
> <mailto:pb.mythtv at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-dev