[LINUX] Enable XvMC for FFmpeg in XBMC's DVDPlayer?
#1
Question 
Is it possible to add XvMC support for FFmpeg in XBMC's DVDPlayer (to the XBMC for Linux port)?
...or does that create to many new dependencies to X video extension (Xv) for the X Window System?
http://wiki.xbmc.org/?title=Hardware_Acc...oding#XvMC

HAVE_XVMC_ACCEL=yes in config.mak was the information I found but that could be old and out-of-date?

MPlayer video output module uses XvMC functions so maybe best would be to look at how they implement it? but try if possible to port the latest libxvmc from the openChrome project in order implemented that in XBMC's DVDPlayer as I understand that is the most up-to-date version of libxvmc?

XvMC will enable GPU assisted video decoding of Motion Compensation and iDCT for MPEG-2 (and MPEG-1?). I know not many movie or TV-show rips downloads are MPEG-2 these days but remember that DVD-Video (so VOB and ISO/IMG images) are MPEG-2 and so are also many Live-TV streams and recorded TV-files from MythTV, ReplayTV, TiVo, VDR.

It should make video decoding of MPEG-2 use less CPU, and make slower computers decode higher native resolution MPEG-2.


PS! I am not sure how it would work in XBMC for Linux but one thing that might be smart is to do what MythTV has done an added a "UseXvMCForHDOnly" (Use XvMC For HD Only) switch that automaticly only enable XvMC when the native horisontal video resolution is over 720 pixels. They do this because their XvMC implementation has a couple of limitations:
Quote:
  • BOB and onefield are the only Deinterlacing methods that work with XvMC.
  • Picture in Picture, or PiP, doesn't work with XvMC.
  • Editing a video is difficult to impossible with XvMC.
  • Stepping though the video frame by frame can cause artifacts with XvMC.
Maybe we could workaround those caveats if needed Huh
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#2
Smile 
Maybe a different XvMC library has to be used for each GPU brand?

http://www.phoronix.com/scan.php?page=ne...&px=NjI2Ng

Quote:New Intel Video XvMC Driver Branch
Posted by Michael Larabel on December 30, 2007

Intel's Zhenyu Wang has announced the creation of the "xvmc" branch in the xf86-video-intel driver. This new branch features code clean-ups relating to X-Video Motion Compensation (XvMC) and a new framework that will support greater hardware media decoding functionality in the future. The xvmc branch is designed to replace the earlier "xvmc-i915" branch. In addition, libIntelXvMC.so replaces libI915XvMC.so. Along with this new branch and framework, an XvMC option has been added to Intel's driver for the xorg.conf to disable this feature, which comes enabled by default.

XvMC is an X-Video extension for offloading video decoding to the graphics processor. The current Intel X.Org driver supports XvMC on the 915/945/G33 series. More information on this new Intel XvMC branch is available from the mailing list announcement and the code can be checked out from its branch inside the xf86-video-intel git tree at FreeDesktop.org.

http://lists.freedesktop.org/archives/xo...31496.html
http://www.freedesktop.org

Huh
Reply
#3
Note! NVIDIA still hasn't added XvMC support for the GeForce 8 series in their Linux device-driver. Meanwhile, earlier GeForce product families do have support for GPU-offloading of MPEG-1 and MPEG-2video playback using the XvMC extension.
Reply
#4
Smile 
http://www.phoronix.com/scan.php?page=ne...&px=NjQwMA
Quote:Intel Releases 2.3 RC Driver w/ XvMC
Posted by Michael Larabel on March 20, 2008

Intel has just released the xf86-video-intel 2.2.99.901 driver. This driver is meant to serve as the first release candidate for what will become xf86-video-intel 2.3.0. The biggest change since the 2.2 release is that the XvMC support has been merged to master! Intel's open-source XvMC implementation currently works with the Intel 915, 945 and G33 IGPs, but the 965 XvMC support is currently problematic. Intel's XvMC support was previously found in a separate development branch. Aside from these video playback improvements, the Intel 2.3 RC1 driver has many bug-fixes, a few added quirks, code cleanups, and other improvements.

XvMC stands for X-Video Motion Compensation and allows MPEG decoding to be offloaded to the GPU. Right now MPEG is the only format supported, but Intel's Keith Packard mentioned at FOSDEM that on his agenda is bringing more video standards to XvMC. Intel is also the company behind VA-API, which is a new Video Acceleration API with multiple standards support, but it's currently not ready for prime-time.
Anyone willing to add XvMC support to FFmpeg inside XBMC's DVDPlayer video-player? Huh
Reply
#5
http://www.phoronix.com/scan.php?page=ne...&px=NjQ0NQ
Quote:xf86-video-intel 2.3.0 Released

Having been in development for a few months now and going through a couple development releases, version 2.3.0 of the xf86-video-intel driver has been released. The 2.3 release represents Intel's Q2'08 open-source driver update and the biggest change is the addition of XvMC (X-Video Motion Compensation) support for the Intel 915/945 IGPs. This graphics driver also has improved stability and a horde of bug-fixes. The release announcement and source download links can be found on the xorg-list. xf86-video-intel 2.3.0 will be part of the forthcoming X.Org 7.4 release.
Anyone? Huh
Reply
#6
Anybody of you guys read about this project?
Will this be something that XBMC can take advantage from as soon as it's stable enough to offload video decoding to the gpus?

http://tech.slashdot.org/article.pl?sid=...11/1210224

boba
Reply
#7
Cool!! Hope so.
Reply
#8
Would be useful but I suspect not any time in the near future - give it a couple of years and we might start to see it in distros.
Reply
#9
boba23 Wrote:Anybody of you guys read about this project?
Will this be something that XBMC can take advantage from as soon as it's stable enough to offload video decoding to the gpus?

http://tech.slashdot.org/article.pl?sid=...11/1210224
If you read the whole article or just a few of the comment then you would know that the project it taks about is only for XvMC support in Gallium3D, and XvMC currently only accelerate MPEG-2 (not H.264 a.k.a. MPEG-4 AVC which is what we really need to have accelerated on the GPU), ...so to answer your question; yes, XBMC could probably enable XvMC the support in FFmpeg which XBMC's DVDPlayer video-player uses to possibly take advantage of that to accelelate MPEG-2, (but again, it would only be for MPEG-2, not H.264 a.k.a. MPEG-4 AVC which I assume is what you want and thought that slashdot article was about). For more detailed information about XvMC I suggest you read MythTV article about it here:
http://www.mythtv.org/wiki/index.php/XvMC

Rolleyes

PS! You guys shoudl be much more excited to read this => http://forum.xbmc.org/showthread.php?tid=33802
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
And we alredy have someone trying to make gpu acceleration for xbmc.
however it's more in a state when we dont know if the method will be faster than the cpu. I guess time will tell. probobly we will get to know after this summer's GSOC.
Reply
#11
Yep, they could do it, but why bother? Nobody has any HD video encoded in mpeg-2 and even the old 733Mhz pentium-3 xbox1 CPU could handle SD MPEG-2 just fine.
Reply
#12
Actually a lot of DVB and ATSC 720p/1080i HDTV digital-TV broadcast around the world is still MPEG-2 (wrapped in MPEG-TS)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
My cable still comes out firewire as MPEG2 transport streams, 528x480i, 1280x720p, 1920x1080i. ATSC HD streams come in MPEG2. I'd say there is still a lot of native content still HD in MPEG2, but I'd agree an insignificant number of people have any transcoded HD into MPEG2.

I can't imagine that the Intel integrated graphics are that great at XvMC though. We used to have Intel EXTREME test machines back at the game studio I worked with and I'd rather have a 4 year old midrange graphics card than a brand new Intel. I'd love to see some numbers.
Reply
#14
Gamester17 Wrote:Actually a lot of DVB and ATSC 720p/1080i HDTV digital-TV broadcast around the world is still MPEG-2 (wrapped in MPEG-TS)
OK point taken, but isn't MPEG-2 really easy to decode? I mean the old xbox1 CPU could handle lower-bitrate 720p video in divx, and divx is mpeg-4.
Reply
#15
All of us who use the HDHomeRun to watch ATSC Over The Air broadcasts would love to be able to see the HD stations on our xboxes.

Support for XvMC on Xbox would help.

-Wes

Edit: This appears to be an ignorant post on my part Sad Sorry. I didn't realize that XvMC was a Linux-only API.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Enable XvMC for FFmpeg in XBMC's DVDPlayer?0