Gentoo Wiki




VLC (initially VideoLAN Client) is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network.

This HOWTO will help you get the VideoLAN client (VLC) running on your system.


If you wish to have a nice GUI interface for which to control VLC, then we need to take care of a dependency, first. If you do not want a GUI interface, then you can skip this step and go straight to installation -- but you must remove the "X" use flag.

Add this to package.use for x11-libs/wxGTK.

echo "x11-libs/wxGTK unicode X" >> /etc/portage/package.use

or with flagedit:

flagedit x11-libs/wxGTK +unicode +X

Then we must re-emerge wxGTK with our new use flag:

emerge -av x11-libs/wxGTK


The first thing we want to do is setup our keywords and use settings for vlc. The first thing we'll do is enable the ~x86 (or whichever architecture you're using, eg. ppc) mask for vlc.

To do this we run:

echo "media-video/vlc ~x86" >> /etc/portage/package.keywords

Or with flagedit:

flagedit media-video/vlc  -- +~x86

This will enable us to use the most up to date (and possibly experimental) version of vlc.

USE flags

The next thing we'll want to do is set up our USE flags for vlc. This is the most important part of setting up our system to use vlc. If we skimp on the USE flags we set, we won't have a vlc capable of playing many file formats.

Pick the USE flags you want, and then add them to package.use for media-video/vlc.

echo "media-video/vlc X a52 alsa dts dvd ffmpeg mp3 mpeg win32codecs ncurses opengl sdl skins truetype wxwindows xv" >> /etc/portage/package.use

or with flagedit:

flagedit media-video/vlc +X +a52 +alsa +dts +dvd +ffmpeg +mp3 +mpeg +win32codecs +ncurses +opengl +sdl +skins +truetype +wxwindows +xv

VLC recommended flags

If you would like to know what the folks who built VLC player recommend for installing VLC visit this link:

To be able to emerge with the flags from the link above, wxGTK has to be compiled with the unicode and X USE flags.

echo "x11-libs/wxGTK unicode X" >> /etc/portage/package.use

Here is an incomplete list of available flags:

Audio and video codecs

Audio and video output

Hardware support


Optional features


The last step in installing vlc is the actual emerge of the software itself.

To do this, we run:

File: Command
emerge -av vlc

The -av command line option will give us the option to review our settings and optionally cancel the install.

Using VLC

Now you can run vlc from the command line like:

File: Command
vlc mediafile.ext


see LIRC


VLC also has the best support of all the media players for Matroska. Matroska is an open-source multimedia container format (similar, but far superior, to AVI) which can store things like DVD menus and chapters.

If you create a Matroska file with chapters, then you can program your remote to skip ahead and forward with the keys above.

Command Line Examples

Code: General structure
vlc -vvv --color <Input Selection> \
         --sout '#<Encoding selection>:<Output selection>'
Code: Input selection examples
Code: TV specific input modifiers
channel=1 // composite, depends on your hardware
audio=1 // stereo
Code: Encoding selection examples
transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256, \
Code: Output selection examples
# UDP multicast, connect with 'vlc udp://@'

# multicast and local display

# record stream and view locally
std{access=http,mux=ts,url=} }
Code: More command line arguments
--ttl 12 // useful for multicasts

Server Examples

Code: VLC as a programmable personal media server
#Use http://yourhost:8080 to access
nohup vlc -I http & tail -f nohup.out

Start it in your media directory and you can add those files to the playlist
through the web interface.

Press <ctrl-c> to stop the tail and get back to the command prompt, vlc continues in the background.

Use pgrep -fl vlc to verify and pkill vlc or killall vlc to kill

Code: VLC as a programmable personal media server
# separate vlc media display server instance
# reachable at http://yourhost:8081
nohup vlc -I http --http-host :8081 --loop udp: & tail -f nohup.out

# To see the video. Run in foreground.
vlc --loop udp:

Listens for content on UDP port 1234.

Press <ctrl-c> to stop the tail

Code: play your media remotely a la AirTunes to the preceding server
vlc <input> --sout '#std{access=http,mux=ts,url=yourhost:1234}' 


  • Some stuff like selecting a TV norm or a composite input seems to work only from the command line.
  • On Gentoo, install the ffmpeg package. It contains a lot of media support. Maybe it's best to add 'ffmpeg' to the USE variable in /etc/make.conf.
  • With latest ffmpeg the problem occured that no codec is found. Workaround is to emerge an older version of ffmpeg (adding >media-video/ffmpeg-0.4.9_p20070330 to /etc/portage/package.mask should do the trick).
  • To get a reasonable media format support for VLC under Gentoo, you may need to adjust your /etc/portage data. My current USE setup for the VLC package is:
Code: /etc/portage/package.use
media-video/vlc stream screen httpd vlm cdda cdio cddb freetype \ dts mod ogg vorbis theora xv x11 ffmpeg mad aac a52 \ dts mpeg live ssl bidi flac matroska

See Also


VLC shows no video for divx/xvid

Check your version of ffmpeg. If it's media-video/ffmpeg-0.4.9_p20070616 (or "-r1") try to add the following

File: /etc/portage/package.mask

and then re-emerge ffmpeg and vlc.

If previous version of ffmpeg is missing in portage, try to run:

emerge -C ffmpeg
emerge -uDNav ffmpeg
emerge -uDNav vlc


What still needs to be done:

Retrieved from ""

Last modified: Tue, 19 Aug 2008 22:03:00 +0000 Hits: 5,602