Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer ati vaapi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ashdash
n00b
n00b


Joined: 27 Oct 2008
Posts: 17
Location: Auckland, New Zealand

PostPosted: Sun Jun 13, 2010 12:29 am    Post subject: mplayer ati vaapi Reply with quote

I'm running a home theatre pc based on a Gigabyte MA78GM-S2H motherboard with intergrated ATI HD3200 graphics and amd4850e low power cpu. I'm running kernel 2.6.33 and close to the latest xf86-video-ati diver. I'm using the ffmpeg-mt mplayer ebuild from https://bugs.gentoo.org/show_bug.cgi?id=282154 and now available on the gentoo-multimedia overlay. (thanks guys)

This is all working really well and stable. 720p movies play faultlessly without tearing averaging about 50% cpu utilisation per core. But 1080p is unusable. It's like watching stop motion photography. Therefore mythtv is unusable as well with HD content. I have briefly tried the ati catalyst 10.4 driver and it's the same.

I'm keen to try the video acceleration features of the HD3200 with mplayer and the vaapi. I found http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/. I tried an ebuild for this from the gentoo-quebec overlay but it won't build and also the ebuild looks out of date. I guess I could try to build mplayer with the splitted scripts but I don't really want to move out of the portage enviroment if possible.

So I'm keen to hear from other users about the ati vaapi and any experiences or recommendations. Is there an ebuild for the most recent splitted version that I have missed?
Back to top
View user's profile Send private message
maquiz
n00b
n00b


Joined: 13 May 2003
Posts: 24

PostPosted: Sun Jun 13, 2010 12:14 pm    Post subject: Reply with quote

I created an mplayer ebuild with vaapi included, based on the latest ffmpeg-mt mplayer (mplayer-1.0_rc4_p20100530.ebuild)
You need to extract the following patches from the file http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-20100602.tar.bz2
and put them in the filesdir in the overlay folder of your media-video/mplayer directory:

- mplayer-vaapi.patch
- mplayer-vaapi-0.29.patch
- mplayer-vaapi-gma500-workaround.patch

1080p performance however still is not good (with same specs + Xorg 1.8.1 & Catalyst 10.5) but general CPU-usage is lower.

Look for more info on enabling (s)mplayer with vaapi:
- http://wiki.archlinux.org/index.php/ATI_Catalyst#Video_acceleration
- http://oscarbg.blogspot.com/2009/11/about-xvba-vaapi-backend.html

mplayer-1.0_rc4_p20100530.ebuild:

Code:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $

EAPI="2"

ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion" || SVN_ECLASS=""

inherit eutils flag-o-matic multilib base ${SVN_ECLASS}

[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r31288

IUSE="3dnow 3dnowext +a52 aalib +alsa altivec +ass bidi bindist bl bs2b
+cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac directfb
doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon +ffmpeg-mt ftp
gif ggi -gmplayer +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
libcaca lirc +live lzo mad md5sum +mmx mmxext mng +mp3 nas +network nut openal
amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime radio +rar +real +rtc
samba +shm +schroedinger sdl +speex sse sse2 ssse3 svga tga +theora +tremor
+truetype +toolame +twolame +unicode v4l v4l2 vaapi vdpau vidix +vorbis win32codecs
+X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran"
[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg"

VIDEO_CARDS="s3virge mga tdfx vesa"
for x in ${VIDEO_CARDS}; do
   IUSE+=" video_cards_${x}"
done

BLUV="1.7"
SVGV="1.9.17"
RESTRICT="nomirror"
AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
FONT_URI="
   mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
   mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
   mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
"
if [[ ${PV} == *9999* ]]; then
   RELEASE_URI=""
else
   RELEASE_URI="http://foss.math.aegean.gr/~realnc/mplayer/${P}.tar.bz2"
fi
SRC_URI="${RELEASE_URI}
   ffmpeg-mt? ( http://foss.math.aegean.gr/~realnc/mplayer/${P}-ffmpeg-mt.patch )
   !truetype? ( ${FONT_URI} )
   gmplayer? ( mirror://mplayer/skins/Blue-${BLUV}.tar.bz2 )
   svga? ( mirror://gentoo/svgalib_helper-${SVGV}-mplayer.tar.gz )"
#   svga? ( http://foss.math.aegean.gr/~realnc/mplayer/svgalib_helper-${SVGV}-mplayer.tar.gz )"

DESCRIPTION="Media Player for Linux"
HOMEPAGE="http://www.mplayerhq.hu/"

FONT_RDEPS="
   virtual/ttf-fonts
   media-libs/fontconfig
   >=media-libs/freetype-2.2.1:2
"
X_RDEPS="
   x11-libs/libXext
   x11-libs/libXxf86vm
"
[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )"
# Rar: althrought -gpl version is nice, it cant do most functions normal rars can
#   nemesi? ( net-libs/libnemesi )
RDEPEND+="
   sys-libs/ncurses
   !bindist? (
      x86? (
         win32codecs? ( media-libs/win32codecs )
      )
   )
   X? (
      ${X_RDEPS}
      dga? ( x11-libs/libXxf86dga )
      ggi? (
         media-libs/libggi
         media-libs/libggiwmh
      )
      gmplayer? (
         media-libs/libpng
         x11-libs/gtk+:2
         x11-libs/libXi
      )
      opengl? ( virtual/opengl )
      vdpau? ( || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 ) )
      xinerama? ( x11-libs/libXinerama )
      xscreensaver? ( x11-libs/libXScrnSaver )
      xv? (
         x11-libs/libXv
         xvmc? ( x11-libs/libXvMC )
      )
   )
   a52? ( media-libs/a52dec )
   aalib? ( media-libs/aalib )
   alsa? ( media-libs/alsa-lib )
   amr? ( !bindist? ( media-libs/opencore-amr ) )
   ass? ( ${FONT_RDEPS} media-libs/libass )
   bidi? ( dev-libs/fribidi )
   bs2b? ( media-libs/libbs2b )
   cdio? ( dev-libs/libcdio )
   cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
   dirac? ( media-video/dirac )
   directfb? ( dev-libs/DirectFB )
   dts? ( media-libs/libdca )
   dv? ( media-libs/libdv )
   dvb? ( media-tv/linuxtv-dvb-headers )
   encode? (
      !twolame? ( toolame? ( media-sound/toolame ) )
      twolame? ( media-sound/twolame )
      faac? ( media-libs/faac )
      mp3? ( media-sound/lame )
      x264? ( >=media-libs/x264-0.0.20100423 )
      xvid? ( media-libs/xvid )
   )
   esd? ( media-sound/esound )
   enca? ( app-i18n/enca )
   faad? ( media-libs/faad2 )
   gif? ( media-libs/giflib )
   iconv? ( virtual/libiconv )
   jack? ( media-sound/jack-audio-connection-kit )
   jpeg? ( media-libs/jpeg )
   jpeg2k? ( media-libs/openjpeg )
   ladspa? ( media-libs/ladspa-sdk )
   libcaca? ( media-libs/libcaca )
   lirc? ( app-misc/lirc )
   live? ( media-plugins/live )
   lzo? ( >=dev-libs/lzo-2 )
   mad? ( media-libs/libmad )
   mng? ( media-libs/libmng )
   nas? ( media-libs/nas )
   nut? ( >=media-libs/libnut-661 )
   openal? ( media-libs/openal )
   png? ( media-libs/libpng )
   pnm? ( media-libs/netpbm )
   pulseaudio? ( media-sound/pulseaudio )
   rar? (
      || (
         app-arch/unrar
         app-arch/rar
      )
   )
   samba? ( net-fs/samba )
   schroedinger? ( media-libs/schroedinger )
   sdl? ( media-libs/libsdl )
   speex? ( media-libs/speex )
   svga? ( media-libs/svgalib )
   theora? ( media-libs/libtheora )
   truetype? ( ${FONT_RDEPS} )
   vaapi? ( x11-libs/xvba-video )
   vorbis? ( media-libs/libvorbis )
   xanim? ( media-video/xanim )
"

X_DEPS="
   x11-proto/videoproto
   x11-proto/xf86vidmodeproto
"
ASM_DEP="dev-lang/yasm"
DEPEND="${RDEPEND}
   dev-util/pkgconfig
   X? (
      ${X_DEPS}
      dga? ( x11-proto/xf86dgaproto )
      dxr3? ( media-video/em8300-libraries )
      gmplayer? ( x11-proto/xextproto )
      xinerama? ( x11-proto/xineramaproto )
      xscreensaver? ( x11-proto/scrnsaverproto )
   )
   amd64? ( ${ASM_DEP} )
   doc? ( dev-libs/libxslt app-text/docbook-xml-dtd )
   x86? ( ${ASM_DEP} )
   x86-fbsd? ( ${ASM_DEP} )
"

SLOT="0"
LICENSE="GPL-2"
if [[ ${PV} != *9999* ]]; then
   KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
else
   KEYWORDS=""
fi

PATCHES=(
)

pkg_setup() {
   if [[ ${PV} == *9999* ]]; then
      elog ""
      elog "This is a live ebuild which installs the latest from upstream's"
      elog "subversion repository, and is unsupported by Gentoo."
      elog "Everything but bugs in the ebuild itself will be ignored."
      elog ""
   fi

   if use gmplayer; then
      ewarn ""
      ewarn "GMPlayer is no longer actively developed upstream"
      ewarn "and is not supported by Gentoo.  There are alternatives"
      ewarn "for a GUI frontend: smplayer, gnome-mplayer or kmplayer."
   fi

   if use cpudetection; then
      ewarn ""
      ewarn "You've enabled the cpudetection flag.  This feature is"
      ewarn "included mainly for people who want to use the same"
      ewarn "binary on another system with a different CPU architecture."
      ewarn "MPlayer will already detect your CPU settings by default at"
      ewarn "buildtime; this flag is used for runtime detection."
      ewarn "You won't need this turned on if you are only building"
      ewarn "mplayer for this system.  Also, if your compile fails, try"
      ewarn "disabling this use flag."
   fi

   if use custom-cpuopts; then
      ewarn ""
      ewarn "You are using the custom-cpuopts flag which will"
      ewarn "specifically allow you to enable / disable certain"
      ewarn "CPU optimizations."
      ewarn ""
      ewarn "Most desktop users won't need this functionality, but it"
      ewarn "is included for corner cases like cross-compiling and"
      ewarn "certain profiles.  If unsure, disable this flag and MPlayer"
      ewarn "will automatically detect and use your available CPU"
      ewarn "optimizations."
      ewarn ""
      ewarn "Using this flag means your build is unsupported, so"
      ewarn "please make sure your CPU optimization use flags (3dnow"
      ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set."
   fi
}

src_unpack() {
   [[ ${PV} = *9999* ]] && subversion_src_unpack || unpack ${A}

   if ! use truetype; then
      unpack font-arial-iso-8859-1.tar.bz2 \
         font-arial-iso-8859-2.tar.bz2 \
         font-arial-cp1250.tar.bz2
   fi

   use gmplayer && unpack "Blue-${BLUV}.tar.bz2"
   use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.gz"
}

src_prepare() {
   if [[ ${PV} = *9999* ]]; then
      # Set SVN version manually
      subversion_wc_info
      sed -i s/UNKNOWN/${ESVN_WC_REVISION}/ "${S}/version.sh"
   else
      # Set version #
      sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh"
   fi

   if use svga; then
      echo
      einfo "Enabling vidix non-root mode."
      einfo "(You need a proper svgalib_helper.o module for your kernel"
      einfo "to actually use this)"
      echo

      mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
   fi
   
   use ffmpeg-mt && epatch "${DISTDIR}/${P}-ffmpeg-mt.patch"

   use vaapi &&
   epatch "${FILESDIR}/${PN}-vaapi.patch"
   epatch "${FILESDIR}/${PN}-vaapi-0.29.patch"
   epatch "${FILESDIR}/${PN}-vaapi-gma500-workaround.patch"

   base_src_prepare
}

src_configure() {
   local myconf=""
   local uses i

   # set LINGUAS
   [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"

   # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
   # compilation in almost every situation.  The reason for this is
   # because if --enable is used, it will force the build of that option,
   # regardless of whether the dependency is available or not.

   ###################
   #Optional features#
   ###################
   myconf+="
      --disable-arts
      --disable-kai
      $(use_enable network)
      $(use_enable joystick)
   "
   uses="ass bl enca ftp rtc" # nemesi <- not working with in-tree ebuild
   myconf+=" --disable-nemesi" # nemesi automagic disable
   myconf+=" --disable-ass-internal" # always use system libass
   for i in ${uses}; do
      use ${i} || myconf+=" --disable-${i}"
   done
   use bidi || myconf+=" --disable-fribidi"
   use encode || myconf+=" --disable-mencoder"
   use ipv6 || myconf+=" --disable-inet6"
   use nut || myconf+=" --disable-libnut"
   use rar || myconf+=" --disable-unrarexec"
   use samba || myconf+=" --disable-smb"
   if ! use lirc; then
      myconf+="
         --disable-lirc
         --disable-lircc
         --disable-apple-ir
      "
   fi

   # libcdio support: prefer libcdio over cdparanoia
   # don't check for cddb w/cdio
   if use cdio; then
      myconf+=" --disable-cdparanoia"
   else
      myconf+=" --disable-libcdio"
      use cdparanoia || myconf+=" --disable-cdparanoia"
      use cddb || myconf+=" --disable-cddb"
   fi

   ################################
   # DVD read, navigation support #
   ################################
   #
   # dvdread - accessing a DVD
   # dvdnav - navigation of menus
   #
   # internal dvdread and dvdnav use flags enable internal
   # versions of the libraries, which are snapshots of the fork.

   if use dvd; then
      use dvdnav || myconf+=" --disable-dvdnav"
   else
      myconf+="
         --disable-dvdnav
         --disable-dvdread
         --disable-dvdread-internal
         --disable-libdvdcss-internal
      "
   fi

   #############
   # Subtitles #
   #############
   #
   # SRT/ASS/SSA (subtitles) requires freetype support
   # freetype support requires iconv
   # iconv optionally can use unicode

   if ! use ass; then
      if ! use truetype; then
         myconf+=" --disable-freetype"
         if ! use iconv; then
            myconf+="
               --disable-iconv
               --charset=noconv
            "
         fi
      fi
   fi
   use iconv && use unicode && myconf+=" --charset=UTF-8"

   #####################################
   # DVB / Video4Linux / Radio support #
   #####################################
   myconf+=" --disable-tv-bsdbt848"
   # broken upstream, won't work with recent kernels
   myconf+=" --disable-ivtv"
   if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then
      use dvb || myconf+=" --disable-dvb"
      use pvr || myconf+=" --disable-pvr"
      use v4l   || myconf+=" --disable-tv-v4l1"
      use v4l2 || myconf+=" --disable-tv-v4l2"
      if use radio && { use dvb || use v4l || use v4l2; }; then
         myconf+="
            --enable-radio
            $(use_enable encode radio-capture)
         "
      else
         myconf+="
            --disable-radio-v4l2
            --disable-radio-bsdbt848
         "
      fi
   else
      myconf+="
         --disable-tv
         --disable-tv-v4l1
         --disable-tv-v4l2
         --disable-radio
         --disable-radio-v4l2
         --disable-radio-bsdbt848
         --disable-dvb
         --disable-v4l2
         --disable-pvr"
   fi

   ##########
   # Codecs #
   ##########
   # Use internal musepack codecs for SV7 and SV8 support
   myconf+=" --disable-musepack"

   use a52 || myconf+=" --disable-liba52"
   myconf+=" --disable-faad-internal" # always use system media-libs/faad2
   use dirac || myconf+=" --disable-libdirac-lavc"
   use dts || myconf+=" --disable-libdca"
   use dv || myconf+=" --disable-libdv"
   use lzo || myconf+=" --disable-liblzo"
   if ! use mp3; then
      myconf+="
         --disable-mp3lame
         --disable-mp3lame-lavc
         --disable-mp3lib
      "
   fi
   use bs2b || myconf+=" --disable-libbs2b"
   use schroedinger || myconf+=" --disable-libschroedinger-lavc"
   # Disable opencore-amr with bindist
   # https://bugs.gentoo.org/show_bug.cgi?id=299405#c6
   { use amr && use !bindist ; } || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb"
   if ! use png && ! use gmplayer; then
      myconf+=" --disable-png"
   fi

   uses="faad gif jpeg live mad mng pnm speex tga theora xanim"
   for i in ${uses}; do
      use ${i} || myconf+=" --disable-${i}"
   done
   use jpeg2k || myconf+=" --disable-libopenjpeg"
   if use vorbis || use tremor; then
      use tremor || myconf+=" --disable-tremor-internal"
      use vorbis || myconf+=" --disable-libvorbis"
   else
      myconf+="
         --disable-tremor-internal
         --disable-tremor
         --disable-libvorbis
      "
   fi
   # Encoding
   if use encode; then
      uses="faac x264 xvid toolame twolame"
      for i in ${uses}; do
         use ${i} || myconf+=" --disable-${i}"
      done
      use faac || myconf+=" --disable-faac-lavc"
   else
      myconf+="
         --disable-faac-lavc
         --disable-faac
         --disable-x264
         --disable-xvid
         --disable-x264-lavc
         --disable-xvid-lavc
         --disable-twolame
         --disable-toolame
      "
      uses="faac x264 xvid toolame twolame"
      for i in ${uses}; do
         use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work."
      done
   fi

   #################
   # Binary codecs #
   #################
   # bug 213836
   if ! use x86 || ! use win32codecs; then
      use quicktime || myconf+=" --disable-qtx"
   fi

   ######################
   # RealPlayer support #
   ######################
   # Realplayer support shows up in four places:
   # - libavcodec (internal)
   # - win32codecs
   # - realcodecs (win32codecs libs)
   # - realcodecs (realplayer libs)

   # internal
   use real || myconf+=" --disable-real"

   # Real binary codec support only available on x86, amd64
   if use real; then
      use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs"
      use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs"
   elif ! use bindist; then
         myconf+=" $(use_enable win32codecs win32dll)"
   fi

   ################
   # Video Output #
   ################
   uses="directfb md5sum sdl"
   for i in ${uses}; do
      use ${i} || myconf+=" --disable-${i}"
   done
   use aalib || myconf+=" --disable-aa"
   use fbcon || myconf+=" --disable-fbdev"
   use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb"
   use libcaca || myconf+=" --disable-caca"
   use zoran || myconf+=" --disable-zr"

   if ! use kernel_linux && ! use video_cards_mga; then
       myconf+=" --disable-mga --disable-xmga"
   fi

   if use video_cards_tdfx; then
      myconf+="
         $(use_enable video_cards_tdfx tdfxvid)
         $(use_enable fbcon tdfxfb)
      "
   else
      myconf+="
         --disable-3dfx
         --disable-tdfxvid
         --disable-tdfxfb
      "
   fi

   ################
   # Audio Output #
   ################
   uses="alsa esd jack ladspa nas openal"
   for i in ${uses}; do
      use ${i} || myconf+=" --disable-${i}"
   done
   use pulseaudio || myconf+=" --disable-pulse"
   if ! use radio; then
      use oss || myconf+=" --disable-ossaudio"
   fi

   ####################
   # Advanced Options #
   ####################
   # Platform specific flags, hardcoded on amd64 (see below)
   if use cpudetection; then
      myconf+=" --enable-runtime-cpudetection"
   fi

   # Turning off CPU optimizations usually will break the build.
   # However, this use flag, if enabled, will allow users to completely
   # specify which ones to use.  If disabled, mplayer will automatically
   # enable all CPU optimizations that the host build supports.
   if use custom-cpuopts; then
      uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3"
      for i in ${uses}; do
         myconf+=" $(use_enable ${i})"
      done
   fi

   use debug && myconf+=" --enable-debug=3"

   if use x86; then
      filter-flags -fPIC -fPIE
      append-ldflags -nopie
   fi

   is-flag -O? || append-flags -O2
   if use x86 || use x86-fbsd; then
      use debug || append-flags -fomit-frame-pointer
   fi

   ###########################
   # X enabled configuration #
   ###########################
   if use X; then
      uses="dxr3 ggi xinerama"
      for i in ${uses}; do
         use ${i} || myconf+=" --disable-${i}"
      done
      use dga || myconf+=" --disable-dga1 --disable-dga2"
      use opengl || myconf+=" --disable-gl"
      use osdmenu && myconf+=" --enable-menu"
      use vdpau || myconf+=" --disable-vdpau"
      use video_cards_vesa || myconf+=" --disable-vesa"
      use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
      use xscreensaver || myconf+=" --disable-xss"

      # GTK gmplayer gui
      # Unsupported by Gentoo, upstream has dropped development
      myconf+=" $(use_enable gmplayer gui)"

      if use xv; then
         if use xvmc; then
            myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
         else
            myconf+=" --disable-xvmc"
         fi
      else
         myconf+="
            --disable-xv
            --disable-xvmc
         "
         use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled."
      fi
   else
      myconf+="
      --disable-dga1
      --disable-dga2
      --disable-dxr3
      --disable-ggi
      --disable-gl
      --disable-vdpau
      --disable-vidix
      --disable-vidix-pcidb
      --disable-xinerama
      --disable-xss
      --disable-xv
      --disable-xvmc
      "
      uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv"
      for i in ${uses}; do
         use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work."
      done
   fi

   if [[ ${PV} == *9999* ]]; then
      ###################
      # External FFmpeg #
      ###################
      use external-ffmpeg && myconf+=" --disable-libavutil_a --disable-libavcodec_a --disable-libavformat_a --disable-libpostproc_a --disable-libswscale_a"
   fi

   myconf="--cc=$(tc-getCC) \
      --host-cc=$(tc-getBUILD_CC) \
      --prefix=/usr \
      --confdir=/etc/mplayer \
      --datadir=/usr/share/mplayer \
      --libdir=/usr/$(get_libdir) \
      ${myconf}"

   CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
}

src_compile() {
   base_src_compile
   # Build only user-requested docs if they're available.
   if use doc ; then
      # select available languages from $LINGUAS
      LINGUAS=${LINGUAS/zh/zh_CN}
      local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
      local BUILT_DOCS=""
      for i in ${LINGUAS} ; do
         hasq $i ${ALLOWED_LINGUAS} && BUILT_DOCS+=" $i"
      done
      if [[ -z $BUILT_DOCS ]]
      then
         emake -j1 -C DOCS/xml html-chunked || die "Failed to generate html docs"
      else
         for i in ${BUILT_DOCS} ; do
            emake -j1 -C DOCS/xml html-chunked-$i || die "Failed to generate html docs for $i"
         done
      fi
   fi
}

src_install() {
   local i

   emake prefix="${D}/usr" \
      BINDIR="${D}/usr/bin" \
      LIBDIR="${D}/usr/$(get_libdir)" \
      CONFDIR="${D}/etc/mplayer" \
      DATADIR="${D}/usr/share/mplayer" \
      MANDIR="${D}/usr/share/man" \
      INSTALLSTRIP="" \
      install || die "emake install failed"

   dodoc AUTHORS Changelog Copyright README etc/codecs.conf || die

   docinto tech/
   dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} || die
   docinto TOOLS/
   dodoc TOOLS/* || die
   if use real; then
      docinto tech/realcodecs/
      dodoc DOCS/tech/realcodecs/* || die
      docinto TOOLS/realcodecs/
      dodoc TOOLS/realcodecs/* || die
   fi
   docinto tech/mirrors/
   dodoc DOCS/tech/mirrors/* || die

   if use doc; then
      docinto html/
      dohtml -r "${S}"/DOCS/HTML/* || die
   fi

   # Install the default Skin and Gnome menu entry
   if use gmplayer; then
      dodir /usr/share/mplayer/skins
      cp -r "${WORKDIR}/Blue" \
         "${D}/usr/share/mplayer/skins/default" || die "cp skins died"

      # Fix the symlink
      rm -rf "${D}/usr/bin/gmplayer"
      dosym mplayer /usr/bin/gmplayer
   fi

   if ! use ass && ! use truetype; then
      dodir /usr/share/mplayer/fonts
      # Do this generic, as the mplayer people like to change the structure
      # of their zips ...
      for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
         cp -pPR "${i}" "${D}/usr/share/mplayer/fonts"
      done
      # Fix the font symlink ...
      rm -rf "${D}/usr/share/mplayer/font"
      dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
   fi

   insinto /etc/mplayer
   newins "${S}/etc/example.conf" mplayer.conf || die
   doins "${S}/etc/input.conf" || die
   if use osdmenu; then
      doins "${S}/etc/menu.conf" || die
   fi

   if use ass || use truetype;   then
      cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_
fontconfig=1
subfont-osd-scale=4
subfont-text-scale=3
_EOF_
   fi

   # bug 256203
   if use rar; then
      cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_
unrarexec=/usr/bin/unrar
_EOF_
   fi

   dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
   newbin "${S}/TOOLS/midentify.sh" midentify || die
}

pkg_preinst() {
   [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]] && \
      rm -rf "${ROOT}/usr/share/mplayer/Skin/default"
}

pkg_postrm() {
   # Cleanup stale symlinks
   [ -L "${ROOT}/usr/share/mplayer/font" -a \
         ! -e "${ROOT}/usr/share/mplayer/font" ] && \
      rm -f "${ROOT}/usr/share/mplayer/font"

   [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \
         ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ] && \
      rm -f "${ROOT}/usr/share/mplayer/subfont.ttf"
}
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3789
Location: sleeping in the bathtub

PostPosted: Sun Jun 13, 2010 2:00 pm    Post subject: Reply with quote

Are you sure you can use this with a HD3200 igp?

I was under the impression that "XvBA" or whatever they want to call it only worked on UVD2 capable hardware, which I believe requires a HD4000 series or greater card...
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
mikkoc
Apprentice
Apprentice


Joined: 24 May 2007
Posts: 231

PostPosted: Sun Jun 13, 2010 3:39 pm    Post subject: Reply with quote

I can watch 1080p just fine with the normal mplayer from portage: no skipping or anything, very smooth.
ATI Radeon HD 4200 and X4 955.
xf86-video-ati-9999
mesa-9999
xorg-server 1.8.1
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2664
Location: Slovenia

PostPosted: Sun Jun 13, 2010 7:12 pm    Post subject: Reply with quote

mikkoc wrote:
I can watch 1080p just fine with the normal mplayer from portage: no skipping or anything, very smooth.
ATI Radeon HD 4200 and X4 955.
xf86-video-ati-9999
mesa-9999
xorg-server 1.8.1
That's because your CPU is strong enough. Must be one hell of a CPU. The regular mplayer supports hardware video decoding only on Nvidia cards.


I wouldn't bother trying to get XvBA to work. Here's what the xvba-vaapi developer has to say:
Quote:
I don't see changes in XvBA going in the right direction to care more. As you probably noticed, there was no update to xvba-video for a long time because the driver still contains many bugs. I don't see what I can do more, it's a dead end. xvba-video is a pile of workarounds for driver bugs or mis-designs, thus they can break at any driver update. I won't care.
Back to top
View user's profile Send private message
PraetorZero
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 239
Location: /home

PostPosted: Mon Jun 14, 2010 12:13 am    Post subject: Reply with quote

I'm curious what may be wrong with your setup. I'm running an Athlon 5050e on a J&W Minix 780g (HD 3200 IGP) and can playback 1080p Bluray rips without a problem. This includes re-encoded MKV and my sole raw rip of Iron Man. Granted, Iron Man seems to push it but it plays back without any issues IIRC.
_________________
What's the worst that can happen?
Back to top
View user's profile Send private message
maquiz
n00b
n00b


Joined: 13 May 2003
Posts: 24

PostPosted: Mon Jun 14, 2010 5:17 pm    Post subject: Reply with quote

Hopeless wrote:
Are you sure you can use this with a HD3200 igp?

I was under the impression that "XvBA" or whatever they want to call it only worked on UVD2 capable hardware, which I believe requires a HD4000 series or greater card...


UVD2 indeed only works on HD4000 or greater (i have a 785G Motherboard)
Back to top
View user's profile Send private message
ashdash
n00b
n00b


Joined: 27 Oct 2008
Posts: 17
Location: Auckland, New Zealand

PostPosted: Mon Jun 14, 2010 9:21 pm    Post subject: Reply with quote

maquiz wrote:
Hopeless wrote:
Are you sure you can use this with a HD3200 igp?

I was under the impression that "XvBA" or whatever they want to call it only worked on UVD2 capable hardware, which I believe requires a HD4000 series or greater card...


UVD2 indeed only works on HD4000 or greater (i have a 785G Motherboard)


I had found this info http://en.wikipedia.org/wiki/Unified_Video_Decoder that lists the HD3200 supporting UVD2 Lite (whatever that is). And that led to http://www.phoronix.com/forums/showpost.php?p=105648&postcount=9.

So I don't really know what all that means. Am I wasting my time? I guess I should just try it and see what happens but at the moment I am getting some 'undefined references' when I use the ebuild above.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2664
Location: Slovenia

PostPosted: Mon Jun 14, 2010 10:40 pm    Post subject: Reply with quote

This page: http://www.splitted-desktop.com/~gbeauchesne/xvba-video/ does list HD3200 as supported, but you'll need a specific version of the driver and possibly a specific version of X too. And even then it might not work. As I quoted above, the developer doesn't care anymore, because XvBA is nothing but one big mess. If you want hardware video decoding in Linux, Nvidia is king.
Back to top
View user's profile Send private message
ashdash
n00b
n00b


Joined: 27 Oct 2008
Posts: 17
Location: Auckland, New Zealand

PostPosted: Mon Jun 14, 2010 11:06 pm    Post subject: Reply with quote

PraetorZero wrote:
I'm curious what may be wrong with your setup. I'm running an Athlon 5050e on a J&W Minix 780g (HD 3200 IGP) and can playback 1080p Bluray rips without a problem. This includes re-encoded MKV and my sole raw rip of Iron Man. Granted, Iron Man seems to push it but it plays back without any issues IIRC.


Maybe I'm on the wrong track. Below are the mplayer ouputs of 3 different files and the cpu utilisation. Any comments? Maybe the real problem is recording broadcast tv.

1.
Plays perfectly. Maybe the odd stutter? Averaging about 50% per core.

mplayer -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa "/mnt/media/video/Star Trek/Star.Trek.2009.BluRay.1080p.x264.DTS-WiKi.mkv"MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/video/Star Trek/Star.Trek.2009.BluRay.1080p.x264.DTS-WiKi.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_DTS), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [avc1] 1920x800 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
hwac3: switched to DTS, 1536000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [hwdts] afm: hwac3 (DTS through S/PDIF)
==========================================================================
AO: [alsa] 48000Hz 2ch ac3le (2 bytes per sample)
Starting playback...
Movie-Aspect is 2.40:1 - prescaling to correct movie aspect.
VO: [xv] 1920x800 => 1920x800 Planar YV12
A: 66.2 V: 66.2 A-V: 0.000 ct: -0.001 0/ 0 4% 4% 0.4% 6 0

MPlayer interrupted by signal 2 in module: key_events
A: 66.2 V: 66.2 A-V: 0.002 ct: -0.000 0/ 0 4% 4% 0.4% 6 0
Exiting... (Quit)

2.
Over 90% per core. Some stutters.

mplayer -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa /mnt/media/killa.sampla.x264.mkv
MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/killa.sampla.x264.mkv.
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [avc1] 1920x1080 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
hwac3: switched to AC3, 448000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3be, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
[AO_ALSA] Format ac3be is not supported by hardware, trying default.
AO: [alsa] 48000Hz 2ch ac3le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
A: 8.4 V: 7.9 A-V: 0.457 ct: -0.083 0/ 0 96% 6% 3.5% 66 0

************************************************
**** Your system is too SLOW to play this! ****
************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
- Try -ao sdl or use the OSS emulation of ALSA.
- Experiment with different values for -autosync, 30 is a good start.
- Slow video output
- Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
- Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
- Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
- Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
- Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.

A: 22.9 V: 22.9 A-V: 0.065 ct: 0.038 0/ 0 91% 6% 3.7% 381 0

Exiting... (End of file)

3.
Recorded broadcast tv by mythtv. Like watching slow motion. Sound out of sync. About 50% per core.

mplayer -ac hwac3 -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa /mnt/media/tv/1003_20090726110900.mpg
MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/tv/1003_20090726110900.mpg.
TS file format detected.
VIDEO H264(pid=450) AUDIO A52(pid=410) NO SUBS (yet)! PROGRAM N. 1
FPS seems to be: 25.000000
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
hwac3: switched to AC3, 384000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3be, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
==========================================================================
[AO_ALSA] Format ac3be is not supported by hardware, trying default.
AO: [alsa] 48000Hz 2ch ac3le (2 bytes per sample)
Starting playback...
[h264 @ 0xa3f080]left block unavailable for requested intra mode at 0 22
[h264 @ 0xa3f080]error while decoding MB 0 22, bytestream (98022)
[h264 @ 0xa3f080]mmco: unref short failure
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12
[h264 @ 0xa3f080]mmco: unref short failure 3/ 3 ??% ??% ??,?% 0 0
[h264 @ 0xa3f080]mmco: unref short failure 9/ 9 ??% ??% ??,?% 5 0
A:74692.8 V:74668.5 A-V: 24.322 ct: 5.974 1542/1542 1% 3% 0.8% 6 0
Too many video packets in the buffer: (1259 in 33598645 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
A:74692.9 V:74668.5 A-V: 24.342 ct: 5.978 1543/1543 1% 3% 0.8% 6 0
Too many video packets in the buffer: (1258 in 33585058 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
A:74693.0 V:74668.6 A-V: 24.362 ct: 5.990 1546/1546 1% 3% 0.8% 6 0
Too many video packets in the buffer: (1260 in 33557978 bytes).
etc
etc
Back to top
View user's profile Send private message
PraetorZero
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 239
Location: /home

PostPosted: Wed Jun 16, 2010 1:00 am    Post subject: Reply with quote

ashdash wrote:
PraetorZero wrote:
I'm curious what may be wrong with your setup. I'm running an Athlon 5050e on a J&W Minix 780g (HD 3200 IGP) and can playback 1080p Bluray rips without a problem. This includes re-encoded MKV and my sole raw rip of Iron Man. Granted, Iron Man seems to push it but it plays back without any issues IIRC.


Maybe I'm on the wrong track. Below are the mplayer ouputs of 3 different files and the cpu utilisation. Any comments? Maybe the real problem is recording broadcast tv.

1.
Plays perfectly. Maybe the odd stutter? Averaging about 50% per core.

mplayer -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa "/mnt/media/video/Star Trek/Star.Trek.2009.BluRay.1080p.x264.DTS-WiKi.mkv"MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/video/Star Trek/Star.Trek.2009.BluRay.1080p.x264.DTS-WiKi.mkv.
<snip>
2.
Over 90% per core. Some stutters.

mplayer -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa /mnt/media/killa.sampla.x264.mkv
MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/killa.sampla.x264.mkv.
<snip>
3.
Recorded broadcast tv by mythtv. Like watching slow motion. Sound out of sync. About 50% per core.

mplayer -ac hwac3 -afm hwac3 -lavdopts threads=2 -vo xv -ao alsa /mnt/media/tv/1003_20090726110900.mpg
MPlayer SVN-r31288-4.3.2 (C) 2000-2010 MPlayer Team

Playing /mnt/media/tv/1003_20090726110900.mpg.

<snip>


I definitely don't have any issues with any HD captures from Myth sourcing from 1080i firewire or OTA HD Homerun. I'll try the killa sample when I get home and see if that does anything for me. As for Star Trek, zero problems for me, but on this particular CPU, I have it connected to the TV sans surround sound. Just for giggles, can you eliminate the audio track options and see what happens?

Are you doing anything funky with your .asoundrc that could be introducing an additional layer of processing?

Can you post emerge --info; emerge -pv mplayer? Are you running cpufreq on the processor and throttling your speed?

Previously, my same setup was using an Athlon X2 2400-BE and I don't remember too many issues with that with more recent builds. The only problem I had was an episode of BBC Earth, the oceans episode. The fish swimming around during some of the scenes caused it to stutter on that chip. Newer builds of mplayer haven't had that problem.
_________________
What's the worst that can happen?
Back to top
View user's profile Send private message
PraetorZero
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 239
Location: /home

PostPosted: Wed Jun 16, 2010 1:25 pm    Post subject: Reply with quote

Ashdash, the killa.sample.x264.mkv sample stutters on my cpu when using a single core. Using -lavdopts threads=2, I don't have any issues. I should note that I'm running this frontend at 1920x1080 and playing back fullscreen.

Given my cpu is only a single step up from yours with only a slight increase in speed, I honestly think you should be able to play this back without problems.

In addition to my previous requests for information, can you give us the results of
grep -vh '^[[:space:]]*\(#\|$\)' /etc/mplayer/mplayer.conf (and $USER/.mplayer/mplayer.conf)
_________________
What's the worst that can happen?
Back to top
View user's profile Send private message
ashdash
n00b
n00b


Joined: 27 Oct 2008
Posts: 17
Location: Auckland, New Zealand

PostPosted: Thu Jun 17, 2010 11:04 am    Post subject: Reply with quote

PraetorZero wrote:
Ashdash, the killa.sample.x264.mkv sample stutters on my cpu when using a single core. Using -lavdopts threads=2, I don't have any issues. I should note that I'm running this frontend at 1920x1080 and playing back fullscreen.

Given my cpu is only a single step up from yours with only a slight increase in speed, I honestly think you should be able to play this back without problems.

In addition to my previous requests for information, can you give us the results of
grep -vh '^[[:space:]]*\(#\|$\)' /etc/mplayer/mplayer.conf (and $USER/.mplayer/mplayer.conf)


emerge --info mplayer
Portage 2.2_rc67 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.33-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4850e-with-gentoo-2.1.6
Timestamp of tree: Wed, 16 Jun 2010 12:00:19 +0000
app-shells/bash: 3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.9-r1
dev-lang/python: 2.5.2-r8, 2.6.4-r1
dev-util/cmake: 2.6.3
sys-apps/baselayout: 2.1.6
sys-apps/openrc: 0.4.2
sys-apps/sandbox: 2.2
sys-devel/autoconf: 2.13, 2.64
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11.1
sys-devel/binutils: 2.20.1
sys-devel/gcc: 4.3.2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 2.2.6b
virtual/os-headers: 2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en en_GB en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/multimedia /var/lib/layman/x11 /usr/local/portage"
SYNC="rsync://gateway/gentoo-portage"
USE="3dnow X a52 aac acl acpi alac alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread eds emboss encode esd evo exif fam firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 jpeg kde kipi lame lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis wavpack x264 xcb xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="imon imonlcd" LINGUAS="en en_GB en_US" LIRC_DEVICES="imon imon_knob imon_lcd imon_pad imon_pad2keys" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
Package Settings
=================================================================

media-video/mplayer-1.0_rc4_p20100530 was built with the following:
USE="3dnow 3dnowext X a52 alsa ass cddb cdio cdparanoia dga dirac directfb dts dv dvd dvdnav enca encode esd faac faad ffmpeg-mt gif iconv ipv6 jpeg live mad mmx mmxext mng mp3 (multilib) network opengl osdmenu png quicktime rar real rtc schroedinger sdl shm speex sse sse2 ssse3 theora toolame tremor truetype twolame unicode vorbis x264 xscreensaver xv xvid xvmc -aalib (-altivec) -amr -bidi -bindist -bl -bs2b -cpudetection -custom-cpuopts -debug -doc -dvb -dxr3 -fbcon -ftp -ggi -gmplayer -jack -joystick -jpeg2k -ladspa -libcaca -lirc -lzo -md5sum -nas -nut -openal -oss -pnm -pulseaudio -pvr -radio -samba (-svga) -tga -v4l -v4l2 -vaapi -vdpau (-vidix) (-win32codecs) -xanim -xinerama -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa"


grep -vh '^[[:space:]]*\(#\|$\)' /etc/mplayer/mplayer.conf
[protocol.dvdnav]
fontconfig=1
subfont-osd-scale=4
subfont-text-scale=3
unrarexec=/usr/bin/unrar

There are no $USER/.mplayer/mplayer.conf

Not running cpufreq.

Thanks for the help!
Back to top
View user's profile Send private message
PraetorZero
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 239
Location: /home

PostPosted: Fri Jun 25, 2010 12:03 pm    Post subject: Reply with quote

I'm a bit at a loss, looking at your config nothing really stands out other than your ssse3 USE flag. AMD chips don't have SSSE3. But, I don't believe that would slow anything down.

Try playing your Myth recording with vo=xv or add that to your mplayer.conf. While you're at it, take a look at eselect xvmc list.

Can you run the same grep -vh '^[[:space:]]*\(#\|$\)' on /etc/X11/xorg.conf ? Specifically the module and device section.

Here's mine:
Code:

Section "Module"
        Load  "dbe"
        Load  "record"
        Disable  "xtrap"
        Load  "glx"
        Load  "extmod"
        Load  "dri"
EndSection
Section "Device"
        Option     "AccelMethod" "exa"          # <str>
        Option     "DRI"  "on"                  # [<bool>]
        Option     "DRI"  "true"
        Option      "VideoOverlay" "on"         # http://ubuntuforums.org/showthread.php?t=741408
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "Radeon HD 3200 Graphics"
        BusID       "PCI:1:5:0"
        VideoRam    129984
EndSection

_________________
What's the worst that can happen?
Back to top
View user's profile Send private message
fanthom
n00b
n00b


Joined: 31 May 2007
Posts: 60

PostPosted: Fri Jul 02, 2010 10:12 am    Post subject: Reply with quote

Hi all,
seems that you don't need UVD2 hardware to play 1080p movies with mplayer-vaapi :)
i have used:
1) Catalyst 10.6, xorg-server-1.8.1-r1 and xvba-video from gentoo quebec overlay:
https://gentoo-quebec.org/svn/gentoo-quebec/trunk/overlay/
2) libva from official portage tree
3) mplayer-vaapi ebuild provided by maquiz in this thread - ofc vaapi flag must be enabled.

i'm getting 1-8% cpu usage on my old HD 2600XT when playing 1080p movie :)
btw: it is reported that my card will work with xvba-video on official site:
http://www.splitted-desktop.com/~gbeauchesne/xvba-video/

command syntax:
Code:
mplayer -vo vaapi -va vaapi /path_to/movie

There's one condition: you need to play those movies as root, otherwise driver wont be initialized - have no idea why.
EDIT: Second condition - composite effects must be disabled.

Thanks a lot guys!!

fanthom
Back to top
View user's profile Send private message
DestroyFX
n00b
n00b


Joined: 05 Dec 2005
Posts: 38

PostPosted: Wed Jul 21, 2010 6:03 am    Post subject: Reply with quote

I have made some cleaning in the gentoo-quebec overlay!

I have added the last version of libva and xvba-video inside.
I have added a version of ffmpeg required for vaapi on VLC.
I have added a working version of VLC in the overlay too.

What I have tested :

- VC1 playback on VLC : OK
- H264 playback on VLC : OK (finally!!)

It's far more better than the old version (no more color bugs)

If you want to test, add or sync gentoo-quebec overlay and emerge :

- ffmpeg (from the overlay, with vaapi use)
- Your patched mplayer with vaapi use OR VLC from overlay with vaapi use.

What I will add :

- Latest VLC
- Latest Mplayer -MT with vaapi support
- Latest FFMPEG

NOTE : I made all tests in user. no root involved except for emerging stuff.
NOTE : you can use vainfo to confirm xvba and vaapi are OK.
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Sun Aug 22, 2010 6:18 am    Post subject: Reply with quote

Please explain me guys which mplayer ebuild should I use to have vaapi support on intel . It seems that there is a number of ebuild versions floating around and every overlay and forum thread has its own ;)

mulltimedia overlay has version 2010.08 but no flag for vaapi

gentoo-quebec has vaapi suport but has 2009.11 version which might not have all the new shiny features to get intel support

mplaer-mt seems to be the one, but does it have vaapi support


PS Waiting for DestroyFX to provide - Latest Mplayer -MT with vaapi support once and for all stop it all from confusing me ;)
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
pactoo
Guru
Guru


Joined: 18 Jul 2004
Posts: 553

PostPosted: Sun Sep 19, 2010 10:58 am    Post subject: Reply with quote

@ryszardzonk

Have come a bit further? And recent overlay for mplayer vaapi-intel? I am having the same problem currently. Tried the ebuild above which fails to digest due to some ffmpeg patch missing. ffmpeg itself has been build with vaapi support.

And is there a way how to figure wether f.e. ffplay uses vaapi? So can it de disabled to compare cpu load?
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Fri Jan 07, 2011 7:58 pm    Post subject: Reply with quote

I got a bit of time to look at the patches and I must say they do work like a charm. For my 720p files my i3 @ 2.93GHz processor use went down from 50-60% to 12-15%. Very impressive!

Ebuild includes Vaapi, 95% of MT, CoreAVC, Stereoscopic
http://bigvo.dyndns.org/vaapi/mplayer-vaapi-2010_01_10.tar.bz2

MPlayer VAAPI patches
http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/

MPlayer MT patches
http://foss.math.aegean.gr/~realnc/mplayer/

CoreAVC Patches
http://code.google.com/p/coreavc-for-linux/

Stereoscopic Patches
http://www.mygnu.de/index.php/2010/01/stereoscopic-mplayer-working-again/

EDIT 2010.01.09 : I have succefully ported most of the mt patches. Patches for two more files still need work...

EDIT 2010.01.10: Ebuild now included two more features. One is CoreAVC for slower machines without GPU acceleration and second stereoscopic for playing 3D movies

ac3enc.c patches for last MT file that have not been ported as of yet 8)
http://bigvo.dyndns.org/vaapi/fixing.tar.bz2
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Fri Jan 14, 2011 8:33 am    Post subject: Reply with quote

I just chcecked my server logs for interest in the mplayer-vaapi and discovered that there has been just about 100 download tries, but file and directory have been unreachable because of permision problem yet noone reported that information back to me...

anyways that problem should have been fixed now. In the mean time there is latest ffmpeg snapshot to test


Ebuild includes some vaapi patches and same mt I was able to add to mplayer
http://bigvo.dyndns.org/vaapi/ffmpeg-vaapi-2010_01_13.tar.bz2
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
pigeon768
l33t
l33t


Joined: 02 Jan 2006
Posts: 675

PostPosted: Mon Jan 17, 2011 8:16 pm    Post subject: Reply with quote

fanthom wrote:
There's one condition: you need to play those movies as root, otherwise driver wont be initialized - have no idea why.
You may have to add yourself to the 'video' group.
Back to top
View user's profile Send private message
joeklow
n00b
n00b


Joined: 23 Jan 2011
Posts: 46

PostPosted: Sun Feb 27, 2011 6:01 pm    Post subject: Reply with quote

Code:

>>> Downloading 'http://bigvo.dyndns.org/mplayer-1.0_rc4_p20110109.tar.bz2'
--2011-02-27 19:53:22--  http://bigvo.dyndns.org/mplayer-1.0_rc4_p20110109.tar.bz2
...
2011-02-27 19:53:23 ERROR 404: Not Found.
Back to top
View user's profile Send private message
z0ny
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2005
Posts: 102
Location: Germany

PostPosted: Fri Mar 09, 2012 12:47 pm    Post subject: Reply with quote

It's still not available. Is there any other mplayer ebuild available that supports vaapi?
_________________
Old C programmers never die. They're just cast into void.
Back to top
View user's profile Send private message
ryszardzonk
Apprentice
Apprentice


Joined: 18 Dec 2003
Posts: 225
Location: Rzeszów, POLAND

PostPosted: Sat Mar 10, 2012 12:21 pm    Post subject: Reply with quote

my friend you are looking at somehwhat outdated thread

please take a look here

https://forums.gentoo.org/viewtopic-t-903718-start-0.html
_________________
Sky is not the limit...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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