Posts: 8
Joined: Nov 2012
Reputation:
0
What is the current status of deinterlacing on the FireTV with hardware decoding? Has it been determined to be impossible due to hardware limitation?
I saw several posts from earlier this year, but it wasn't clear if there was a resolution. I checked some other posts and see there might be issues with deinterlacing on Android in general. I tried both the latest version of XBMC and SPMC.
With both MediaCodec and libstagefright enabled, I think the FTV is using hardware decoding. The video is very smooth, but the lack of deinterlacing is very noticable in fast moving/panning scenes. The option to enable deinterlacing is grayed out.
With MediaCodec enabled and libstragefright disabled, I think the FTV is switching to software decoding. The option to deinterlace is available and is working well, but the video is very jerky. I'm thinking the CPU can't keep up to the high bitrate stream.
Posts: 2
Joined: Sep 2014
Reputation:
0
2014-09-15, 18:15
(This post was last modified: 2014-09-19, 18:11 by luap1.)
I too am wondering the same thing. I setup a FireTV over the weekend with PVR WMC as the backend. When deinterlacing is off the video is great, but suffers from the horizontal lines. When turning deinterlacing to on, or auto, it fixes the horizontal lines but the video is then jerky. Does deinterlacing just not work on Android or could it maybe be the encoding format of the stream? I am setting up NextPVR and will test it to see if I get better results, but I'm afraid it might just be an issue with Android.
UPDATE
Using a different backend makes no difference, which is kind of what I suspected. After more research it appears that because the stream is MPEG2, the FireTV struggles with this. There are conflicting reports as to whether the FireTV is or is not actually performing hardware decoding. However, after tinkering a bit with this, I did find a decent balance.
With MediaCodec on, libstagefright off, and deinterlacing set to Auto, it does run fairly well. Depending on the amount of deinterlacing (Sports shows need A LOT) that needs to occur, there are some frame drops, thus the screen can be a bit jerky at times. However, on shows that don't require much deinterlacing it is actually very smooth, with only minor drops here and there. Regardless, this is WAY better than simply turning on Software decoding, which not only causes major frame drops, but also the audio and video is out of sync. This tells me that there must be some level of hardware decoding taking place when MediaCodec is on.
On an interesting side note, I have a NVIDIA Shield that works flawlessly with the same setup. On top of that, with libstagefright turned on, the deinterlacing option is available on the shield, and runs great.
So, there must be something a bit off with xbmc and the FireTV. I know the hardware is plenty strong enough for this, and it appears (even though there is no official confirmation that is supports MPEG2) hardware decoding is taking place, albeit not perfect.
The fireTV is so far the best option out there for an all in one media box that can do everything from Live TV to online streaming (e.g. Netflix, Amazon Prime, etc.). The deinterlacing issue is really the only problem with it. I am hopeful we will see a fix in upcoming releases of xbmc.
Posts: 3,746
Joined: May 2004
Reputation:
20
Livin
Posting Freak
Posts: 3,746
I know this is an old thread but I just started streaming Live TV from WMC backend (HDhomerun tuner) and it is clearly showing me interlaced video... it is ugly - black lines showing constantly, etc
I don't see any option to set Kodi to Deinterlace... am I missing where it is in Kodi 16?
Or is there anything else I can do to clean up the video?
thx for the help!
I'm not an expert but I play one at work.
Posts: 23,231
Joined: Aug 2011
Reputation:
1,069
fritsch
Team-Kodi Developer
Posts: 23,231
Android's mediacodec does not support deinterlacing. Disable surface rendering and pray that render bobbing is good enough for you. I suggest getting a Pi.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 23,231
Joined: Aug 2011
Reputation:
1,069
fritsch
Team-Kodi Developer
Posts: 23,231
With amlcodec everything happens internally, without detailed influence. On linux it's a Kernel param. It's certainly not nice, but better than rest of droid world.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 827
Joined: Jun 2014
Reputation:
25
CiNcH
Posting Freak
Posts: 827
Sony also has high-quality deinterlacing via MediaCodec (when rendering to Surface). There does not necessarily have to be a parameter for it. The "hardware accelerator" can decide whether or not to deinterlace all by itself in driver land.
Posts: 23,231
Joined: Aug 2011
Reputation:
1,069
fritsch
Team-Kodi Developer
Posts: 23,231
Who is "the hardware accelerator"? So it does something we cannot influence? Do you like that? I don't ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 202
Joined: Feb 2014
Reputation:
3
2016-09-03, 14:41
(This post was last modified: 2016-09-03, 14:41 by shomari.)
At least this is one instance where it's hard to find fault with hardware vendors doing their own thing, as when it relates to accelerated deinterlacing it's happening at the hardware layer seperate from Kodi.
Mediacodec is the Kodi standard, but that standard is pretty much a non-standard when it comes to deinterlacing.
Question is, will the hardware vendors let go of their private implementations in favor of public/standard api when/if it arrives? We shall see.
Posts: 23,231
Joined: Aug 2011
Reputation:
1,069
fritsch
Team-Kodi Developer
Posts: 23,231
I like your second two thesis, but the first one, you directly see the issues here:
a) MediaCodec has no way to add vendor specific post processing, which would be controllable by userspace. It just "does its" job and is done. On the shield it deinterlaces and it looks quite okayish, if you have the right firmware. Other vendors don't deinterlace properly ... so an issue arrises
b) What needs to be done: Extend MediaCodec to properly add post processing. One way of doing that is: look in vdpau's mixer or check vaapi's VPP - if you really want to be next gen standard: invent a way to get the decoded surfaces back via zero copy and implement a standard android shader for deinterlacing. That way it would work on all hardware without any vendor specific silicon. Vendors that want to to better, "just" iplement this new API and we - kodi - or they netflix or they whatever - can use it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.