Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] vaapi on xbmc with Intel graphics
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Fri May 18, 2012 10:21 pm    Post subject: [SOLVED] vaapi on xbmc with Intel graphics Reply with quote

I'm trying to make vaapi work with Intel HD graphics (Intel Celeron G530).

I compiled everything needed with bothe "intel" and "vaapi" use flags:
Code:
[ebuild   R    ] x11-base/xorg-drivers-1.12  INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="intel vesa -apm -ark -ast -cirrus -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) -mach64 -mga -neomagic (-newport) -nouveau -nv -nvidia (-omapfb) -qxl -r128 -radeon -s3 -s3virge -savage -siliconmotion -sis (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -v4l -via -virtualbox -vmware (-voodoo)" 0 kB
[ebuild   R    ] x11-libs/libdrm-2.4.33  USE="-libkms -static-libs" VIDEO_CARDS="intel -nouveau (-omap) -radeon -vmware" 0 kB
[ebuild   R    ] sys-power/pm-utils-1.4.1-r2  USE="alsa -debug -ntp" VIDEO_CARDS="intel -radeon" 0 kB
[ebuild   R    ] x11-libs/libva-1.0.15  USE="opengl" VIDEO_CARDS="intel -dummy -fglrx -nvidia" 0 kB
[ebuild   R    ] x11-libs/libva-intel-driver-1.0.17  0 kB
[ebuild   R    ] media-libs/mesa-8.0.2  USE="classic egl g3dvl gallium llvm nptl shared-glapi xvmc -bindist -d3d -debug -gbm -gles1 -gles2 -openvg -osmesa -pax_kernel -pic (-selinux) -shared-dricore -vdpau -wayland -xa" VIDEO_CARDS="intel -i915 -i965 -nouveau -r100 -r200 -r300 -r600 -radeon -vmware" 0 kB
[ebuild   R    ] x11-drivers/xf86-video-intel-2.19.0  USE="dri sna (-glamor)" 0 kB
[ebuild   R    ] virtual/ffmpeg-0.10.3  USE="X encode jpeg2k mp3 sdl theora threads truetype vaapi x264 -vdpau" 0 kB
[ebuild   R    ] media-video/ffmpeg-0.10.3  USE="X aac alsa amr bzip2 cdio dirac encode faac gnutls hardcoded-tables jpeg2k mmx mmxext mp3 openssl oss pulseaudio schroedinger sdl speex ssse3 theora threads truetype v4l vaapi vorbis vpx x264 xvid zlib -3dnow -3dnowext -aacplus (-altivec) -ass -avx -bindist (-celt) -cpudetection -debug -doc -frei0r -gsm -ieee1394 -jack -libv4l -modplug (-neon) -network -openal -pic -rtmp -static-libs -test -vdpau (-vis)" FFTOOLS="aviocat cws2fws ffeval graph2dot ismindex pktdumper qt-faststart trasher" 0 kB
[ebuild   R    ] media-video/vlc-2.0.1  USE="X a52 aac aalib alsa avcodec avformat bluray cdda cddb dbus dts dvb dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gnutls kde libass libcaca libsamplerate lirc matroska mmx mp3 mpeg ncurses ogg opengl oss png postproc pulseaudio qt4 samba sdl speex sse svg swscale theora truetype udev v4l vaapi vlm vorbis x264 xcb xml xv (-altivec) -atmo (-audioqueue) -avahi -bidi -dc1394 -debug -dirac (-direct2d) -directfb (-directx) (-dshow) (-dxva2) -egl -fbosd -fluidsynth -gme -gnome -growl -httpd -ieee1394 (-ios-vout) -jack -kate -libnotify -libproxy -libtar -libtiger -linsys -live -lua (-macosx) (-macosx-audio) (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-macosx-vout) (-media-library) -modplug -mtp -musepack (-neon) -omxil -optimisememory -portaudio -projectm -pvr -rtsp -run-as-root -schroedinger -sdl-image -shine -shout -sid -skins -sqlite -switcher -taglib -twolame -upnp -vcdx (-waveout) (-win32codecs) (-wingdi) -wma-fixed -xosd -zvbi" 0 kB
[ebuild   R    ] media-tv/xbmc-11.0  USE="alsa bluetooth bluray cec goom mysql projectm pulseaudio rsxs samba sse sse2 udev vaapi xrandr -airplay (-altivec) -avahi -css -debug -joystick -midi -profile -pvr -rtmp -vdpau -webserver" 0 kB


my kernel has enabled needed intel graphics options:
Code:
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y


vainfo should be ok:
Code:
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Intel i965 driver - 1.0.17
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD


but I still get no video in xbmc if vaapi option is enabled (eighter blank screen or completely stuck graphic interface until I kill xbmc).
this is one example:
Code:
xbmc --debug                                                                             
WARNING: Ignoring invalid value 'none' for parameter 'printing'
ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) CP850 instead.
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
/usr/bin/xbmc: line 137:  5461 Segmentation fault      (core dumped) "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
Crash report available at /home/tnt/xbmc_crashlog-20120519_001251.log

http://pastebin.com/raw.php?i=UKtLQDi7

and even if I get just blank screen without the crash and press 'o', there's dc:ff-h264 shown hence no vaapi...

I'm I missing something big here?
_________________
gentoo user


Last edited by tnt on Fri Jun 08, 2012 11:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Fri May 25, 2012 8:38 pm    Post subject: Reply with quote

anyone using Intel VAAPI with XBMC ?
_________________
gentoo user
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1631
Location: /mnt/Gentoo/Europe

PostPosted: Sun May 27, 2012 9:23 pm    Post subject: Reply with quote

tnt wrote:
anyone using Intel VAAPI with XBMC ?


Hi

I am using Nvidia Optimus = Intel + Nvidia. As no one on Gentoo forum doesn't know how to use vdpau with Optimus system, so I have to use just Intel card. The problem is on Intel card I do not have such tool like nvidia-setting and very useful option for watching video - Sync to VBlank. Fortunatley on Wiki Arch I have found this article:
https://wiki.archlinux.org/index.php/Intel

where is this part:
Quote:
Video tearing

which reffer here:
https://wiki.archlinux.org/index.php/Intel#Hardware_video_acceleration
Quote:
Hardware video acceleration

If you want to enable hardware accelerated video decode/encode in multimedia applications (such as VLC or MPlayer) for Intel HD graphics controllers (G45, Sandybridge), install the libva-driver-intel package, available in the Official Repositories.

To take advantage of VA-API, use a VAAPI supported video player. If you use mplayer, install mplayer-vaapi, and use -vo vaapi parameter. To enable hardware video decoding in flash, add EnableLinuxHWVideoDecode=1 to
/etc/adobe/mms.cfg. If hardware video decoding is still not working, you can also try adding
OverrideGPUValidation = 1.


Unfortunatley I can not find mplayer-vaapi for Gentoo, so I hope maybe XBMC will better than Mplayer/Mplayer2, as there is possible to compile with vaapi flag. I will let you know...
Code:
# equery u xbmc
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-tv/xbmc-11.0:
 U I
 - - airplay    : enable AirPlay support
 + + alsa       : Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - avahi      : Add avahi/Zeroconf support
 + + bluetooth  : Enables Bluetooth Support
 - - bluray     : Enable playback of Blu-ray filesystems
 - - cec        : Enable support for HDMI-CEC devices via libcec
 - - css        : Enables reading of encrypted DVDs
 - - debug      : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
                  http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - goom       : Enable GOOM visualization plugin
 - - joystick   : Add support for joysticks in all packages
 - - midi       : Support MIDI files
 - - mysql      : Adds mySQL Database support
 - - profile    : Adds support for software performance analysis (will likely vary from ebuild to ebuild)
 + - projectm   : Enable projectM visualization plugin
 - - pulseaudio : Adds support for PulseAudio sound server
 - - pvr        : Enable MythTV support
 + - rsxs       : Enable really slick X screensavers
 - - rtmp       : Enable Real Time Messaging Protocol using librtmp
 + - samba      : Adds support for SAMBA (Windows File and Printer sharing)
 + + sse        : fast floating point optimization for PentiumIII+ class chips
 + + sse2       : faster floating point optimization for SSE2 capable chips
 + + udev       : Enable sys-fs/udev integration (device discovery, power and storage device support, etc)
 - - vaapi      : Enables VAAPI (Video Acceleration API) for hardware decoding
 - - vdpau      : enable support for Video Decode and Presentation API for Unix
 - - webserver  : Enable internal webserver
 + - xrandr     : Support X randr extension
Back to top
View user's profile Send private message
tsubus
n00b
n00b


Joined: 31 May 2012
Posts: 6

PostPosted: Thu May 31, 2012 9:08 am    Post subject: Reply with quote

I'm having the same issue as you. Video works fine without the vaapi flag set in xbmc. If xbmc is emerged with the vaapi flag, xbmc crashes as soon as I play a video (I've tried only x264 hd videos). I've read many forum articles, tried several different things, can't seem to get it to work.

I have a Sandy Bridge Intel board (CPU+GPU), specifically H61 chipset.
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Thu May 31, 2012 8:59 pm    Post subject: Reply with quote

Xywa wrote:
tnt wrote:
anyone using Intel VAAPI with XBMC ?


Unfortunatley I can not find mplayer-vaapi for Gentoo, so I hope maybe XBMC will better than Mplayer/Mplayer2, as there is possible to compile with vaapi flag. I will let you know...
[/code]


http://www.emmolution.org/?p=192

Recently got mplayer-vaapi working on my brand spankin' new Sager 6165NP (Ivy Bridge / nVidia 650M) following the instructions of the above article. But I found the LibVA and Intel G45 steps were unnecessary, and a simple:

Code:

git clone git://gitorious.org/vaapi/mplayer.git mplayer
cd mplayer
git pull origin hwaccel-vaapi
cd ..
./configure --prefix=/usr/local
make
make install


...was sufficient to have a working mplayer-vaapi. You may want to ~arch the intel and libva just in case however. You must run autoconf after the git branch is pulled or the vaapi codecs won't get built at all, and you must run
Code:
mplayer -vo vaapi -va vaapi

... to make it work.

Now if only I had a working GeForce 650M to go with it


Last edited by a7thson on Thu May 31, 2012 10:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Thu May 31, 2012 10:02 pm    Post subject: Reply with quote

-vo vaapi won't give you hardware decoding, just presentation. You need to add -va vaapi too.
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Thu May 31, 2012 10:50 pm    Post subject: Reply with quote

Gusar wrote:
-vo vaapi won't give you hardware decoding, just presentation. You need to add -va vaapi too.


Thanks, you are correct. I'll amend the earlier post
Back to top
View user's profile Send private message
tsubus
n00b
n00b


Joined: 31 May 2012
Posts: 6

PostPosted: Fri Jun 01, 2012 12:35 pm    Post subject: Reply with quote

that would make it work just for mplayer, though, correct?

I'd love for it to work with xbmc, but I guess support is still limited.
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Fri Jun 01, 2012 2:00 pm    Post subject: Reply with quote

tsubus wrote:
that would make it work just for mplayer, though, correct?

I'd love for it to work with xbmc, but I guess support is still limited.


Sadly that seems to be the case. mplayer-vaapi certainly seems to work, which is some consolation. It was amusing to be watching a fullscreen 1080p video while gcc-4.6.3 was emerging last night :D
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Sun Jun 03, 2012 12:05 pm    Post subject: Reply with quote

Thx!

That helped to make mplayer with vaapi support.
It plays well but I cannot make smplayer use it in the right way. As soon as I switch to vaapi output in smpalyer it starts crashing with the following message:
Code:
/usr/local/bin/mplayer -noquiet -nofs -nomouseinput -lavdopts threads=2 -sub-fuzziness 1 -identify -slave -vo vaapi -ao pulse -nokeepaspect -framedrop /usr/local/bin/mplayer -noquiet -nofs -nomouseinput -lavdopts threads=2 -sub-fuzziness 1 -identify -slave -vo vaapi -ao pulse -nokeepaspect -framedrop -nodr -double -input nodefault-bindings:conf=/dev/null -stop-xscreensaver -wid 29360221 -monitorpixelaspect 1 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles /home/tnt/.config/smplayer/styles.ass -fontconfig -font Arial -subfont-autoscale 0 -subfont-osd-scale 20 -subfont-text-scale 20 -subcp enca:sr:CP1250 -vid 0 -aid 0 -subpos 100 -volume 98 -cache 1000 -ss 634 -osdlevel 0 -noslices -channels 2 -af scaletempo,equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 -vo vaapi -va vaapi /home/tnt/videofile.mkv

MPlayer SVN-r34578-4.6.3 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Terminal type `unknown' is not defined.

Playing /home/tnt/videofile.mkv.

Cache fill:  0.00% (0 bytes)   

libavformat version 53.29.100 (internal)
libavformat file format detected.
ID_CHAPTER_ID=0
ID_CHAPTER_0_START=0
ID_CHAPTER_0_END=632715
ID_CHAPTER_0_NAME=00:00:00.000
ID_CHAPTER_ID=1
ID_CHAPTER_1_START=632715
ID_CHAPTER_1_END=902443
ID_CHAPTER_1_NAME=00:10:32.715
ID_CHAPTER_ID=2
ID_CHAPTER_2_START=902443
ID_CHAPTER_2_END=1195111
ID_CHAPTER_2_NAME=00:15:02.443
ID_CHAPTER_ID=3
ID_CHAPTER_3_START=1195111
ID_CHAPTER_3_END=1403444
ID_CHAPTER_3_NAME=00:19:55.111
ID_CHAPTER_ID=4
ID_CHAPTER_4_START=1403444
ID_CHAPTER_4_END=1840338
ID_CHAPTER_4_NAME=00:23:23.444
ID_CHAPTER_ID=5
ID_CHAPTER_5_START=1840338
ID_CHAPTER_5_END=2107439
ID_CHAPTER_5_NAME=00:30:40.338
ID_CHAPTER_ID=6
ID_CHAPTER_6_START=2107439
ID_CHAPTER_6_END=2363444
ID_CHAPTER_6_NAME=00:35:07.439
ID_CHAPTER_ID=7
ID_CHAPTER_7_START=2363444
ID_CHAPTER_7_END=2741155
ID_CHAPTER_7_NAME=00:39:23.444
ID_CHAPTER_ID=8
ID_CHAPTER_8_START=2741155
ID_CHAPTER_8_END=3042581
ID_CHAPTER_8_NAME=00:45:41.155
ID_CHAPTER_ID=9
ID_CHAPTER_9_START=3042581
ID_CHAPTER_9_END=3347427
ID_CHAPTER_9_NAME=00:50:42.581
ID_CHAPTER_ID=10
ID_CHAPTER_10_START=3347427
ID_CHAPTER_10_END=3747744
ID_CHAPTER_10_NAME=00:55:47.427
ID_CHAPTER_ID=11
ID_CHAPTER_11_START=3747744
ID_CHAPTER_11_END=4059722
ID_CHAPTER_11_NAME=01:02:27.744
ID_CHAPTER_ID=12
ID_CHAPTER_12_START=4059722
ID_CHAPTER_12_END=4402481
ID_CHAPTER_12_NAME=01:07:39.722
ID_CHAPTER_ID=13
ID_CHAPTER_13_START=4402481
ID_CHAPTER_13_END=4710456
ID_CHAPTER_13_NAME=01:13:22.481
ID_CHAPTER_ID=14
ID_CHAPTER_14_START=4710456
ID_CHAPTER_14_END=5333578
ID_CHAPTER_14_NAME=01:18:30.456
ID_CHAPTER_ID=15
ID_CHAPTER_15_START=5333578
ID_CHAPTER_15_END=6024096
ID_CHAPTER_15_NAME=01:28:53.578
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[lavf] stream 1: audio (ac3), -aid 0, -alang eng
ID_SUBTITLE_ID=0
ID_SID_0_LANG=eng
[lavf] stream 2: subtitle (text), -sid 0, -slang eng
ID_SUBTITLE_ID=1
ID_SID_1_LANG=eng
ID_SID_1_NAME=SDH
[lavf] stream 3: subtitle (text), -sid 1, -slang eng, SDH
VIDEO:  [H264]  1920x804  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[ass] ENCA detection failed: fallback to CP1250
[ass] ENCA detection failed: fallback to CP1250
Load subtitles in /home/tnt/
ID_FILENAME=/home/tnt/videofile.mkv
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=1920
ID_VIDEO_HEIGHT=804
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=2.3881
ID_AUDIO_FORMAT=8192
ID_AUDIO_BITRATE=640000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=6
ID_START_TIME=0.00
ID_LENGTH=6024.10
ID_SEEKABLE=1
ID_CHAPTERS=16
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/va/drivers/i965_drv_video.so
libva: va_openDriver() returns 0
Opening video filter: [ass auto=1]
Couldn't open video filter 'ass'.
ASS: cannot add video filter
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.55.105 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
ID_AUDIO_BITRATE=640000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
ID_AUDIO_CODEC=ffac3
[Mixer] No hardware mixing, inserting volume filter.
Starting playback...
Cache not responding! [performance issue]
Unsupported PixelFormat 61
[VD_FFMPEG] Trying pixfmt=1.
Movie-Aspect is 2.39:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=2.3881
VO: [vaapi] 1920x804 => 1920x804 H.264 VA-API Acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.


MPlayer interrupted by signal 11 in module: decode video
ID_SIGNAL=11
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- 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.


I'll try to fix that and use mplayer until xbmc gets proper vaapi support.
_________________
gentoo user
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Sun Jun 03, 2012 3:49 pm    Post subject: Reply with quote

tnt wrote:
Thx!

I'll try to fix that and use mplayer until xbmc gets proper vaapi support.


I had no luck with smplayer either; luckily you should be able to wire up an external player in xbmc pretty easily, though it does mean you lose the xbmc controls, if your setup is configured to work with a joystick or IR remote etc, you will fall back to the mplayer configuration when playing movies. There's a lot of crap in that command line invocation of mplayer so I guess we should not be surprised that something is screwing it up.

You could try removing bits and pieces of that command line, running it directly and see what you get. Strip it to the essentials first (vo, va, ao), no filters or postproc or slave-mode or identify or ... etc ... and see if you can stumble on what's breaking it.
Back to top
View user's profile Send private message
tsubus
n00b
n00b


Joined: 31 May 2012
Posts: 6

PostPosted: Fri Jun 08, 2012 3:46 pm    Post subject: Reply with quote

I managed to get XBMC to work with vaapi, even though it's not an "ideal" solution, but it seems to work great. Basically all you have to do is have XBMC use its internal libraries, which is done by modifying its ebuild ( /usr/portage/media-tv/xbmc/xbmc-9999.ebuild ).

Open it up in an editor, find the line "--enable-external-libraries \" and comment it out (#--enable-external-libraries \).

now run 'ebuild /usr/portage/media-tv/xbmc/xbmc-9999.ebuild digest', and emerge xbmc (9999) with vaapi support: 'USE=vaapi emerge -av =media-tv/xbmc-9999'

Run XBMC and try it out, it works for me:

https://lh3.googleusercontent.com/-XfN6C2hajec/T9IcpXCvxcI/AAAAAAAARr4/_bOwWWROZjw/s912/IMG_20120608_173849.jpg
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Fri Jun 08, 2012 4:09 pm    Post subject: Reply with quote

thx for the tip!

unfortunately, emergeing xbmc-9999 dies with the following error:

Code:
checking for main in -lyajl... yes
checking for main in -ltinyxml... yes
checking for x86_64-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... yes
checking for FRIBIDI... yes
checking for SQLITE3... yes
checking for PNG... yes
checking for PCRE... yes
checking for PCRECPP... yes
checking for CDIO... yes
checking for SAMPLERATE... yes
checking for FREETYPE2... yes
checking for LIBBLURAY... yes
checking for libbluray soname... libbluray.so.1
checking for main in -ldl... yes
checking for main in -lresolv... yes
checking for main in -ljasper... yes
checking for clock_gettime in -lrt... yes
checking for ALSA... yes
checking for DBUS... yes
checking for SDL... yes
checking for main in -lSDL_image... yes
checking for libmad soname... libmad.so.0
checking for libogg soname... libogg.so.0
checking for libcurl soname... libcurl.so.4
checking for libFLAC soname... libFLAC.so.8
checking for libvorbis soname... libvorbis.so.0
checking for libvorbisfile soname... libvorbisfile.so.3
checking for libmodplug soname... libmodplug.so.1
checking for libass soname... libass.so.4
checking for libmpeg2 soname... libmpeg2.so.0
checking for libmp3lame soname... libmp3lame.so.0
checking lame/lame.h usability... yes
checking lame/lame.h presence... yes
checking for lame/lame.h... yes
checking for libvorbisenc soname... libvorbisenc.so.2
checking vorbis/vorbisenc.h usability... yes
checking vorbis/vorbisenc.h presence... yes
checking for vorbis/vorbisenc.h... yes
checking for main in -lmicrohttpd... no
configure: error: Could not find a required library. Please see the README for your platform.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/config.log
 * ERROR: media-tv/xbmc-9999 failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *          ebuild.sh, line   85:  Called src_configure
 *        environment, line 5943:  Called econf '--docdir=/usr/share/doc/xbmc-9999' '--disable-ccache' '--disable-optimizations'
 *   phase-helpers.sh, line  467:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *
 * If you need support, post the output of `emerge --info '=media-tv/xbmc-9999'`,
 * the complete build log and the output of `emerge -pqv '=media-tv/xbmc-9999'`.
/usr/lib64/portage/bin/isolated-functions.sh: line 214: wait: `econf failed': not a pid or valid job spec
 * The complete build log is located at '/var/tmp/portage/media-tv/xbmc-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/xbmc-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999'
 * S: '/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999'

_________________
gentoo user
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Fri Jun 08, 2012 4:16 pm    Post subject: Reply with quote

tnt wrote:
thx for the tip!

unfortunately, emergeing xbmc-9999 dies with the following error:

checking for main in -lmicrohttpd... no
configure: error: Could not find a required library. Please see the README for your platform.



See here for a similar error and perhaps a resolution: https://forums.gentoo.org/viewtopic-p-6275366.html
_________________
i7-3610QM | E5-2670 | FX-8300
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Fri Jun 08, 2012 6:52 pm    Post subject: Reply with quote

emerged needed library, compiled xbmc-9999 with commented out external-libs, got vaapi working, lost all sounds in xbmc. :(
but, at least vaapi works.

I tried to edit xbmc-11.0 commenting out external-libs and vaapi worked, too. unfortunately, sound was missing again.

changing settings in "system => audio output" did not help.

so, in the end, we can conclude that using gentoo's libraries gives xbmc sound and destroys vaapi.
how should the bug about it be titled? :)
_________________
gentoo user
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Fri Jun 08, 2012 6:56 pm    Post subject: Reply with quote

tnt wrote:

so, in the end, we can conclude that using gentoo's libraries gives xbmc sound and destroys vaapi.
how should the bug about it be titled? :)


"have cake, but can't eat" ? :-D
_________________
i7-3610QM | E5-2670 | FX-8300
Back to top
View user's profile Send private message
tnt
Veteran
Veteran


Joined: 27 Feb 2004
Posts: 1219

PostPosted: Fri Jun 08, 2012 7:40 pm    Post subject: Reply with quote

a7thson wrote:
"have cake, but can't eat" ? :-D


good 1 :D

[update]
after couple of recompilation and reconfiguration of audio settings in xbmc, finally I got both vaapi and sound! :)
to be honest, right now I have no idea what was wrong. maybe new libva ( 1.1.0 ) and libva-intel driver ( 1.0.18 ) I recompiled in meanwhile helped too, but for sure I'll not touch anything:
libva-1.1.0
libva-intel-driver-1.0.18
xbmc-11.0 with "enable-external-libraries" commented out

as the result I have completely glichless and tearingless reproduction. that was a little bit different with vaapi enabled mplayer.


thx everybody !!!
solved.
_________________
gentoo user


Last edited by tnt on Sat Jun 09, 2012 3:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
tsubus
n00b
n00b


Joined: 31 May 2012
Posts: 6

PostPosted: Sat Jun 09, 2012 8:48 am    Post subject: Reply with quote

With XBMC 12 they introduced HD audio, which benefits many people greatly. Also, sound was actually a lot easier to set up for me in XBMC 12 (I get audio from the HDMI port). With XBMC 11 I had to create a custom profile and tell XBMC where to get the audio (hw:1,3). With XBMC, all I had to do is select the HDMI port which is recognized correctly, set up the options correctly (make sure your audio player, be it a TV or a home theater system supports all the options you are setting. For example I personally had to disable DTS-HD). One option I had to disable to make sound work in the menus was "Enable stereo output on all speakers" (or something along those line, I'm not at home right now, can't check). After that everything works smoothly, I am really happy about the results.

Of course, if everything works as expected with XBMC 11, it's probably better to stay there for you. A lot of add-ons don't work on XBMC 12, and since it is still in development, it has not been optimized yet.
Back to top
View user's profile Send private message
a7thson
Apprentice
Apprentice


Joined: 08 Apr 2006
Posts: 176
Location: your pineal gland

PostPosted: Sat Jun 09, 2012 3:15 pm    Post subject: Reply with quote

tnt wrote:
a7thson wrote:
"have cake, but can't eat" ? :-D


good 1 :D

[update]
I recompiled in meanwhile helped too, but for sure I'll not touch anything:


LOL... that's the best kind of 'fixing' ;-)
_________________
i7-3610QM | E5-2670 | FX-8300
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Thu Jun 14, 2012 6:18 pm    Post subject: Reply with quote

Are you using ALSA or PulseAudio?

Btw, mplayer vaapi support relies on a custom ebuild, or the current mplayer 1 ebuild will work fine? I have a core i3 with HD3000 and it lags more on Linux than my old core 2 duo (although it has a decent gpu).
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Thu Oct 04, 2012 6:18 am    Post subject: Reply with quote

tsubus wrote:
I managed to get XBMC to work with vaapi, even though it's not an "ideal" solution, but it seems to work great. Basically all you have to do is have XBMC use its internal libraries, which is done by modifying its ebuild ( /usr/portage/media-tv/xbmc/xbmc-9999.ebuild ).

Open it up in an editor, find the line "--enable-external-libraries \" and comment it out (#--enable-external-libraries \).

now run 'ebuild /usr/portage/media-tv/xbmc/xbmc-9999.ebuild digest', and emerge xbmc (9999) with vaapi support: 'USE=vaapi emerge -av =media-tv/xbmc-9999'

Run XBMC and try it out, it works for me:

https://lh3.googleusercontent.com/-XfN6C2hajec/T9IcpXCvxcI/AAAAAAAARr4/_bOwWWROZjw/s912/IMG_20120608_173849.jpg


This's a bug and should be reported (doing).
_________________
My blog
Back to top
View user's profile Send private message
nihil39
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2005
Posts: 97
Location: Italy

PostPosted: Fri Oct 19, 2012 10:28 am    Post subject: Reply with quote

a7thson wrote:
Recently got mplayer-vaapi working on my brand spankin' new Sager 6165NP (Ivy Bridge / nVidia 650M) following the instructions of the above article. But I found the LibVA and Intel G45 steps were unnecessary, and a simple:

Code:

git clone git://gitorious.org/vaapi/mplayer.git mplayer
cd mplayer
git pull origin hwaccel-vaapi
cd ..
./configure --prefix=/usr/local
make
make install


...was sufficient to have a working mplayer-vaapi. You may want to ~arch the intel and libva just in case however. You must run autoconf after the git branch is pulled or the vaapi codecs won't get built at all, and you must run
Code:
mplayer -vo vaapi -va vaapi

... to make it work.


Will these instructions be enough to install mplayer-vaapi without harming the whole system? Will I have to remove mplayer2?
What do you mean by "running autoconf after the git branch is pulled"?

Thanks and sorry for the crossposting in a similar thread around here.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Fri Oct 19, 2012 3:03 pm    Post subject: Reply with quote

nihil39 wrote:
a7thson wrote:
Recently got mplayer-vaapi working on my brand spankin' new Sager 6165NP (Ivy Bridge / nVidia 650M) following the instructions of the above article. But I found the LibVA and Intel G45 steps were unnecessary, and a simple:

Code:

git clone git://gitorious.org/vaapi/mplayer.git mplayer
cd mplayer
git pull origin hwaccel-vaapi
cd ..
./configure --prefix=/usr/local
make
make install


...was sufficient to have a working mplayer-vaapi. You may want to ~arch the intel and libva just in case however. You must run autoconf after the git branch is pulled or the vaapi codecs won't get built at all, and you must run
Code:
mplayer -vo vaapi -va vaapi

... to make it work.


Will these instructions be enough to install mplayer-vaapi without harming the whole system? Will I have to remove mplayer2?
What do you mean by "running autoconf after the git branch is pulled"?

Thanks and sorry for the crossposting in a similar thread around here.


Without a working ebuild, I think this's a very bad idea. That's why I didn't do it. Also the project is not that active; someone has to add VA API to the official Mplayer.

But if you really want VA API, you may set the --prefix to /opt or /opt/mplayer, then set the frontend's path (like smplayer) to /opt/mplayer (or wherever the binary is).
_________________
My blog
Back to top
View user's profile Send private message
nihil39
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2005
Posts: 97
Location: Italy

PostPosted: Sun Oct 21, 2012 1:47 pm    Post subject: Reply with quote

I installed mplayer-vaapi sources pulled in by git in a separate directory in /usr/local then i created a symlink to the mplayer-vaapi executable in /usr/bin .

I followed the following instructions:

Code:
git clone git://gitorious.org/vaapi/mplayer.git mplayer-vaapi
cd mplayer-vaapi
git pull origin hwaccel-vaapi
./configure --prefix=/usr/local
make


I had to compile ffmpeg too, i was asked to do so. All the executables went in that directory, /usr/local remained empty.
No make install and also this is false in my experience
Quote:
You must run autoconf after the git branch is pulled or the vaapi codecs won't get built at all


All seems to work fine, i'm getting hw video acceleration! I've also run emerge --sync and emerge -avDu world to see if something was messed up but it wasn't.

I run it with
Code:
mplayer-vaapi -vo vaapi -va vaapi
but what does the -va option do? I can't find it in the manual while instead mplayer-vaapi -vo help shows all the available video output options.

The vaapi implementation is not meged in the mplayer2 project because "the vaapi implementation sucks" and i guess the mplayer2 aims at good quality of code. The original mplayer project is not that active.

A solution would to write an ebuild for gentoo that pulls the sources from the git site of mplayer-vaapi. Anyone willing to do that, I could help but i'm not an expert at all.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Mon Nov 19, 2012 7:27 am    Post subject: Reply with quote

Reported bug --

https://bugs.gentoo.org/show_bug.cgi?id=437134

Please confirm.
_________________
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum