• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 19
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU
#46
I followed all instructions on the tutorial, compiled everything with VAAPI support, but when I try to run the patched mplayer, I get this:

Code:
root@XBMCLive:~/mplayer-vaapi-20100713/mplayer-vaapi# ./mplayer -vo vaapi -va vaapi /media/regula/Series/House/Season\ 7\ \(720p\)/House.S07E04.720p.HDTV.X264-DIMENSION.mkv
MPlayer SVN-r31722-4.4.3 (C) 2000-2010 MPlayer Team

Playing /media/regula/Series/House/Season 7 (720p)/House.S07E04.720p.HDTV.X264-DIMENSION.mkv.
libavformat file format detected.
[matroska @ 0x940af90] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (ac3), -aid 0
VIDEO:  [H264]  1280x720  0bpp  24.000 fps    0.0 kbps ( 0.0 kbyte/s)
SUB: Added subtitle file (1): /media/regula/Series/House/Season 7 (720p)/House.S07E04.720p.HDTV.X264-DIMENSION.srt
libva: libva version 0.31.1-sds1
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] VA API accelerated codec.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
[VD_FFMPEG] Trying pixfmt=1.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vaapi] 1280x720 => 1280x720 H.264 VA-API Acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
mplayer: i965_avc_ildb.c:621: i965_avc_ildb_decode_init: Assertion `avc_ildb_context->urb.cs_start + avc_ildb_context->urb.num_cs_entries * avc_ildb_context->urb.size_cs_entry <= ((((&i965->intel)->device_id == 0x0042) || ((&i965->intel)->device_id == 0x0046)) ? 1024 : (((&i965->intel)->device_id == 0x2E02 || (&i965->intel)->device_id == 0x2E12 || (&i965->intel)->device_id == 0x2E22 || (&i965->intel)->device_id == 0x2E32) || ((&i965->intel)->device_id == 0x2A42)) ? 384 : 256)' failed.


MPlayer interrupted by signal 6 in module: decode video
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.
root@XBMCLive:~/mplayer-vaapi-20100713/mplayer-vaapi#

My motherboard is an Intel DG45FC, with G45 chipset and an onboard GMA X4500HD. Processor is a dual core 2Ghz E2180.

I am trying to enable vaapi on the newest XBMCLive installation, which is a stripped-down version of Ubuntu 10.04. I replaced the factory xbmc binaries for the vaapi-enabled ones I compiled. If I try to play any h264 files, xbmc crashes.

my vainfo is:
Code:
root@XBMCLive:~/mplayer-vaapi-20100713/mplayer-vaapi# vainfo
libva: libva version 0.31.1-sds1
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointVLD

Then, what am I missing? Any Idea on what is wrong? isnt GMA X4500HD supported for VAAPI acceleration?

regards,

DiabboVerdde
Reply
#47
Alan
thank you for your patch. I've just tested it on my HD4200, and it seems like it resolves bugs #10865 and #10928 on ATI cards too.
Reply
#48
Vanek Wrote:Alan
thank you for your patch. I've just tested it on my HD4200, and it seems like it resolves bugs #10865 and #10928 on ATI cards too.

Great to hear that it is also working on ATI cards. Thanks for the feedback.

@DiabboVerdde: I think your Ubuntu version is too old. 10.04 has a significantly older base kernel version, which won't work good with the new xorg drivers. I suggest trying out my guide like it is, with minimal or full Maverick version. Also i have not tested it on G45 chipsets. Might be that it needs some things done differently.
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
#49
Hi Alan.
your patch doesn't work for me Sad the same stutter effect on i3.
xbmc 10.0 Dharma SVN:35567
Reply
#50
magnimus Wrote:Hi Alan.
your patch doesn't work for me Sad the same stutter effect on i3.
xbmc 10.0 Dharma SVN:35567

Yes, by the time i found one stuttering sample. For me it helped at most of the files except for one.

I am working on a new patch. Stay tuned. By the time i'd be grateful if you could upload one or two sample files which have the stuttering even with the increased surface count.
TIA, Alan
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
#51
alanwww1 Wrote:Yes, by the time i found one stuttering sample. For me it helped at most of the files except for one.

I am working on a new patch. Stay tuned. By the time i'd be grateful if you could upload one or two sample files which have the stuttering even with the increased surface count.
TIA, Alan

i can observe stuttering on any h264 coded file. for me it is the same like: all files have such effect.
but here is small example:
http://rapidshare.com/files/439764857/Lucky.mov
Reply
#52
magnimus Wrote:i can observe stuttering on any h264 coded file. for me it is the same like: all files have such effect.
but here is small example:
http://rapidshare.com/files/439764857/Lucky.mov

You do have a completely different issue here. This file and 99% of my files play silky smooth. Make sure you have the latest drivers, you have proper modelines, you have smoothvideo TURNED OFF (the reasons are in the first post). I guess the lack of dual channel RAM configuration could also be problem as the integrated GPU uses your RAM as video memory, and if the speed of memory access is not enough it will fail to copy the surfaces fast enough.
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
#53
I had installed XBMC using these instructions: http://wiki.xbmc.org/index.php?title=XBMCbuntu

But I had some problems, main problem being that I couldn't get any audio from movies (it worked with mp3's). So I tried these instructions by first uninstalling xbmc (aptitude remove xbmc) and deleting the .xbmc directory in ~.

I followed the instructions (glxinfo doesn't seem to work, it says it can't open the display) but XBMC did start.

I also have xorg installed but when I try to run xrandr I also get an error stating it can't open display. I guess XBMC has taken over it?

However, now I have more problems than I had before:
- No audio whatsoever (not even with mp3's),
- DVD playback doesn't work at all,
- I had some issues with trying to play a VOB (more specifically I got a green screen and once it crashed the whole XBMC).

I have a FullHD projector connected to a A/V receiver (supports DD etc) with 3.0 speakers and the XBMC box is connected to this. I tried tweaking the settings to hdmi audio and turned on the autosync and refresh options.

Should I reinstall everything or do you have any suggestions?
Reply
#54
hi Alan,
it sounds strange. I have the latest drivers, modeline should be a problem, because I didn't enable "auto refresh rate" feature in XBMC.
and of course mplayer-vaapi plays the same files perfectly.

here is my part of xorg.conf

Code:
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        Option          "DPMS"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth    24
        Option         "DPI" "100x100"
        Option         "UseEvents" "1"
        SubSection     "Display"
                Depth       24
                Modes      "1920x1080"
        EndSubSection
EndSection
Section "Extensions"
        Option  "Composite" "Disable"
EndSection

and guisettings.xml
Code:
<videoplayer>
        <adjustrefreshrate>false</adjustrefreshrate>
        <displayresolution>10</displayresolution>
        <errorinaspect>0</errorinaspect>
        <maxspeedadjust>5.000000</maxspeedadjust>
        <pauseafterrefreshchange>0</pauseafterrefreshchange>
        <rendermethod>0</rendermethod>
        <resamplequality>1</resamplequality>
        <stretch43>0</stretch43>
        <synctype>0</synctype>
        <teletextenabled>false</teletextenabled>
        <usedisplayasclock>true</usedisplayasclock>
        <usepbo>true</usepbo>
        <usevaapi>false</usevaapi>
    </videoplayer>

gentoo linux
Code:
Linux gentoo-xbmc 2.6.36-gentoo-r5-uric #1 SMP Tue Dec 28 20:21:50 EET 2010 x86_64 Intel(R) Core(TM) i3 CPU 530 @ 2.93GHz GenuineIntel GNU/Linux

x11-libs/libva-1.0.5
Code:
libva: libva version 0.31.1
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
Reply
#55
@magnimus

You xorg.conf is not sufficient as it does not contain modelines. Intel drivers has not got the ability to get proper modelines from EDID data. PLaying back 25fps content on a 60hz refresh rate could generate a lot of stutter.
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
#56
alanwww1 Wrote:@magnimus

You xorg.conf is not sufficient as it does not contain modelines. Intel drivers has not got the ability to get proper modelines from EDID data. PLaying back 25fps content on a 60hz refresh rate could generate a lot of stutter.

Ok, here is update xorg.conf
Code:
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "SONY"
        ModelName    "SONY HDTV"
        Option          "DPMS"
        HorizSync       14.0 - 70.0
        VertRefresh     48.0 - 62.0

        Modeline "1920x1080@24p"   74.25  1920 2558 2602 2750  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080@25p"   74.25  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080@60p"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080@50p"  148.50  1920 2448 2492 2640  1080 1084 1089 1125 +hsync +vsync
        Modeline "1920x1080@60i"   74.25  1920 2008 2052 2200  1080 1084 1094 1125 +hsync +vsync interlace
        Modeline "1920x1080@50i"   74.25  1920 2448 2492 2640  1080 1084 1094 1125 +hsync +vsync interlace
        ModeLine "[email protected]" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
EndSection

with the same effect.
But looks like autorefrash doesn't work. any file is opened in 60Hz mode and I don't see any other values under XBMC System->System->Video.
Reply
#57
D'oh. "Can't open display" happens because I'm doing this over the ssh Rolleyes

But I guess the best course of action is to reinstall minimal Ubuntu and then follow these instructions? I haven't done much since the installation (except configuring Samba), so it wouldn't be that big a deal.

Unless, of course, I'm barking the wrong tree. I have the i3-540 so I just assumed that my issues would go away with newer drivers & XBMC version (the current ones are from Ubuntu's repo).

I, btw, also got the pageflip stuff (mentioned on the previous page) in my Xorg log. I found this googling for it:

http://cgit.freedesktop.org/xorg/driver/...3ee3108309
Reply
#58
magnimus Wrote:Ok, here is update xorg.conf

Man, why not read my guide just once and do it that way. Your xorg.conf is not ok. You have to specify the output being used on the motherboard. Just like i did in the guide (first post). Please do it that way. Take a moment and check it carefully.
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
#59
I created a new patch with safe checking of buffer allocation. For me now everything is smooth. http://trac.xbmc.org/ticket/10928
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
#60
Thanks for your hard work Alan!
... I only wish I had waited until today to rebuild XBMC! Smile

*** edit:
I might as well add here that I am now (after applying your previous patch) seeing occasional sync issues on 1080p h264 movies, as well as some bad screen tearing. I'm thinking it's partly a config issue and will continue to try out different settings, but if you're interested, here are the details:

- viewing 1080p/ 23.9xx fps/ x.264/ DTS MKV files
- w/ "sync to vblank" set to "enable when playing video"
- problems occur after maybe 10-15 minutes, often after stopping or pausing movie to change video settings (the ones that come up when you hit select/enter during playback -- View Mode, etc).
- my display is an older plasma w/ a native res of 1024x768, but it is capable of displaying up to 1920x1080i@60Hz from some sources (this doesn't make much sense to me and probably has everything to do with my sync/tearing issues). Initially I had XBMC resolution set at 1024x768, but changed to 1280x1024 and that seemed to help a bit. I have not yet managed to get Ubuntu/Xorg to offer 1920x1080 -- not sure I want to because I'm afraid the text will be too small to read... but will try that when I get around to mucking w/ my xorg.conf.

Thanks again!
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 19

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use VAAPI HW Acceleration in Intel Core i3 / i5 / i7 integrated GPU4