Android -  ALL Kodi17 - (TvHeadend) PVR - SW/HW Decoding issue
#1
Question 
Hi
I have a weird problem that only effects my KODI install on the Shield TV. (KODI 17 Git:20170205-Ocbe762)
My other installs on several raspberry pi´s and windows pc´s don’t have this behavior
I have a TvHeadend server running. When I start watching any TV channel Kodi uses this setup:

Video decoder amc-h264 (HW)
Pixel format Surface
Deinterlace method hardware

When switching the channel, doesn’t matter to what kind of Channel (HD SD 720p) it changes to

Video decoder ff-h264 (SW)
Pixel format yuv420p
Deinterlace method yadif=1:-1:1

And then the playback is choppy.
Next channel uses again Video decoder amc-h264 (HW) - next channel uses again Video decoder ff-h264 (SW)…and so on. It has nothing to do with the channel itself. For example when I start with channel 1 (Video decoder amc-h264 (HW)) and then to channel 2 (Video decoder ff-h264 (SW)) then to 3 (Video decoder amc-h264 (HW)) and back to 1 (Video decoder ff-h264 (SW))

It always changes between the two decoding settings

My Kodi setting are:
Player settings, Video
Adjust display refresh rate On start Stop
Render method Auto detect (cannot change this)
This is my Video setting: enable HQ scalers 100%
Allow hardware acceleration Mediacodec Surface on
Allow hardware acceleration Mediacodec off
System setting:
Resolution 1920*1080p
Refrech rate 50.00

Logfile: http://paste.ubuntu.com/23942936/

Any help how I can make sure that the HW decoding is always used is much appreciated.
Thanks
Reply
#2
I have exacly the same issue with LiveTV (Kodi 17+Tvheadend) on Sony Android TV.
When switching channels every second channel has SW decoding, but when I stop playing and then play again HW decoding is active.
Reply
#3
Known. Was hard enough to "dumpfix" mediacodec to make hw accel at least on every second channel working. You need to press stop before switching.

If you feel experimental, try: http://mirrors.kodi.tv/test-builds/andro...bi-v7a.apk
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#4
Thanks, it works!
Now HW acceleration is always active.
Reply
#5
Interesting regarding mediacodec deinterlacing on the Shield, I thought only AMLogic Android platforms had this issue with Krypton.

Personally I don't trust any Android Kodi media platform to give reliable deinterlacing anymore with Kodi Krypton.
mediacodec just does not seem up to the task.

Reply
#6
It's unrelated to mediacodec, it's Kodi trying to open it twice at the same time.
Normally, using non-surface on devices actually supporting multi-instances (like shield) should workaround the issue.
Reply
#7
Thx. Koying...so you are suggesting the following setup:

Allow hardware acceleration > Mediacodec Surface OFF
Allow hardware acceleration > Mediacodec ON

Reply
#8
Yep. Untested though, but the actual issue is that the surface is busy when trying to open it a second time, and it thus fails.
Mediacodec non-surface shouldn't have this issue on Shield.

Note that the workaround probably won't work on AML as those don't support multi-instances at all, at least that's my assumption considering my knowledge of AML architecture.
Reply
#9
It seems to me that all the deinterlacing problems are related to communication between TvHeadend and Kodi.

I have two PVR backends, TvHeadend and DVBViewer Recording Service and the same channels from DVBViewer play fine with hardware acceleration and deinterlacing (Mediacodec Surface).

When I use the TvHeadend Android TV app (exoplayer) with the Live Channels app all channels play fine with hardware acceleration.
Kodi @ NVidia Shield Android TV, Asrock J3455-ITX (LibreELEC Server), Windows 10, and Nexus 7 (2013)
Reply
#10
Does it work with the build linked above?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
(2017-02-07, 12:54)maxtherabbit Wrote: When I use the TvHeadend Android TV app (exoplayer) with the Live Channels app all channels play fine with hardware acceleration.
I see the exact same with AML Mi Box and TvHeadend Live Channels using both mediaplayer and exoplayer, so Hardware deinterlacing does work properly using that combo. Smile

(2017-02-07, 10:58)Koying Wrote: Yep. Untested though, but the actual issue is that the surface is busy when trying to open it a second time, and it thus fails.
Mediacodec non-surface shouldn't have this issue on Shield.

Note that the workaround probably won't work on AML as those don't support multi-instances at all, at least that's my assumption considering my knowledge of AML architecture.
I see.

I've tested disabling Mediacodec Surface on the AML Mi Box with Krypton and decoding and deinterlacing still defaults to S/W for mpeg2 & H264.

I will give Fritsch's notsoshitty .apk a once over test Wink

Reply
#12
(2017-02-07, 13:19)fritsch Wrote: Does it work with the build linked above?

I can't install it. Is it because I use arm64-v8a and the .apk is armeabi-v7a?

Image
Kodi @ NVidia Shield Android TV, Asrock J3455-ITX (LibreELEC Server), Windows 10, and Nexus 7 (2013)
Reply
#13
Most likely ... just remove the other one.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
Should not matter
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#15
You cannot replace an ABI by another, droid sees them as different as much as if the signature is different.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
ALL Kodi17 - (TvHeadend) PVR - SW/HW Decoding issue00