Desktop video in gentoo
How to get the most from desktop video apps in gentoo linux.
When I started using gentoo, emerging mplayer or xine had just about all needed functionality enabled by default. However gentoo's philosophy is to build a bare minimum and allow the installer to add functionality through use flags. On recent installs If I want to watch a dvd or .wmv or quicktime file in mplayer or xine I had to enable certain use flags when emerging mplayer or xine-lib. Discovering which use flags are needed and which are not is a matter of trial and error and personal taste. The following is an explanation of what works for me.
The Solution
You can add the desired use flag to /etc/make.conf to be used
system
wide or you can add it to /etc/portage/package.use on a specific
program such as mplayer. Adding too many use flags to make.conf will
cause problems eventually as I find it tends to break packages. If you
run the command emerge -pv you can tell what use flags will
be
used in emerging the program. The following are the defaults for
mplayer and xine-lib without setting any additional use flags.
emerge -pv
mplayer [ebuild
R ] media-video/mplayer-1.0.20060217 -3dfx -3dnow* -3dnowext +X -aac*
-aalib +alsa (-altivec) +arts -bidi -bindist -bl -cdparanoia
-cpudetection -custom-cflags -debug -dga -directfb -doc -dts -dv -dvb
-dvd* -dvdread -edl +encode +esd -fbcon -ggi +gif +gtk -i8x0 +ipv6
-jack -joystick +jpeg -libcaca -lirc -live -livecd -lzo +mad -matroska
-matrox -mmx* -mmxext -musepack -nas +nls -nvidia* +opengl +oss +png
-real -rtc -samba +sdl -sse* -sse2* -svga -tga -theora +truetype -v4l
-v4l2 +vorbis -win32codecs* -xanim -xinerama* +xmms +xv +xvid -xvmc
emerge -pv
xine-lib [ebuild
R ] media-libs/xine-lib-1.1.1-r3 +X -a52 -aac* -aalib +alsa (-altivec)
+arts -asf* -cle266 -debug -directfb -dts -dvd* -dxr3 +esd -fbcon
+ffmpeg +flac +gnome -i8x0 +imagemagick +ipv6 -libcaca +mad +mng +nls
-nvidia* +opengl +oss -samba +sdl -speex -theora* -v4l* -vcd -vidix
+vorbis -win32codecs* -xinerama* +xv -xvmc
Flags that will not be used are preceded with a -. Flags that
will
be used are preceded with a +. In addition the output is color coded
unused flags are in blue used flags are in red. Flags to be used but
not used before are in green. As you can see above their are many flags
not used by default. Here is a list of what flags to add and a short
description of them.
3dnow and
3dnowext - support for 3dnow multimedia cpu instructions.
most modern cpu's support this.
aac -
Enables support for MPEG-4 AAC Audio without this quicktime movies will
have no sound.
asf
- Without this xine will not play .wmv video. dv - Adds support for
many digital camcorders.
dvd
- add to enable playing of dvd's
dvdread
- add if you want to use libdvdread for dvd playback.
mmx and mmxext -
add support for pentium mmx or athlon class processors. Should make
playback more robust.
real
- add support for realplayer files.
speex
- adds support for the speex audio codec. not sure this is needed but i
added it to be safe.
sse and sse2
- faster floating point optimization for PentiumIII+ class chips seemed
like a good idea to me.
theora -
support for ogg theora files.
v4l, v4l2, dvb
- add these if you have a tv tuner card.
vcd -
play video cd's
win32codecs
- add support for many different popular codecs. This one is a must.
To add these use flags you will need to edit /etc/portage/package.use .
Here is what I have for these 2 programs.
media-libs/xine-lib win32codecs ffmpeg theora v4l aac asf vcd
media-video/mplayer win32codecs xvid faad aac dvdread vcd dvb
I also have these use flags set system wide. (make.conf) USE="qt kde
hal dvd alsa cdr truetype nptlonly nvidia usb gimpprint xinerama sse
sse2 mmx 3dnow nsplugin" I didn't use the real flag as I use the real
player instead. Once you have these 2 video engines setup you will have
support for desktop video in about any program such as Kaffeine or
Totem as most use either xine or mplayer as a backend.
