Vlc

Introduction
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.

Prerequisite
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 for :

or with :

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

Installation
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 (or whichever architecture you're using, eg. ppc) mask for vlc.

To do this we run:

Or with :

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 for :

or with :

VLC recommended flags
If you would like to know what the folks who built VLC player recommend for installing VLC visit the VLC media player for Gentoo Linux page.

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

In the followinig paragraphs you'll find an incomplete list of available flags.

Audio and video codecs flags

 * Enables libdts (DTS Coherent Acoustics decoder) support
 * enables Live.com streaming media support
 * adds support for playback of Matroska-container audio/video files (.avi files)
 * to play Ogg Theora video files
 * Adds support for the Ogg Vorbis audio codec
 * installs the binary codecs

Audio and video output flags

 * adding this USE flag *should* add support for MP4/AAC audio (typically the audio stream used in H.264-encoded movies). By default, it will be ignored even if included as a USE flag. The solution is to first build ffmpeg with the aac flag (simply add it to if you like), and then build VLC with mpeg.
 * adds support for ASCII output (see libcaca for color)
 * adds support for ALSA (Advanced Linux Sound Architecture) audio output/recording
 * adds support for audio output through aRts
 * adds support for audio output through EsounD
 * adds framebuffer output option for video
 * adds support for the LibGGI graphics card drivers
 * adds support for ASS/SSA subtitle rendering
 * adds support for color ASCII output (see aalib for non-color ASCII)
 * lets you use OpenGL for video output
 * adds OSS audio output/recording support
 * snapshot support(?)
 * adds SDL (Simple Direct Layer) as an audio and/or video output wrapper
 * Adds support for the speex audio codec
 * adds framebuffer support through SVGAlib
 * adds support for dual-screen output
 * direct video output format
 * adding this USE flag adds support for H.264 MPEG4 which can be used to view encoded movies suitable for Playstation 3

Hardware support flags

 * Adds support for 3dfx video cards
 * will let you play DVDs
 * enables joystick support
 * uses LIRC library for remote controls
 * to watch/record TV (see also dvb)

Interface flags

 * a command-line interface
 * adds support for GUI skins
 * will also install a VLC gui (using WxGTK)
 * Sends display using the X On Screen Display library
 * adds support for lirc
 * Web frontend
 * Telnet interface to vlm
 * TCP, socket, and pipe based interface to vlc and vlm

Optional features flags

 * adds support for FriBiDi libraries
 * adds support for IPv6
 * enables Samba input support
 * enables Lua scripting support (used to get Youtube or other video streams from an URL)
 * enables support for id3 tags in mp3s as well as reading embedded information in other audio formats. This useflag is required to enable scrobbling to last.fm (vlc 2.x).

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

To do this, we run:

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:

HTTP interface
This requires the httpd, lua, vlm and taglib (?) use flags. Run vlc with

and access the HTTP interface at localhost:8080.

LIRC
See VLC/LIRC

Matroska
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
General structure:

Input selection examples:

TV specific input modifiers:

Encoding selection examples:

Output selection examples:

{{Command| # multicast and local display duplicate{dst=display,dst=std{access=udp,mux=ts,url=239.255.12.13} }}

More command line arguments:

Server Examples
VLC as a programmable personal media server:

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

Press to stop the tail and get back to the command prompt, vlc continues in the background.

Use to verify and  or  to kill.

VLC as a programmable personal media server:

Listens for content on UDP port 1234 (Press to stop the tail).

Play your media remotely a la AirTunes to the preceding server:

VLC shows no video for divx/xvid
Check your version of ffmpeg. If it's (or "-r1") try to add the following:

and then re-emerge ffmpeg and vlc.

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

TODO
What still needs to be done:


 * Add some more detailed information about VLC
 * Show some more and better examples of VLC usage
 * Complete the playing and stream serving information
 * Troubleshooting tips are always nice
 * Add some tips about dvb usage
 * Subtitle support (?)