Page 1 of 5

Stutter when using HW acceleration

Posted: 26 Jun 2016, 22:07
by vlaves
Hi together,

I'm using MrMC 2.3 on my Fire TV 2 (@1080p50Hz) while watching Live TV from a tvheadend server.
If I use mediacodec (surface), which is the default, den the picture is fluent, but video overlay info screen shows that only ffmpeg is used. So turned off mediacodec (surface) and turned on the normal one. Now it uses amc, but I get stuttering all the time.

If I turn of both, same result as with surface, just ffmpeg is used nd it is smoth playback. Shouldn't it be possible for MrMC to use HW acceleration without stuttering?

Or maybe some setting on my side is wrong?

Can you please help here?

Thanks again for the great support :)

PPS the Live TV stream is a h.264 1080i stream as common here in Europe.

Re: Stutter when using HW acceleration

Posted: 27 Jun 2016, 16:48
by davilla
h.264 1080i streams are not handled very well under the native android MediaCodec, either surface or non-surface. A future version of MrMC will vector this type of content to FFMpeg.

What you are seeing is exactly why we are making this change. Maybe in the future h.264 interlaced content will gain improvements under MediaCodec and then one will be able to use HW decode

Re: Stutter when using HW acceleration

Posted: 03 Jul 2016, 05:54
by vlaves
davilla wrote:h.264 1080i streams are not handled very well under the native android MediaCodec, either surface or non-surface. A future version of MrMC will vector this type of content to FFMpeg.

What you are seeing is exactly why we are making this change. Maybe in the future h.264 interlaced content will gain improvements under MediaCodec and then one will be able to use HW decode
Too bad, was always under the impression that the decoding of each frame is done with hw acceleration and the deinterlacing after the decode in software afterwards.

Isn't that possible anymore or you don't have access to the frame itself after it has been "passed" to mediacodec?

Re: Stutter when using HW acceleration

Posted: 03 Jul 2016, 15:28
by davilla
vlaves wrote:
davilla wrote:h.264 1080i streams are not handled very well under the native android MediaCodec, either surface or non-surface. A future version of MrMC will vector this type of content to FFMpeg.

What you are seeing is exactly why we are making this change. Maybe in the future h.264 interlaced content will gain improvements under MediaCodec and then one will be able to use HW decode
Too bad, was always under the impression that the decoding of each frame is done with hw acceleration and the deinterlacing after the decode in software afterwards.

Isn't that possible anymore or you don't have access to the frame itself after it has been "passed" to mediacodec?
MediaCodec surface is a by-pass mode, Rendering is handed off to the OS and there is no access to the rendered frames.

Re: Stutter when using HW acceleration

Posted: 30 Oct 2016, 15:58
by jamesp26
davilla wrote:h.264 1080i streams are not handled very well under the native android MediaCodec, either surface or non-surface. A future version of MrMC will vector this type of content to FFMpeg.
Hi,

I am convinced the previous version of MrMC used to do this. If i had MediaCodec (Surface) switched on, If i watched anything from my LiveTv recordings folder it would vector this to FFMPeg.

Current Version isn't doing this anymore. LiveTv definitely gets vectored to FFMpeg, but recordings in h.264 1080i format are now attempting to play using MediaCodec. They therefore stutter like crazy.

For now, I've disabled MediaCodec, but it would be nice to re-enable this feature in the future.

James

Re: Stutter when using HW acceleration

Posted: 30 Oct 2016, 17:59
by davilla
I'd need to see debuglog and if possible, a sample file that shows the issue.

Re: Stutter when using HW acceleration

Posted: 31 Oct 2016, 21:56
by jamesp26
Sample File: https://drive.google.com/open?id=0BwR6Z ... jJTMDZZUWc

Debug log - https://drive.google.com/open?id=0BwR6Z ... mJRNVUtQkE

Just to be clear, this happens with all my recorded tv from TVheadend with the latest release - if mediacodec (surface) is on, then 1080i recordings no longer vector to ffmpeg.

One other thing I'd like to point out from the sample file if I can (sorry to raise 2 issues in one post!). On the firetv, i am seeing a lot of micro stutter from 1080i 50hz content. This sample file is from BBC news, and I can see the ticker along the bottom stutter at different points during the clip. Personally, i notice it a lot as I seem to be really really notice this sort of thing (on football it really stands out during fast motion).

I appreciate its subtle, however, the same clips on the Apple TV plays perfectly so it must be something specific with the FireTv. Everything on the firetv and my tv are set to 50hz.

Many thanks!

Re: Stutter when using HW acceleration

Posted: 06 Nov 2016, 16:15
by DC1983
I've got simliar, out of interest do you have Dolby digital plus (E-AC3) capable receiver ticked? This seems to then use surface. If I disable just this (still with ac3 and dts pass through enabled) ffmpeg is used and no stuttering.

Many thanks

Edit - ignore me, just re-enabled EAC3 and seems ok. Was sure I had seen surface being used and disabling this resolved it.

Re: Stutter when using HW acceleration

Posted: 06 Nov 2016, 17:00
by jamesp26
I don't use passthrough on the firetv. With livetv it can be hit and miss.

Out of interest were you able to reproduce this or do you need any more info? Happy to send you what ever you need.

Re: Stutter when using HW acceleration

Posted: 09 Nov 2016, 13:17
by vlaves
Seems like koying has fixed hardware accelerated playback on the Fire TV with his "aml fixes" for Kodi 17.
And from fritsch's comment here http://forum.kodi.tv/showthread.php?tid ... pid2453127 I hope it is getting included in MrMC soon.

Any comments to that. I'm on software decoding since beginning...cause of stuttering. Tested the nightly from 8th nov. of Kodi 17 and its working perfectly there.