Having problems with turning off Hardware Acceleration
#1
Hi All.

I had another thread (that I semi-hijacked) asking about this, but it was sitting unresponded for a while, so I figured I'd start a new one, dedicated to what I'm trying to figure out.


I'm using an android box (2 Ouyas and 1 Fire TV) and they've got hardware acceleration available for H264s but not for anything else (as far as I can tell, at least). All three boxes are running the 12/23 official release of Kodi 14 (Helix). (no nightlies/dev releases)

The issue I'm facing is as follows. I have hardware accelerated video turned on and radiobuttons checked for both mediacodec and libstagefright. When I view any 1080p H264-encoded mkv video, they play beautifully. All is well. However, when I play an xvid (mpeg4 (Advanced Simple Profile) ) the video plays chopy/stuttery. If I go into the gui and disable / uncheck both mediacodec and libstagefright (even while leaving it to hardware accelerated video), then re-play the xvid, the xvid plays fine, but of course the 1080p h264 MKV is unable to play smoothly.

I've attempted to make an advancedsettings.xml file that turns on hardware acceleration for only h264 videos, and leaves it turned OFF for all others. Prior to trying this, I've had my setup working with a mysql database, so I already had an advancedsettings.xml. I do NOT believe my advancedsettings.xml is fixing my issue, however, since my xvids are still choppy, and I still need to uncheck the 2 radio buttons (mediacodec and libstagefright) in order to get them to play smooth.

I will paste my advancedsettings.xml below. If my debug logs are needed, I'd be happy to provide them, but for a first step I'd like someone to tell me if I'm doing something wrong in the xml file.

Many thanks in advance.

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>SERVIR7</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<musicdatabase>
<type>mysql</type>
<host>SERVIR7</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<video>
<stagefright>
<!-- -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
<useavccodec>1</useavccodec>
<usevc1codec>0</usevc1codec>
<usevpxcodec>0</usevpxcodec>
<usemp4codec>0</usemp4codec>
<usempeg2codec>0</usempeg2codec>
<useswrenderer>false</useswrenderer>
</stagefright>
<mediacodec>
<!-- -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
<useavccodec>1</useavccodec>
<usevc1codec>0</usevc1codec>
<usevpxcodec>0</usevpxcodec>
<usemp4codec>0</usemp4codec>
<usempeg2codec>0</usempeg2codec>
<useswrenderer>false</useswrenderer>
</mediacodec>
</video>
</advancedsettings>
Reply
#2
gentle bump ... I'm still having the same issues, i've got the above uploaded to my userdata folders on my 2 ouyas and my fire tv... The fire TV is a bit more capable of playing hardware accelerated mpeg-2's that are SD without too many hiccups, but the ouyas look so crappy unless i manually (in the gui) turn off the 2 options (libstagefright and mediacodec). Does the advancedsettings.xml take priority over whatever is set in the GUI? Should I have my GUI set some specific way? My MySQL database is working fine, so i think the AdvancedSettings.xml is in the correct location, but I can't figure out why this setting for disabling hardware acceleration for everything but AVC isn't working for me.

Any help would be greatly appreciated. Let me know if a debug log is required, I can get one up here tonight.
Reply
#3
A debug log (wiki) would be good.
Reply
#4
I have a similar problem with Hardware Acceleration with choppy video on certain formats while others are smooth as butter. While I haven't taken the time to specifically narrow down exactly which format(s) are choppy and which aren't, I'm guessing I'm in the exact same boat you are.

Is this a known issue that's being worked on, or is it a fault of the codecs and not really something that Kodi can/will fix?

For reference, I'm streaming using an ADT-1 Android TV device, so it's running a Tegra 4 chip - it's quite beefy and I believe the hardware video encode/decode stuff built into the Tegra 4 is quite robust, so I'm assuming that this is a bug somewhere and not a fault of the hardware itself...
Reply
#5
Hey Ned.

Thanks for replying. And moving this to Android-specific support. I wasn't sure if it was an android-specific problem yet or not, which is why I put it in the main support forum.

I made 2 logs. One is with the two radio buttons checked for MediaCodec and LibStageFright. That's the "bad vide" version:

http://xbmclogs.com/show.php?id=400407

And the next one is when i then UNCHECKED the radio buttons for both MediaCodec and LibStageFright, but left it set to the hardware decode option:

http://xbmclogs.com/show.php?id=400408

I'm really hoping it's just an error I made with my AdvancedSettings.xml file. But please tell me what you think on your side. Hopefully I have all the right info in that debug log. I turned on component logging for audio and video, but that's it.

Again, huge thanks in advance Smile
Reply
#6
The GUI buttons for specific decoders should turn off those hardware decoding options completely, even if the other hardware decoding switch is still on, I think.

It looks like you did everything right, but I'm not sure why it still opens mediacodec for that file in the first debug log.
Reply
#7
Hmmm ... that's annoying Smile So I guess I DO need to keep (in the GUI settings) it set to "Hardware Accelerated" and keep the check boxes enabled for LibStageFright and MediaCodec, and my XML is written correctly.

Is there maybe a known bug for android where the settings don't take? I'm having the exact same behavior in all 3 of my boxes. 2 Ouyas, and 1 Fire TV. All running the 12/23 official Kodi 14 release.

Anyone else out there in amazing Kodi dev land have any thoughts before my debug logs expire?

Many thanks!
Reply
#8
Can I kindly bump this to see if a Dev can give me some pointers? Smile. Thanks in advance.
Reply
#9
(2015-01-24, 00:04)drumst1x Wrote: And the next one is when i then UNCHECKED the radio buttons for both MediaCodec and LibStageFright, but left it set to the hardware decode option:

http://xbmclogs.com/show.php?id=400408

What makes you think it uses h/w decoding? The log clearly shows it uses s/w decoding ("CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2")
Or am I missing the point?
Reply
#10
Koying Smile You're the man! hehe Mr. Semper Smile I was actually thinking last night "I should just reach out directly to Koying"

Glad you stopped by, and thanks.


I think you looked at the log for the "Good Version' (the one where I manually, using the GUI, unchecked the radio box for both libstagefright and mediacodec)

If you look @ the first link, the "bad" link, you'll see:
CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.mp4.decode)

I think that means that it's being opened by MediaCodec, no? Regardless, what makes me think it's using hardware decoding is that it's super choppy playback, but when i uncheck mediacodec/libstagefright, it plays buttery smooth (which, i think, means s/w decoding)

Semi-related question: Am I correct in thinking, that even if I leave the guito say "Hardware Accelrated", but I UNCHECK both LSF and MC, then it will be software decoded, since there are no libraries to use for hardware?
Reply
#11
Koying or any other devs have any input for me here? Still having this issue, and really wish I didn't have to constantly turn off hw accel to view non x264-encoded files smoothly Sad

I LOVE KODI btw Smile
Reply
#12
So, I'm going to try Kodi 14.1 and see if it's any better.... if not, I'LL BE BACK Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Having problems with turning off Hardware Acceleration1