Kodi Community Forum

Full Version: Software decoding for mpeg2, but HW decosing for all else?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a Minix X8H-Plus box. The system comes pre-installed with a custom Minix version of Kodi, but it is based on Gotham and therefore I can't get it to see my centralized MySQL database of movies, music, etc (I also have Windows clients on my network).

Therefore, I'd like to use Helix on my Minix, but there is one file type that refuses to play correctly. The problem files in question are Recorded TV recordings that are 25 fps (Australian TV). For some strange reason reason, Helix Kodi refuses to 'acknowledge' the 25 fps frame rate of the files, and instead implements a ~40 fps frame rate which makes the video impossible to watch (massive skipping). This only happens with files recorded from one particular tv channel, and also the live tv streams from the same channel. Turning on "Adjust refresh rate to match match video" makes no difference at all.

After much trial and error, I've worked out that the problem meg2 files play as expected if Hardware acceleration is turned off (i.e. if software acceleration is used), or if the amcodec (under HW Acceleration) is turned off. If I turn off the stagefright or mediacodec codecs (or both) the files still don't play correctly. However, if I turn off hardware acceleration or the amcodec, then my HD h264 files stutter terribly.

As such, my question is, is there a way of turning off hardware acceleration only for one file type? Alternatively, can I turn off the amcodec just for meg2 files, but have everything turned on for all other files types?

I've tried every combination with Helix, Isengard and SPMC - no joy.

Rich
Yes - this should be possible

In your advancedsetings.xml you can add the following section:

<video>
<stagefright> <!-- Previously this page also listed <mediacodec> tags as well as stagefright tags, but this was in error. There are only stagefright options for official Kodi builds. SPMC has mediacodec options for codec tweaking, though. -->
<!-- -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
<useavccodec>-1</useavccodec>
<usehevccodec>-1</usehevccodec> <!-- Added in v15 -->
<usevc1codec>-1</usevc1codec>
<usevpxcodec>-1</usevpxcodec>
<usemp4codec>-1</usemp4codec>
<usempeg2codec>-1</usempeg2codec>
<useswrenderer>false</useswrenderer>
</stagefright>
<mediacodec>
<useavccodec>-1</useavccodec>
<usehevccodec>-1</usehevccodec> <!-- Added in v15 -->
<usevc1codec>-1</usevc1codec>
<usevpxcodec>-1</usevpxcodec>
<usemp4codec>-1</usemp4codec>
<usempeg2codec>-1</usempeg2codec>
<useswrenderer>false</useswrenderer>
</mediacodec>
</video>

If I understand your problem right, it should be possible by changing the following line in both sections: <usempeg2codec>0</usempeg2codec>
So HW-Acceleration for mpeg2-files will be switched off generally.

As far as i know, there is also an option to differ between HD and SD files. You can insert in your lines in advancedsettings instead of -1, 1 or 0 HD or SD. So you can decide witch HW-acceleartion (or not) should be used for whcih type of files (codec and resolution).

SaEt9000
@SaEt9000

Thanks for the reply. I tried the advancedsettings.xml additions you suggested (as well as different combinations based on what I've read in other threads) but unfortunately it doesn't solve my problem. I really need to be able to turn off the AMCODEC for SD content. Even when I force the MEDIACODEC codec to be used to decode SD content (which does solve my problem), the AMCODEC overrides it unless I specifically turn it off under the video settings window.

Is there an advancedsettings.xml option for the AMCODEC like there is for STAGEFRIGHT and MEDIACODEC?

Thanks, Rich