Kodi Community Forum

Full Version: [split] Nvidia Shield: Hack to enable codecs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://forums.geforce.com/default/topic...upport-/9/

"More good news. Looks like once you have root it's relatively trivial to enable both hardware MPEG-2 and VC-1 decoders with a quick tweak. Dongbot over at XDA lays it out"

http://forum.xda-developers.com/showpost...stcount=47

Quote:Not really sure where to put this since there's no Shield TV section but once you root it you can enable hardware mpeg-2 decoding pretty easily

In an adb shell run the following:
su -
mount -oremount,rw /system

download /system/etc/media_codecs.xml

Add the following to the <decoders></decoders> section:
HTML Code:
Code:
<MediaCodec name="OMX.Nvidia.mpeg2v.decode" type="video/mpeg2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Re-upload the file to the device replacing the current one. Reboot the device and MPEG2 decoding will be enabled. You can also do this for VC1 by adding the following:
HTML Code:
Code:
<MediaCodec name="OMX.Nvidia.vc1.decode" type="video/vc1">
    <Feature name="adaptive-playback" />
</MediaCodec>

Your first version I used adb shell and just manually installed su from twrp so unsure if it worked as I don't have the proper cable for mouse control

EDIT: I don't have Nvidia Shild Consle to test yet but assume that the same might go for a few other MediaCodec codecs commonly supported by Nvidia and Google? If so then we might not only get H.264, HEVC, VC-1 / WMV9 and MPEG-2 hardware decoding working in Kodi but also other video codecs such as VP8, VP9, H.263, WMV7, and WMV8? And perhaps even hardware decoding of audio codecs such as AAC, MP3, Vorbis, and MP2?

http://review.cyanogenmod.org/#/c/86747/...codecs.xml
https://android.googlesource.com/device/...codecs.xml
https://gerrit.omnirom.org/#/c/6924/1/co...codecs.xml

Code:
<MediaCodec name="OMX.Nvidia.mpeg2v.decode" type="video/mpeg2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vc1.decode" type="video/vc1">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vp9.decode" type="video/x-vnd.on2.vp9">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vp8.decode" type="video/x-vnd.on2.vp8">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.h263.decode" type="video/3gpp">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mpeg4.decode" type="video/mp4v-es">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.wmv8.decode" type="video/x-ms-wmv8">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.wmv7.decode" type="video/x-ms-wmv7">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mp2.decode" type="audio/mpeg-L2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vorbis.decode" type="audio/vorbis">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.aac.decode" type="mp4a-latm">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mp3.decode" type="audio/mpeg">
    <Feature name="adaptive-playback" />
</MediaCodec>
(2015-06-09, 14:21)RockerC Wrote: [ -> ]https://forums.geforce.com/default/topic...upport-/9/

"More good news. Looks like once you have root it's relatively trivial to enable both hardware MPEG-2 and VC-1 decoders with a quick tweak. Dongbot over at XDA lays it out"

http://forum.xda-developers.com/showpost...stcount=47

Quote:Not really sure where to put this since there's no Shield TV section but once you root it you can enable hardware mpeg-2 decoding pretty easily

In an adb shell run the following:
su -
mount -oremount,rw /system

download /system/etc/media_codecs.xml

Add the following to the <decoders></decoders> section:
HTML Code:
Code:
<MediaCodec name="OMX.Nvidia.mpeg2v.decode" type="video/mpeg2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Re-upload the file to the device replacing the current one. Reboot the device and MPEG2 decoding will be enabled. You can also do this for VC1 by adding the following:
HTML Code:
Code:
<MediaCodec name="OMX.Nvidia.vc1.decode" type="video/vc1">
    <Feature name="adaptive-playback" />
</MediaCodec>

Your first version I used adb shell and just manually installed su from twrp so unsure if it worked as I don't have the proper cable for mouse control

EDIT: I don't have Nvidia Shild Consle to test yet but assume that the same might go for a few other MediaCodec codecs commonly supported by Nvidia and Google? If so then we might not only get H.264, HEVC, VC-1 / WMV9 and MPEG-2 hardware decoding working in Kodi but also other video codecs such as VP8, VP9, H.263, WMV7, and WMV8? And perhaps even hardware decoding of audio codecs such as AAC, MP3, Vorbis, and MP2?

http://review.cyanogenmod.org/#/c/86747/...codecs.xml
https://android.googlesource.com/device/...codecs.xml
https://gerrit.omnirom.org/#/c/6924/1/co...codecs.xml

Code:
<MediaCodec name="OMX.Nvidia.mpeg2v.decode" type="video/mpeg2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vc1.decode" type="video/vc1">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vp9.decode" type="video/x-vnd.on2.vp9">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vp8.decode" type="video/x-vnd.on2.vp8">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.h263.decode" type="video/3gpp">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mpeg4.decode" type="video/mp4v-es">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.wmv8.decode" type="video/x-ms-wmv8">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.wmv7.decode" type="video/x-ms-wmv7">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mp2.decode" type="audio/mpeg-L2">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.vorbis.decode" type="audio/vorbis">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.aac.decode" type="mp4a-latm">
    <Feature name="adaptive-playback" />
</MediaCodec>

Code:
<MediaCodec name="OMX.Nvidia.mp3.decode" type="audio/mpeg">
    <Feature name="adaptive-playback" />
</MediaCodec>

Is this a fact or an assumption?? I just want to know because it would be the deciding factor to rooting the shield.
Yes and no, the first part has been confirmed by someone on xda, the rest is an assumption.

However, MPEG-2 decoding will be implement in the next update this month, according to Nvidia and there's no telling what else they may add. Before rooting (unless that's just something you want to do) I would wait to see what the next update brings.
.nice
Confirmed that deinterlaced mpeg2 is enabled in next update.