Kodi Community Forum

Full Version: ALL Kodi17 - (TvHeadend) PVR - SW/HW Decoding issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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
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.
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
Thanks, it works!
Now HW acceleration is always active.
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.
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.
Thx. Koying...so you are suggesting the following setup:

Allow hardware acceleration > Mediacodec Surface OFF
Allow hardware acceleration > Mediacodec ON
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.
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.
Does it work with the build linked above?
(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
(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
Most likely ... just remove the other one.
Should not matter
You cannot replace an ABI by another, droid sees them as different as much as if the signature is different.
Pages: 1 2 3 4