The Shield supports both in relation to Plex, via MKV's. Not positive regarding Kodi on it, but I would imagine it would work as well since the codecs have been pushed in the latest firmware to support it natively.
5 Ways Our SHIELD Android TV Box Just Got Better | The Official NVIDIA Blog