Kodi Community Forum

Full Version: Hardware Accelerated Decoding of MPEG2 ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Of the three major variants of X86 graphics hardware (Intel, ATI/AMD, Nvidia) does Kodi actually implement hardware assisted decoding, specifically for MPEG2 for any one of the three?
MPEG2, having a look at my XBMC / Kodi setups:

iMac - Intel i5 - AMD 6770M - using ff-mpeg2 - NO
ATV1 - Intel Pentium M - Nvidia GeForce Go 7300 - ff-mpeg2 - NO
RPi - Broadcom BCM2835 - omx-mpeg2 - YES !

These is with mpeg2 interlaced video, both live and recorded from TvHeadend.
XBMC Gotham was a revelation on the 8 year old 1Ghz ATV1 running Ubuntu, as it allowed mpeg2 1080i video to be played in software only for the first time.

Smile
MPEG-2 is easy to CPU decode compared to the other codecs like VC1 or H.264, even for 1920x1080 video. Does it really matter if it's hardware accelerated?
Yep - MPEG2 is relatively lightweight these days - though decent de-interlacing is still a little bit CPU intensive, so some low-end SB/IVB Celerons may struggle with YADIF 2x, if you are watching interlaced MPEG2 like Live TV?
MPEG2 hardware decoding has been disabled within Kodi if I remember rightly due to issues some DVD's were causing with it enabled.
(2015-01-03, 18:55)jjd-uk Wrote: [ -> ]MPEG2 hardware decoding has been disabled within Kodi if I remember rightly due to issues some DVD's were causing with it enabled.

Aren't there two different players in Kodi? One does DVDs (and doesn't use hardware acceleration), the other does content in other wrappers (.ts, .mkv, PVR live TV etc.) which does? Certainly there is an option for MPEG2 VAAPI acceleration in expert settings?
Nope only the one video player, however it was disabled for SD only I believe because of the DVD issues, so that might be for HD.
It's a bit confusing, as the built-in Kodi video player on desktop platforms is actually called "dvdplayer" for what I'm sure at the time were good reasons, that I've never seen explained in public. "Dvdplayer" is used to play everything, not just DVDs.
Originally xbmc used the mplayer playback engine when on the xbox however that didn't support playback of DVD with menu's, thus we wrote our own player for DVD playback. Over time the features of dvdplayer increased as it was our own design so fitted better with the project, can't remember exactly at what stage mplayer was dropped but it was certainly after dvdplayer had reached feature parity. I believe the xbmc4xbox builds still have the option of choosing dvdplayer or mplayer.
Yep, good reasons at the time for sure. And since it's only used internally I'm sure it isn't worth the trouble to rename it.
(2015-01-03, 16:33)Stereodude Wrote: [ -> ]MPEG-2 is easy to CPU decode compared to the other codecs like VC1 or H.264, even for 1920x1080 video. Does it really matter if it's hardware accelerated?
But, unfortunately, it's *NOT* that easy to decode/display (interlaced, anyway) by a lot of the sub-$100 Kodi options that are all the rage these days (e.g., Fire TV). Same for VC-1.

The low-cost boxes all decode h264 via hardware, as they're optimized for playback of streaming services, which have all pretty much standardized on using h264. For full support of Blu-ray rips and HDTV, you also need VC-1 and MPEG-2 (HD) support, and none of those little boxes seem to handle that very well. No hardware decoding supported, and their CPUs are underpowered for doing software decoding.

I'm intrigued by the Raspberry Pi, though. Supposedly you can buy license keys which let you decode both MPEG-2 and VC-1 via hardware. How is it that such a low-cost box is capable of this, when no other low-cost boxes can? I believe that the RPi has other limitations which makes it less than an ideal choice these days, but I forget the specifics.
Sorry to bring back an old thread, but I've noticed poor DVD ISO playback on my newly-installed QNAP NAS using Kodi 14.0. Everything else (including HD MPEG2) plays so well that it really stood out.

Why in the world would this be hardcoded like that commit shows? There are so many different hardware decoders supported by Kodi that to make a blanket decision to disable DVD decoding on all of them seems like a mistake.

I strongly believe this should be a user setting, much like the VC-1 option I see in my video acceleration (VDPAU?) interface. That option clearly calls out Intel hardware so people understand why they might be having problems if they enable it. The same sort of comment could be added to the interface option about DVD hardware decoding -- and it could still default to disabled.
I also think the typical Kodi user can figure out which, if any, of their own DVDs cause problems and avoid them.
I hadn't really been paying attention to this thread, but was reminded of it upon receiving notice of LoopinFool's recent follow-up.

I'm still very interested in this topic, and I guess that I understand now why OpenELEC hasn't been doing hardware accelerated decoding on my ripped DVDs. :-) (For some time now I had believed that it was just a matter of OpenELEC not having been built with the proper/full set of drivers for my specific hardware, but I realize now that the problem/issue is deeper... in Kodi itself.)

Anyway, Scott R's posting from early January has been somewhat superceeded by events, I think, in particular with respect to Raspberry PI. The new more powerful Model 2 was announced and started shipping in February, and so far I have yet to read any comments from anybody who is using it as Kodi or OpenELEC box who doesn't just love it. I've been planning to get one to replace my small (but fanned) AMD-based HTPC in the living room, but I most certainly am concerned that its going to be less than optimal as my main living room media player unless I can put OpenELEC on it and have that properly and fully using the available hardware features, specifically, the VC-1 and MPEG2 decoding. If Kodi is, by design, going to prevent OpenELEC from making full use of the hardware (even if I have purchased the licenses for the additional codecs) then I wish that someone would tell me that now... please.

So, um... are there any RPi2 users reading this? If so, what say you? Is your RPi2 ... presumably loaded up with the latest and greatest OpenELEC... actually doing hardware accelerated decodes when you play your ripped DVD .iso files? And I have the same question also for your ripped VC-1 BluRays (of which I personally have many). Is the latest and greatest OpenELEC for the RPi2 doing... or alternatively not doing... hardware decode for VC-1? Inquiring minds want to know. Please post and let me know.


P.S. I also learned last year... much to my dismay... that Kodi and/or OpenELEC will refuse to apply available hardware to the decoding of WMV1, WMV2, or even WMV3/VC-1 main profile. As it was explained to me, the only VC-1 stuff that Kodi and/or OpenELEC will attempt to do hardware assisted decoding on is just WMV3/VC-1 advanced profile stuff. This is rather a serious annoyance for me, as I happen to have a good many WMV1, WMV2, and WMV3/VC-1 (main profile) videos that my current HTPC will play, but only with CPU decoding, and at the expense of much heat generated, power expended, and much concomminant whizzing of the HTPC's fan. :-(

Have any of the Kodi developers considered fixing this? I'm not saying that it's a bug per se, but it certainly qualifies as a non-feature from where I'm sitting.

I am by no means a codec expert, but from what little I have read online (mostly in Wikipedia) it appears to me that VC-1 main profile is strictly a proper subset of VC-1 advanced profile. Thus, if Kodi and/or OpenELEC can in fact do hardware accelerated decoding of VC-1/advancedprofile, and if they are in fact doing that on any platforms at the present time, then it just seems like it msut be either (a) a simple silly oversight or else (b) remarkably uncharacteristic laziness on the part of the developers if Kodi/OE are refusing to also do hardware accelerated decoding, on the exact same platforms, for VC-1/mainprofile as well. Am I wrong?

I really would like to get hardware accelerated decoding of VC-1/mainprofile on whatever platforms currently support hardware decoding of VC-1/advancedprofile... and it seems like it ought to be almost a no-brainer to do that... yes? No?

And in a similar vein also, I kind-of have the feeling that WMV1 and WMV2 are each also... most likely... proper subsets of WMV3 aka VC-1. So again, if Kodi can apply the available hardware to decode VC-1, then what is preventing it from doing likewise for WMV2 and WMV1 videos? I am utterly mystified that it isn't applying the available hardware to these other (proper subset?) codecs. What am I missing? Is Kodi failing to do that just because none of the developers ever even considered it (or ever even considered that it might even be worth it for such... ahem... antiquated codecs)?

To be 100% clear, I am definitely not begging any of the developers to do any sort of heavy lifting here. (That would be rude.) I'm just asking if it would be either (a) a big project or else... as I suspect... (b) relatively trivial to get the existing Kodi code to apply available VC-1/advancedprofile decoding hardware also to VC-1/mainprofile and maybe also to WMV1 and/or WMV2 decoding.
Not fully right (and much text).

Quote:P.S. I also learned last year... much to my dismay... that Kodi and/or OpenELEC will refuse to apply available hardware to the decoding of WMV1, WMV2, or even WMV3/VC-1 main profile. As it was explained to me, the only VC-1 stuff that Kodi and/or OpenELEC will attempt to do hardware assisted decoding on is just WMV3/VC-1 advanced profile stuff. This is rather a serious annoyance for me, as I happen to have a good many WMV1, WMV2, and WMV3/VC-1 (main profile) videos that my current HTPC will play, but only with CPU decoding, and at the expense of much heat generated, power expended, and much concomminant whizzing of the HTPC's fan. :-(

AMD OSS VDPAU: VC1 Advanced only <- UVD limitation
Intel VAAPI: Main / Advanced VC1
Nvidia VDPAU: Main / Advanced VC1
RPi: Both, too

DVD isos are not hw accelerated cause of still frames, which kills nearly every hw decoder.

If I missed something in your wall of text, please summarize.
Pages: 1 2