Sunteți pe pagina 1din 184

Prerequisites

To use VLC you need:


A computer with Internet access and an internet (web) browser (to download VLC). What is a web browser? Media (audio or video) files or Disc (optical drive required to play discs). Audio output hardware (speakers, headphones) for audio playback. Knowledge about working with computer files and folders. Working with files and folders (MSFT Windows) How to open documents and folders (Mac OS X) Files, folders & search (Ubuntu)

The main interface


Interface overview
The following picture shows the names of the main controls in the VLC interface:

Note: This picture corresponds to the Windows XP version. In other systems, VLC might look slightly different.

Menu bar

The menu bar at the top contains commands that control VLC.

Track slider

The track slider is on top of the control buttons. It shows the progress of playing of the media file. You can drag the track slider left to rewind or right to forward the track being played. Two timers at the left and righ ends of the track slider show the current playing position (left) and the total time (right) of the current track. Note: When a media file is streamed (live), the position indicator of the track slider does not move because the total duration of the streaming is not known until it finishes.

Control buttons

The buttons below the slider control the playback. From left to right they are:

Play/Pause. Previous media in the playlist. Stop playback. Next media in the playlist. Toggle fullscreen (video only). Show extended settings: Audio effects, Video effects and Synchronization. Show playlist. Repeat: toggles between loop all, loop one, no loop (default). Random: Plays the files in the current playlist in a random order.

Volume control

The volume control is located in the bottom right corner of the window. The small speaker icon is a button that mutes ( ) or un-mutes ( ) the sound. The triangle to the right is a slider that shows the current playback volume. Clicking this slider modifies the volume. The playback volume is also displayed as a percentage number on top of this slider.

Windows notification area (system tray) icon


When you start VLC media player, the application appears on the screen and a small icon appears in the notification area (system tray). Clicking once this icon will hide VLC, and clicking it again will show it again. Hiding VLC does not close it, it continues to run in the background. Right clicking this icon brings up a menu with the following controls:

Hide/Show VLC media player. Play/Pause/Stop playback. Switch to Previous/Next track.

Speed control. Increase/Decrease volume. Mute. Open media. Quit.

Tutorials

Installing VLC o Windows o Mac OS X o Linux Basics of VLC o Windows starting VLC Double click the VLC icon on the desktop or from the start menu: select Programs, select VideoLAN and select VLC media player. Playing media files stored in the computer Queuing files You can queue files by selecting multiple files at a time. Playing media from your optical reader (CD, DVD, Blu-Ray) Closing VLC

o o

See also

VLC HowTo Documentation:Play HowTo Common Problems Hotkeys o QtHotkeys (Qt is the default graphical interface) o Hotkeys table o How to set global hotkeys

External Links

F.A.Q. Windows Help and How-to What is a web browser? Video tutorials (selected by Jan)

This is the user guide for the VLC media player.

VLC User Guide


Quick start guide: How to start with VLC. Installation: Installation instructions for several systems. History: Overview and history of the VideoLAN project.

Usage

Interface: Short introduction to the interface of the VLC Media Player. o OSX 1.2 Interface o Windows 7 1.2 Interface Open Media: How to play audio and video with VLC. Audio (e.g. visualization, selection of devices). Video (e.g. cropping, screen-/snapshots). Playback: Navigation through media files (e.g. chapters, bookmarks). Playlist: Creating and managing playlists. Subtitles. Video and Audio Filters. Snapshots: How to create snapshots and screenshots. Hotkeys. Troubleshooting: Solutions for some common problems.

Advanced Usage

Advanced Use: Advanced instruction on streams, filters, plug-ins and more. Using VLC inside a webpage: How to create webpages that use the VLC Web plugin. Uninstallation. VLC Use 0.8. (Versions older than 0.9).

Authors

Alexis de Lattre Johan Bilien Anil Daoud Clment Stenac Jean-Paul Saman Jean-Baptiste Kempf

Copyright (c) 2002-2009 the VideoLAN project

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Windows
95, 98, ME
You can run it under Windows 95, 98 or ME by using KernelEx.

2000, XP, Vista, 7, 8


Recommended The normal and recommended way to install VLC for Windows is via the installer package. Step 0: Download and launch installer Download the installer package from the VLC download page for Windows. Once that's done, double click on it to begin the install process. If you're using Windows Vista, 7 or 8 and have UAC enabled, you may be prompted to grant the programme administrator permissions. Clicking Yes will allow you to continue. Step 1: Select installer language Before you can continue, you have select the language that you want the installer to be displayed in. It is usually a good idea to select one that you can understand.

Step 2: Welcome screen Like millions of people before you, your love affair with VLC begins with an ominous warning about closing all other applications before installing it. You can just go ahead and click Next.

Step 3: Licence agreement You should thinking about read the Terms of Service prior to clicking Next. It talks about your rights and stuff... I think.

Step 4: Select components This menu provides you with the ability to customise your install. You choose all the components you wish to install and whether you want VLC to be your default media player or not. Once you are done, feel free to click Next.

Step 5: Pick a location You choose the installation folder with Browse... and when you are ready you click Install.

Step 5: Now installing Wait as VLC begins installing. It shouldn't take too long. You may click on the "Show details" if you must. Once clicked, however, there is no going back so choose wisely.

Step 7: Installation complete Once installation is completed, you may choose to run VLC, read a bunch of boring release notes, or do nothing at all. Nothing at all. Nothing at all.

Alternative If you want to be pro and perform an unattended (or silent) installation of VLC, you can do so via a command line interface. Just type in "filename" /L="languagecode" /S. For example, the English installation would look something like vlc-2.0.1-win32.exe /L=1033 /S. PowerShell Installing VLC using PowerShell is as easy as pie.

Command Prompt You can also do it using the command prompt... if that's your thing.

Mac OS X
1. Download the Mac OS X package from the VLC MacOS X download page. 2. Double-click on the icon of the package: an icon will appear on your Desktop, right beside your drives. 3. Open it and drag the VLC application from the resulting window to the place where you want to install it (it should be /Applications).

Linux

BeOS
1. Download the Zip file from the VLC BeOS download page. 2. Unzip the file in a directory to install VLC.

Debian

Debian stable (lenny) Add the following lines to your /etc/apt/sources.list:


deb http://download.videolan.org/pub/videolan/debian stable main deb-src http://download.videolan.org/pub/videolan/debian stable main

Then, for a normal install, write the following commands in Terminal:


# apt-get update # apt-get install vlc libdvdcss2

Debian testing (squeeze) You should not be using Debian testing unless you perfectly know what you are doing. It is almost impossible to support Debian testing and there are no plans to do it. For more information on Debian testing, please look at the Testing Page. Debian unstable (sid) Add the following lines to your /etc/apt/sources.list:
deb http://download.videolan.org/pub/videolan/debian sid main deb-src http://download.videolan.org/pub/videolan/debian sid main

Then, for a normal install, write the following commands in Terminal:


# apt-get update # apt-get install vlc libdvdcss2

Linux Mandrake
There are VLC packages for Mandrake 9.1 and Cooker. To install them, add the following sources for either Mandrake 9.1 or Cooker (you can use Easy urpmi for that): contrib from the core distribution and plf (Penguin Liberation Front) from the external addons. Then install the required packages with urpmi:
# urpmi libdvdcss2 libdvdplay0 wxvlc vlc-plugin-a52 vlc-plugin-ogg vlc-plugin-mad

Linux (EL5)
1. Download and install the latest rpmforge-release rpm (eg rpmforge-release-0.3.6-1.el5.rf.i386.rpm) 2. Either;
# yum install vlc

or (if you have epel-release installed);


# yum --disablerepo='epel' install vlc

Linux RedHat
Download the RPM package vlc and the packages listed in the required libraries and codecs section (the other packages are optional) from the VLC Red Hat download page and put them all into the same directory. Then install the RPM packages you have downloaded:
# rpm -U *.rpm

If you have not installed all the RPM packages included with your distribution, you may be asked to install a few of them first.

Ubuntu
Launch the Ubuntu Software Center and go to All Software Sound & Video then in search VLC Player. After it will come click on it and it will automatically install You need to check that a universe mirror is listed in your /etc/apt/sources.list file.
# sudo apt-get update # sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc

Compile the sources by yourself


For more detailed information on compiling VLC, please see Compile VLC.

Overview of the VideoLAN project


VideoLAN is a complete software solution for video streaming and playback, developed by students of the Ecole Centrale Paris and developers from all over the world, under the GNU General Public License (GPL). VideoLAN was originally designed to stream MPEG videos on high bandwidth networks, but VideoLAN's main software, VLC media player, has evolved to become a full-featured, cross-platform media player. More details about the project can be found on the VideoLAN Web site.

VLC Media Player


Originally called VideoLAN Client, VLC media player is VideoLAN's main software product. VLC works on many platforms: Linux, Windows, Mac OS X, BeOS, BSD, Solaris, Android, iOS, QNX and many more... It supports the following video and audio formats: MPEG-1, MPEG-2, MPEG-4/DivX, h264, webm, mkv, DVDs, VCDs, Audio CDs, wmv and wma. It can also play from external sources:

Satellite. Cable. Digital TV cards (DVB-S, DVB-T). Several types of network streams: UDP/RTP Unicast, UDP/RTP Multicast, HTTP, RTSP, MMS, etc. Acquisition or encoding cards. Webcams and other devices.

VLC can also be used as a streaming server. This feature is described in the Streaming HowTo. This guide describes all the playback (client) aspects of VLC media player.

General Interface Description


VLC has several interfaces:

A cross-platform interface for Windows and GNU/Linux, which is called Qt. A native Mac OS X interface. An interface that supports skins for both Windows and GNU/Linux.

The operation of VLC is essentially the same in all the interfaces.

Windows and GNU/Linux (Qt)


The screenshot below shows the default interface in VLC 2.0. More features can be displayed by selecting them in the View menu.

See also VLC Interface 2.0 on Windows 7

Mac OS X
This screenshot shows the default interface that VLC had on Mac OS X until version 1.1:

Since version 2.0 the interface has been redesigned. See OSX 2.0 interface.

Starting VLC Media Player in Windows

In Windows XP: Clic Start -> Programs -> VideoLAN -> VLC media player. In Windows 7: Clic Start -> All Programs -> VideoLAN -> VLC media player. VLC is shown on the screen and a small icon is shown in the system tray.

Stopping VLC Media Player


There are three ways to quit VLC:

Right click the VLC icon ( ) in the tray and select Quit (Alt-F4). Click the Close button in the main interface of the application. In the Media menu, select Quit (Ctrl-Q).

Notification Area Icon


Clicking this icon shows or hides the VLC interface. Hiding VLC does not exit the application. VLC keeps running in the background when it is hidden. Right clicking the icon in the notification area shows a menu with basic operations, such as opening, playing, stopping, or changing a media file.

Main Interface
The main interface has the following areas:

Menu bar. Track slider - The track slider is below the menu bar. It shows the playing progress of the media file. You can drag the track slider left to rewind or right to forward the track being played. When a video file is played, the video is shown between the menu bar and the track slider. Note: When a media file is streamed, the track slider does not move because VLC cannot know the total duration. Control Buttons - The buttons below the track slider cover all the basic playback features.

Click here to view an explanation of every menu item.

Opening media
See Documentation:Play HowTo/Basic Use 0.9/Opening modes

Streaming Media Files


Streaming is a method of delivering audio or video content across a network without the need to download the media file before it is played. You can view or listen to the content as it arrives. It has the advantage that you don't need to wait for large media files to finish downloading before playing them. VideoLan is designed to stream MPEG videos on high bandwidth networks. VLC can be used as a server to stream MPEG-1, MPEG-2 and MPEG-4 files, DVDs and live videos on the network in unicast or multicast. Unicast is a process where media files are sent to a single system through the network. Multicast is a process where media files are sent to multiple systems through the network. VLC is also used as a client to receive, decode and display MPEG streams. MPEG-1, MPEG-2 and MPEG-4 streams received from the network or an external device can be sent to one machine or a group of machines.

To stream a file:

1. Select Open Network Stream from the Media menu. The Open Media dialog box is displayed with the Network tab selected.

2. Type the network URL in the text box 3. Click Play. Note: When VLC plays a stream, the track slider shows the progress of the playback. For more information, refer to the VLC usage page

Converting and Saving a Media File Format


VLC can convert media files from one format to another. To convert a media file: Select Convert/Save from the 'Media' menu. The Open media dialog box is displayed. Click Add.... A file selection box is displayed. Select the file you want to convert and click Open. The Convert dialog box is displayed. Write the path and file name where you want to store the converted file in the Destination File text box. 5. Select a conversion profile. 6. Click Start. 1. 2. 3. 4.

Play a file
To play a file, open the Media menu, and select the Open File menu item.

An Open File dialog box will appear. Select the file you want to open and select Open.

VLC with then start playing the designated file. An alternative is to simply drag 'n' drop your file into the VLC main interface or the playlist window from the file explorer (Finder on Mac OS X).

Play a CD/DVD/VCD
To play a CD, VCD or a DVD, open the Media menu and select Open Disc menu item. In the Open Disk dialog box, select the type of media (DVD, SVCD/VCD or Audio CD).

You can either select the drive from which the media should be read from by selecting the drive letter from the Disc Device drop-down list or you can select the Browse button, from which you will be given a dialog box to browse to the media files. If you want to start the DVD or VCD playback from a given title and chapter instead of from the beginning, you can set it using the Title and Chapter selectors. You can also set the Audio and Subtitles track using the selectors. There is also an option for No DVD menus, when reading a DVD. To start playback select the Ok button.

Play a network stream (WebRadio, WebTV, etc.)


To open a network stream, open the Media menu and select the Open Network Stream menu item.

A dialog box will then open with three user input boxes. The first one is for the user to select the Protocol of the stream which they wish to open (HTTP/HTTPS/MMS/FTP/RTSP/RTP/UDP/RDMP). The second box is for the user to input the Address of the stream and the third one is for the user to select the appropriate port. However in the latest version of VLC (1.1.5), the user only needs to input the Address (examples are shown in image above). To start playback by selecting the Play button. If you get some stuttering during playback, you can try to increase the size of the read buffer. This can be done in the Open Network Stream dialog box, by firstly checking the Show more options check box then adjusting the Caching selector, which allows you to choose the amount of time (in milliseconds) VLC should store data in its buffer before starting playback.

Play from an acquisition card


To play from an acquisition open the File menu, and select Open Capture Device.

From here you can choose the Capture Mode and the Video/Audio Device Name. The user can also adjust the configuration for these devices by clicking Configure. The user is also able to set the size of the video that will be played by the Direct Show plugin and options such as 'Device Properties' and 'Tuner Properties' by clicking Advanced Options. For Video4Linux devices, you can set the name of the video and audio devices using the "Video device name" and "Audio device name" text inputs. The "Advanced options..." button allows to select some further settings useful in some rare cases, such as the chroma of the input (the way colors are encoded) and the size of the input buffer. To use a Hauppauge PVR card, select the PVR tab in the "Open" dialog box. Use the "Device" text input to set the device of the card you want to use. You can set the Norm of the tuner (PAL, SECAM or NTSC) by using the "Norm" Drop Down. The Frequency selector allows you to set the frequency of the tuner (in kHz), the bitrate selector to set the bitrate of the resulting encoded stream (in bit/s). The "Advanced Options button allows to set some more settings, such as the size of the encoded video (in pixels), its framerate (in frame per second), the interval between 2 key frames, etc. To start playback from a acquisition card, click Play.

Playing an audio track


To play a track: 1. Select Open File in the Media menu. 2. Select an audio file and click on the

Play button. The selected track is played.

Enabling and disabling audio tracks


To disable a track, select the Disable option in the Audio Track from the Audio menu. The selected track will then stop. To enable the track again, select the designated Track option in the Audio Track from the Audio menu. The selected track will then play.

Recording Audio
To record audio you need the record button ( ) to be visible. The record button is hidden by default. You can display using one of these methods:

Select Advanced Controls in the View menu. The Advanced toolbar is displayed on top of the standard toolbar. The Advanced toolbar contains the Record button. Select Customize interface in the Tools menu and add the record button to the Line 2 of buttons (which is the line shown by default).

Once the Record button is visible, click it to start recording. The recording from a shoutcast stream is stored somewhere in your files under a name like vlc-recordDate-Time-Channel-Track.mp3 (e.g.: "vlc-record-2011-09-22-10h19m48s-Radio CAFF-Silencio - Arrabal Salvaje.mp3", when recording from Radio CAFF (or more precisely from the underlying WinAmp stream). Under my german Windows XP it was stored under "Eigene Dateien/Eigene Music" so I guess that you find it in an english Windows under "My Documents/My Music/", I don't know where it will be stored under Linux or any other OS (updates are welcome). You can automagically cut the stream into tracks by relaying the stream through Streamripper, i.e. by directing StreamRipper to the ShoutCast stream and directing VLC to the relaying port of StreamRipper (default http://localhost:8000).

Audio Device
This option helps you to listen to audio files in two modes: stereo and mono. 1. To listen to an audio track in either the Stereo or Mono mode, select Open File or Open Disc from the Media menu. The Open dialog box is displayed. 2. Select an audio file and click on the Play button. The selected track is played. 3. Select Mono in Audio Device from the Audio menu if you want to listen to the audio track in the Mono mode.

Mono refers to monaural sound that uses a single channel for sound reproduction. 1. Select Stereo in Audio Device from the Audio menu if you want to listen to the audio track in the Stereo mode. Stereo refers to sound that uses two channels for sound reproduction or stereophonic sound.

Audio Channels
In audio, a channel refers to a stream of audio that is to be played by one speaker. For example, stereo audio, consists of two channels. This option is useful for codecs that dont have support for more than 2 channels. Select a channel type in Audio Channels from the Audio menu. VLC media player provides four audio channels and they are: 1. Stereo Refers to the reproduction of the sound in two or more independent audio channels using more than one speaker. If you use this option, you would feel as though the sound is played from all the directions. You can observe this in a regular home theatre with 5.1 or 6.1 speakers. 2. Left You can observe this in a regular audio player with 2.1 speakers. If you select the Left option, the music is played only in the left speaker. The speaker on your right is automatically switched OFF. 3. Right - If you select the Right option, the music is played only in the speaker on your right side. The speaker on your left is automatically switched OFF. 4. Reverse Stereo There are several applications that are used to reverse the stereo whereas VLC has an in-built feature to reverse the stereo. This option is useful if you want the audio to play in tandem with the video. You can use the Reverse Stereo option if you want to deliberately change the audio output. Imagine that you are watching a video. In the video, a person walks on the left side but the sound is produced on the right speaker. You can correct this by selecting the Reverse Stereo option in VLC. Select the Reverse Stereo option and play the same scene in the video and observe the difference. You can observe this with 2.1, 5.1, 6.1 and 8.1 speakers.

Visualize Audio
Visualizations display splashes of colour and geometric shapes and generate animated imagery based on a piece of music.

The different visual effects available are Spectrometer, Scope, Spectrum, VU Meter and Goom. This menu item can also be used to disable a visualization. 1. Select an option under the Visualizations option from the Audio menu to view the effects. The selected visualization is then played. 2. To disable visualizations, select Disable under Visualizations from the Audio menu. The visualization is then disabled. Spectrum visualization on vlc:

Playing a Video Track


There are two main ways to open and play a video track: 1. Select Open File from the Media menu.

2. Select a video track and double-click it or click the Open button.

The selected track will be played.

Loading Subtitle Tracks


A subtitle is a textual version of a movies dialogue. Subtitles are helpful if you are viewing a movie in a language that is not understandable to you. You can load subtitles for video tracks. Subtitles of the formats .cdg, .idx, .srt, .sub, .utf, .ass, .ssa, .aqt, .jss, .psb, .rt and smi are supported. VLC can read subtitles for the media formats such as DVD, SVCD, OGM files, and Matroska (MKV) files. To enable the subtitle for a track:

1. Select Open File under the Subtitle menu item from the Video menu. The Open Subtitles File dialog box is displayed.

2. Locate the file which contains the subtitle and click on Open. The subtitles are displayed. For more details, see Documentation:Subtitles.

Full Screen
This option is useful if you want to watch the video in the full screen mode. 1. Select Full Screen from the Video menu. The video will then occupy the entire screen. 2. To return to the original mode, press Esc on the keyboard or right-click the mouse and select the Leave Full Screen option. The video will then return to its original mode.

Note: When you switch to full screen, the controls may appear for a short period of time. To restore
the controls after they disappear, move the mouse or press any key on the keyboard.

Always on Top
This option is useful if you want the VLC media player to remain on the top of the screen always when other applications or files are open.

1. To make the VLC media player appear on top of the screen, select Always on Top from the Video menu.

2. If you do not want VLC to appear on the top of the screen, select the Always on Top option from the Video menu and manually minimise the VLC application.

DirectX Wallpaper
This option is useful if you want to display the video which is being played as your desktop wallpaper. To view the current video file as wallpaper

1. Select Advanced File Open from the Media menu. The Open Media dialog box is displayed.

2. Select a file and click Play. 3. Select DirectX Wallpaper from the Video menu. The wallpaper mode will then display the video as the desktop background.

Note: that this feature works only if you deactivate the overlay under Windows XP.

Snapshot
This option is useful if you want to capture a portion of the video as an image. 1. Select Advanced File Open from the Media menu. The Open dialog box is displayed. 2. Select a file and click Play. 3. To capture an image from the video, select Snapshot from the Video menu. The image is captured in the .png picture format and is saved in the C:\My Pictures folder by default (C:\Users\Username\Pictures).

Zoom
You can enlarge videos in different sizes. This option is useful if you want to change the size of a video track which is being played. The supported sizes are 1:4 Quarter, 1:2 Half, 1:1 Original (default) and 2:1 Double. To view a video in a particular dimension, select a dimension from Zoom in the Video menu. The track is then resized based on the selected zoom ratio.

Aspect Ratio
Aspect ratio refers to the width of a picture in relation to its height. For example, the ratio 4:3 means four units wide to three units high. VLC provides a list of aspect ratio values which are Default, 1:1, 4:3, 16:9, 16:10, 2.21:1, 2.35:1, 2.39:1 and 5:4. To select an aspect ratio, select a value from Aspect Ratio in the Video menu. The video is then adjusted based on the selected ratio.

Crop
This option is helpful if you want to capture a small portion of a video as an image. This also helps crop the black bars of the top and bottom of a video. The cropping values that are supported are Default, 16:10, 16:9, 1.85:1, 2.21:1, 2.35:1, 2.39:1, 5:3, 4:3, 5:4, and 1:1. To crop a video that is played, select a value from Crop in the Video menu. The video is then cropped based on the selected value.

Deinterlace
Deinterlace refers to a process where interlaced video signals are converted into non-interlaced signals. VLC provides the Discard, Blend, Mean, Bob, Linear, X, Yadif and Yadif (2x) deinterlacement modes. 1. Select Deinterlace from the Video menu and choose the appropriate setting. 2. To change the deinterlacement mode select 'Deinterlace mode' is the Video Menu 3. Select a mode and observe the change in the video being played.

Bookmarks
You can mark and locate particular places in an audio or video file using the Bookmarks feature of VLC. If you want to view a particular scene in a movie or listen to certain tune in a song repeatedly, you can create bookmarks.

To bookmark a scene in a video: 1. From the Playback menu select the Bookmarks option, and the Manage Bookmarks. The Edit Bookmarks dialog box opens. 2. Click Create to create a bookmark for the current track. The created bookmark appears in the Edit Bookmarks dialog box. 3. To view a scene that is bookmarked, select a bookmark from Bookmarks in the Playback menu.

Note: Loading bookmarks is currently broken as of 0.9.9 see http://trac.videolan.org/vlc/ticket/2100. However it is confirmed that the current latest version VLC 1.1.5 is able to load bookmarks.

Edit Bookmarks dialog box under Windows in VLC 1.1.5

Title
In a DVD format, each movie is referred to by its title or name. A title is displayed whenever a movie is played by any media player. You can view all titles in a folder in a sequential manner. 1. To open a folder, select Open Folder from the Media menu. Locate the folder in which the video files are present and click OK. 2. To select a title, click Title in the Playback menu. The selected title is then played.

Chapter
A video is divided into chapters. Different chapters can be accessed at random in a video which is being played. Using this option, you can directly view your favourite chapter without having to see the complete video. To play a chapter:

1. Select Open Folder from the Media menu. 2. Locate the folder in which the video files are present. 3. Select a video file and click OK. The file is played in the VLC media player. 1. Select Chapter in the Playback menu to view the list of chapters. Select a chapter of your choice. Then selected chapter is played.

Navigation
In VLC, you can navigate to different titles and their corresponding chapters. You can also customise a DVD by selecting options such as subtitle, angle and so on. 1. To customize a title, select the required option from DVD Menu in the Navigation menu. 2. To view a title, select a Title under Navigation in the Playback menu. The selected title is played. 3. To view a chapter in a title, select Title. When you select a title, the chapters in a title are listed. Select a chapter. Refer to Title and Chapter sections for more details.

Program
This option is enabled only if streams of format DVB and TS are played. Choose the program to select by giving its Service ID. Only use this option if you want to read a multi-program stream (like DVB streams for example). Description needs to be improved

Specify the time


This option is used to go to a specific frame in a media file and listen or view once again. 1. To specify time select Jump to Specific Time from the Playback menu. The Go to Time dialog box is displayed. 2. Enter the time in hh:mm:ss. 3. Click on the Go button. The control moves the tracker to a specific frame and the media file continues from that specified frame. 4. Click Cancel to exit the dialog box.

Note: Ensure that time limit is within the range of length of the media file.

A playlist is a customised list of media files you might want to watch or listen to. Using a playlist, you can specify the media files you want to listen each time you start the VLC media player. You can add tracks from CDs, radio stations, and movies to a playlist. To access the playlist, click on the Playlist button in the main interface.

The default playlist view.

Contents
[hide]

1 2 3 4 5 6 7 8

Additional Sources Add Media Files to Playlist Load Playlist Save Playlist Play a file Sorting Playlist modes Misc o 8.1 Search o 8.2 Moving items o 8.3 Contextual menu o 8.4 Example finding a Shoutcast radio stream o 8.5 Example playing a known Shoutcast radio stream

Additional Sources
In addition to audio and video files, you can play other formats. The additional formats supported by VLC media player are described in the following sections:

Podcasts - Podcast (Personal On Demand broadCASTING) is a series of audio or video digital media files which is distributed over the Internet and downloaded to media players. If consumers subscribe to Podcasts, whenever new content is added the content gets automatically added to the playlist. You can customise Podcasts. To add a Podcast URL

1. Select the Playlist button. 2. Click on the Internet button to select it in the left pane. The Podcasts menu item will appear under Internet. 3. Select a Podcast stream in the main dialog box. Then right-click the stream and select Play from the popup menu.

SAP Announcements Helps to advertise your stream over the network.

To play a SAP announcement: 1. Select the Playlist button. 2. Click on the Local Area Network to select it in the left pane. The Network Streams (SAP) menu item will appear under Local Area Network. 3. Select an SAP announcement and right-click. Select Play from the popup menu.

Shoutcast Radio Listings Shoutcast is a server for streaming the media developed by Nullsoft. Digital audio content can be broadcast from and to media players, and this helps individuals to create Internet radio networks. Using VLC media player, you can listen to your

favourite radio stations and you can also create bookmarks to listen to these radio stations in future. To customize a Shoutcast radio listing: 1. Select the Playlist button. 2. Select Icecast Directory under Internet in the Playlist menu. A list of radio stations appears in the right hand panel. If nothing appears in the right hand panel try double-clicking the Shoutcast Radio option and wait. It may take a few minutes the first time. After a while, the right hand panel displays a list of titles.

1. Scroll down and select a radio station. 2. Right-click on a radio station and: 1. Select Play if you want to listen to the radio station. 2. Select Remove Selected if you want to delete the radio station. 3. Select the Stream option. The Stream output dialog box is displayed. Refer to the Specifying Specifying Streaming options section for more details. Modify the required parameters and click on the Stream button to stream the media file. 4. Click to select a title in the Playlist dialog box and right-click. Select Save from the popup menu. The Stream Output dialog box is displayed. Select the required options and click on the Save button in the Stream Output dialog box. Refer to the Specifying Streaming options section for more details. 5. Select the Information option. The Media Information dialog box is displayed with details of the media being played. 6. Select Title to alphabetically sort the radio stations.

7. Click to select a title in the Playlist dialog box and right-click. Select Open Folder from the popup menu. A folder is opened to show all sub nodes within a title. 8. Select Add Node to add a node. 9. Click to select a title in the Playlist dialog box and right-click. Select Information from the popup menu to view the details of the selected title. Refer to the Media Information section for more details on options.

Shoutcast TV stream You can watch streaming TV using the VLC media player. Shoutcast TV

stream refers to a stream transmitted by Nullsoft. The procedure of customising the TV stream and the options are similar to that of the Shoutcast Radio. Freebox TV listing Refers to television service over ADSL accessible by Freebox Free Zone unbundled.

Note: You should be connected to the Internet to access these streams.

Add Media Files to Playlist


You can add several media files to a playlist. The media files could be selected from the media library, additional sources, and some other source. To add files to a playlist: 1. Select the Playlist button. 2. Right-click on the dialog box and click and a short list appears with two options: Add file and Add directory. 1. Select Add file to add a file to the playlist. 2. Select Add directory to add a directory containing media files to the playlist. 3. Click on the 4. Click on the Random icon. This icon toggles between Random and Random Off. Click on and the files are played in an order. icon. If you want to listen to all tracks, click to play files at random. Click on

Repeat icon. This icon toggles between Repeat One and Repeat All. If you

want to listen to a track several times, click on

on again. 5. To search for a media file, enter the name in the Search box. To search for media files with certain names or formats, enter a word or phrase in the Search box. All files with the specified name are listed. 6. Click on the icon. This icon is used to skip to the current item when you have a very long list. 7. Click the Remove Selected button to clear a track from the playlist.

Load Playlist
This option is used to add a playlist created in some other media player. You can load playlists of the .xspf, .asx, .b4s and .m3u formats. To load a playlist: 1. Select the Open option from the Media menu. The Open file dialog box is displayed. 2. In the bottom right, change the format to Playlist Files in the selector.

3. Locate a playlist file and click on Open. The selected playlist is added in the current playlist dialog box.

Save Playlist
You can save playlists using the VLC media player in format of your choice. To save a playlist: 1. Create a playlist. Refer to Add Media Files to Playlist for creating a playlist. 2. Select Save Playlist to File from the Media menu. The Choose a filename to save playlist dialog box is displayed. 3. Select a name for the playlist. 4. Select a format in which the playlist must be saved from the Files of type list. The Files of type list contains the .xspf and .m3u formats. 5. Click on Save to save the playlist in the selected format.

Play a file
To play a file, open the Media menu, and select the Open File menu item. An Open File dialog box will appear. Select the file you want to open, and click Open. VLC will start playing the selected file. An alternative is to drag 'and' drop your file onto the VLC main interface or playlist window from the file explorer (Finder on MacOS X).

VLC 0.9.8a version Windows XP mode

The File menu - MacOS X interface- needs verifying for 0.9

The Open file dialog - wxWidgets interface (need 0.9 screenshot for MacOS) The Open file dialog - MacOS X interface

Sorting

In the wxWidgets interface, Sort allows you to sort the playlist according to several criteria, or to shuffle it. You can also sort by clicking the header of the column. In the MacOS X interface, sorting can be done by clicking the header of the column matching the criteria you want to use for sorting.

Playlist modes
The playlist supports several playback modes. In the wxWidgets interface, the toolbar contains three playlist mode buttons. They allow to enable random mode, to repeat the whole playlist or to repeat one item. In the MacOS X interface, random mode can be enabled by selecting the Random box. A drop down menu allows you to enable playlist and item repeat modes.

Misc
Search
You also have a search tool. Enter a search string and hit search. The next item to match the string will be highlighted. Keep hitting Search to cycle between all matching items.

Moving items
In the wxWidgets interface, the Up and Down buttons at the bottom of the playlist window allow you to move an item. Select an item and use these buttons to move it. In the MacOS X interface, you can easily move an item with the mouse, using drag-and-drop.

Contextual menu
By right-clicking or control-clicking an item, a contextual menu will appear, giving access to a number of functions (for example, play the item, disable it, delete it, or get info on it).

Example finding a Shoutcast radio stream


This example was verified as working on 15 October 2008, using VLC 0.9.4 under Windows Vista. This

needs reproducing by other people on other versions and other operating systems.

1. Ensure your firewall is set to allow the VideoLan program to make outgoing connections. 2. Click Tools then Preferences, click Interface and then click All under "Show settings". Then click the "-" next to "Playlist" in order to show the "Services discovery" submenu. If the shoutcast radio listings box is empty, click it so that a check-mark appears. The text field underneath should now show the word "shout". Click the Save button to save and close the Preferences window:

3. Restart VLC media player to make it take notice of the changed preferences. 4. On the VLC interface click Playlist, then click Show Playlist. Select the "Shoutcast Radio" in the left hand panel. If nothing appears in the righthand panel, try double-clicking "Shoutcast Radio" and waiting, it may take a few minutes the first time. After a while the righthand panel displays a long list of titles.

5. Scroll down the radio stations in the right-hand panel and select one. Click the mouse right button and click the "Play" item.

6. It may take some time for the connection to the radio station to establish (and it may fail if the station's outgoing streams are all occupied). When it does connect, VLC should start playing the audio stream from the station:

Example playing a known Shoutcast radio stream


Go to http://www.shoutcast.com/ and search for a radio station of your choice. On Windows, rightclick your mouse over Shoutcast's "Tunein" button and click "Save Link As..." to save the playlist on your computer. Remember where you saved the playlist, rename it to something that makes sense. At any time later, you can use VLC to open the saved playlist and listen to that radio station. For example, to find a BBC World Service radio stream, use a browser to go to: http://www.shoutcast.com/directory/search_results.jsp?searchCrit=simple&s=bbc One of the stations listed may be playing the World Service, if so move your mouse over the "TUNEIN!" webicon and click the right mouse button and click "Save Link As...", as described above.

VLC supports many kinds of subtitles.

Media with included subtitles


Many types of media can have embedded subtitles. VLC can read subtitles for the following media formats:

DVD SVCD OGM files Matroska (MKV) files

Subtitles are disabled by default in VLC media player. To enable them, go to the Video menu, and to Subtitles track. All available subtitles tracks will be listed. Select one to utilise the subtitles. Depending on the media, a description (language, for example) might be available for the track. VLC under Linux:

VLC under OSX:

VLC under Windows:

DVD and SVCD subtitles are merely images, so you won't be able to change anything for them. OGM and Matroska subtitles are rendered text, so you will be able to change several options. Text rendering options can be changed in the Preferences in the Tools tab. To adjust the font preference check the All bullet in the Show Settings box, and then click Subtitles/OSD. You can then set the font and its size under Text Renderer. For the font, you have to select a font file. In Windows, they can be found in C:\Windows\Fonts. Under MacOS X, they are in /System/Library/Fonts. Sizes can be set either relatively or as a number of pixels.

Subtitle text rendering preferences under Windows, VLC 1.1.5 You need to restart your stream for the font modifications to take effect.

Subtitles files
While modern file formats like Matroska or OGM can handle subtitles directly, older formats like AVI can't. Therefore, a number of subtitles files formats have been created. You need two files: the video file and the subtitles files that only contains the text of the subtitles and timestamps. VLC can handle these types of subtitles files:

MicroDVD SubRIP SubViewer SSA Sami Vobsub (this one is quite special: it is not made from text but from images, which means that you can't change the fonts)

To open a subtitles file, use the Advanced Open dialog box (Menu File, Open file). Select your file by clicking on the Browse button. Then, check the Subtitle options checkbox and click on the Settings button.

You can then select the subtitles file by clicking the Browse button. You can also set a few options like character encoding, alignment and size. An alternative is loading subtitles from the Subtitles Track menu item under the Video tab. Note: For Vobsub subtitles, you need to select the .idx file, not the .sub file. Encoding, alignment and size won't have any effect for Vobsub subtitles. Font can be changed as explained in the previous section.

Deinterlacement and Post Processing


VLC is able to deinterlace a video stream using different deinterlacement methods. Deinterlacement can be enabled in the Video menu, Deinterlacement menu item. The Blend methods gives the best results in most cases. The discard method is a less resource consuming alternative, although its results may be slightly compromised. On some particular streams (MPEG 4, DIVX, XVID, Sorenson, etc.), some additional image filtering can be applied to the video before display, improving its quality in some cases. This can be enabled by using the Post processing menu item in Video. Different levels of post processing can be chosen here. A higher level means more filtering.

Video filters
Summary
VLC features several filters able to change the video (distortion, brightness adjustment, motion blurring, etc.). In Windows and Linux, the user must go to the Effects and Filters in the Tools menu item.

In Mac OS X you can enable these filters through the Extended Controls panel. Click on the triangle next to Video filters to select your filters or expand the Adjust Image section to change the contrast, hue, etc.

Example of combined effects on a video:

Rotate
You can easily rotate a video. Open the Effects and Filters dialog, in the Tools menu

Select the Video Effects tab, then the Geometry one. Check the Transform checkbox to use rotation presets (90, 180, 270) or check the Rotate checkbox to manually select the angle you wish to apply.

Audio filters
Equalizer
VLC features a 10-band graphical equalizer. You can display it by activating the advanced GUI on wxWidgets or by clicking the Equalizer button on the MacOS X interface. The following image is the interface of the audio equalizer in the Windows and GNU/Linux interface.

The equalizer in the MacOS X interface

Presets are available in both of these dialog boxes.

Other audio filters


At the moment, VLC features two other audio filters: a volume normalizer and a filter providing sound spatialization with a headphone. They can be enabled in the Effects and Filters menu item in the Tools

tab of the Windows and GNU/Linux interface and in the Audio section of the Extended Controls panel of the Mac OS X interface. For better control, you need to go to the preferences. To select the filters to be enabled, go to Audio, then to Filters. In the "audio filters" box, enter the names of the filters to enable, separated by commas. Valid names are "equalizer", "normvol" and "headphone". If you want to tune the behavior of these filters, go to Audio, Filters, [your filter]. The equalizer and headphone filters can be tuned.

Documentation:Snapshots
There are two ways to take snapshots (i.e., screenshots or frame grabs) with VLC: 1. Open the Video menu, and select the Snapshot menu item. 2. Press the snapshot hotkey o Linux / Unix: Ctrl-Alt-s o Windows (Qt interface): Shift-s o Mac OS X: Command-Alt-s When a snapshot is taken, it will briefly preview as a thumbnail with its filename and then fade away. To change the hotkey, go to Tools -> Preferences. If "Show settings" is set to Simple, click Hotkeys; if "Show settings" is set All, navigate to Interface -> Hotkeys settings. Set the hotkey for Take video snapshot.

Snapshot location, format and name


The snapshot location depends upon your operating system:

Windows XP: My Documents\My Pictures\ Windows Vista and 7: C:\Users\Username\Pictures\ Linux / Unix: $(HOME)/.vlc/ Mac OS X: Desktop/

The default format for snapshots is PNG, but this may be changed to JPEG. Also, the default name for snapshots is vlcsnap- followed by a timestamp that is not the time of the frame in the video you're viewing, but rather the current name. The location, format and name of snapshots may be changed in the Preferences menu item in the Tools tab. Also, you may substitute other text for vlcsnap- in the Video snapshot file prefix and you

may choose to have snapshots numbered sequentially (i.e., 000001, 000002, 000003, and so on) instead of with a timestamp. As of version 0.9.0, you may even use variables in the text used for the filename. For example, $T (must be upper case) will insert the video's time code into the file name. If you were to change the prefix to Friends-$T- while watching a DVD of Friends, then the snapshot filenames would look something like this: Friends-00_05_21-00004.png . This indicates a snapshot taken at 5 minutes and 21 seconds into the video; and it was the number 00004 snapshot of the day. For a full list of variables, please see Documentation:Play HowTo/Format String.

Configuring snapshot options under Windows

Documentation:Hotkeys
The list of the available hotkeys and their functions can be retrieved and altered in the Preferences panel of the player. In the Windows and Linux interface, Preferences are available in the "Tools" tab as the "Preferences" menu item. In the MacOS X interface, open the "VLC" menu, and select "Preferences". Select the "Hot keys" panel in the dialog. As of version 0.9, a list of hotkeys are presented in a drop-down window. To change one, double-click its name to select it. Then, press the new key that will trigger the specified action. Modifier keys (such as Control/Command and Alt) may also be used. In the 1.x version you can also filter hotkeys with a search filter. In earlier versions, several boxes gave the list of modifiers for the hotkey. To trigger an action using a hotkey, you need to press simultaneously the keys corresponding to the different selected modifiers as well as the key set in the dropdown. To change the binding of a hotkey, select or deselect boxes corresponding to the different modifiers, and change the key by using the drop-down menu. Select the Save button to apply the changes.

The Hotkeys Panel - MacOS X interface- needs verifying for 0.9 Qt4 interface on linux:

File does not play, only sound or only video


Maybe the file you are trying to read is not fully supported by VLC media player. VLC does not use the codec packs (the software that decodes video signals) you might have installed. It comes with its own codecs. If there is no open-source decoder for the format you are trying to read, it won't be supported (There is an exception, under Windows, for codecs that use the DirectShow framework). To find out, open the Messages window in the Tools tab and restart your stream. Look for error messages (red messages).

In this example, the file contains a IV41 video stream, a codec that is not supported by VLC. You may of course have other messages. If you post them to a VideoLAN mailing list or in the forum, please include such a log. It is very valuable in troubleshooting.

Weird VLC behavior and crashes


A very common thing is a corrupted VLC preferences file. Don't hesitate to delete it if problems appear suddenly. You will find in the FAQ details on how to delete your preferences file.

Computer crashes / Video is corrupted


Another common problem is buggy video drivers. Try upgrading them from the website of your video card's manufacturer. Also, you can try disabling Overlay (Preferences/General/Video, untick "Overlay video output")

The settings got messed up and now I have a problem

Use the command line


TODO: completely outdated All standard operations of VLC should be available from the GUI. However, some complex operations can only be done from the command line and there are situations in which you don't need or want a GUI. Here is the complete description of VLC's command line and how to use it. You need to be quite comfortable with command line usage to use this.
Note: Windows users have to use the --option-name="value" syntax instead of the --option-name value syntax.

Getting help
VLC uses a modular structure. The core mainly manages communication between modules. All the multimedia processing is done by modules. There are input modules, demultiplexers, decoders, video output modules, ... This chapter will only describe the "general" options, i.e. the core options. Each module adds new options. For example, the HTTP input module will add options for caching, proxy, authentication, ... By using vlc --help, you will get the basic core options. vlc --longhelp will give all the basic options (core + modules). Adding --advanced will give the "advanced options" (for advanced users). So vlc --longhelp --advanced will give you all options. You can also append --help-verbose if you want more detailed help. Also, you might want to get debug informations. To do this, use -v or -vv (this will show lower severity messages). If your console supports it, you can add --color to get messages in color.

Opening streams
The following commands start VLC and start reading the given element(s): Opening a file Start VLC with:
% vlc my_file

VLC should be able to recognize the file type. If it does not, you can force demultiplexer and decoder (see below).

A list of all video and audio codecs supported by VLC is available on the VLC features list. Opening a DVD or VCD, or an audio CD Start VLC with: For a DVD with menus:
% vlc dvd://[device][@raw_device][@[title][:[chapter][:angle]]]

In most cases, vlc dvd:// or vlc dvd://[device] will do. [device] is for example /dev/dvd on GNU/Linux or D: on Windows (complete path to your DVD drive). or (DVD without menus):
% vlc dvdsimple://[device][@raw_device][@[title][:[chapter][:angle]]]

or (VCD):
% vlc vcd://[device][@{E|P|E|T|S}[number]]

or (Audio CD):
% vlc cdda://[device][@[track]]

Receiving a network stream To receive an unicast RTP/UDP stream (sent by VLC's stream output), start VLC with:
% vlc rtp://@:5004

If 5004 is the port to which packets are sent. 1234 is another commonly used port number. you use the default port (1234), vlc rtp:// will do. For more information, look at the Streaming Howto. To receive an multicast UDP/RTP stream (sent by VLC's stream output), start VLC with:
% vlc rtp://@multicast_address:port

To receive a SSM (source specific multicast) stream, you can use:


% vlc rtp://server_address@multicast_address:port

This only works on OSs that support SSM (Windows XP and Linux). To receive a HTTP stream, start VLC with:

% vlc http://www.example.org/your_file.mpg

To receive a RTSP stream, start VLC with:</para>


% vlc rtsp://www.example.org/your_stream

Modules selection
VLC always tries to select the most appropriate interface, input and output modules, among the ones available on the system, according to the stream it is given to read. However, you may wish to force the use of a specific module with the following options.
--intf <module> allows you to select the interface module. --extraintf <module> allows you to select extra interface modules that will be launched in addition to the main one. This is mainly useful for special control interfaces, like HTTP, RC (Remote Control), ... (see below) --aout <module> allows you to select the audio output module. --vout <module> allows you to select the video output module. --memcpy <module> allows you to choose a memory copy module. You should probably never touch that.

You can get a listing of the available modules by using vlc -l

Stream Output
The Stream output system allows vlc to become a streaming server. For more details on the stream output system, please have a look at the Streaming HowTo.

Other Options
Audio options
--noaudio disables audio output. Note that if you are streaming (ex: to a file) this has no effect (streaming copies the audio verbatim). Use --sout-xxx instead (ex: --no-sout-audio) --mono forces VLC to treat the stream in mono audio. --volume <integer> sets the level of audio output (between 0 and 1024). Also only applies to local playback (like --noaudio). --aout-rate <integer> sets the audio output frequency (Hz). By default, VLC will try to autodetect this. --desync <integer> compensates desynchronization of audio (ms). (If audio and video streams are not synchronized, use this setting to delay the audio stream) --audio-filter <string> adds audio filters to the processing chain. Available filters are visual (visualizer with spectrum analyzer and oscilloscope), headphone (virtual headphone patialization) and normalizer (volume normalizer)

Video options
--no-video disables video output. --grayscale turns video output into grayscale mode.

--fullscreen ( or -f) sets fullscreen video. --nooverlay disables hardware acceleration for the video output. --width, --height <integer> sets the video window dimensions. By default, the video window size will be adjusted to match the video dimensions. --start-time <integer> starts the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90) --stop-time <integer> stops the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90) --zoom <float> adds a zoom factor. --aspect-ratio <mode> forces source aspect ratio. Modes are 4x3, 16x9, ... --spumargin <integer> forces SPU subtitles postion. --video-filter <string> adds video filters to the processing chain. You can add several filters, separated by commas --sub-filter <string> adds video subpictures filter to the processing chain.

Desktop/Screen grab options You can see the various options for "grabbing the desktop" (VLC's built-in screen grabber capture device) by using the GUI. See http://forum.videolan.org/viewtopic.php?f=4&t=46971 Playlist options
--random plays files randomly forever. --loop loops playlist on end. --repeat repeats current item until another item is forced --play-and-stop stops the playlist after each played item.

Network options
--server-port <integer> sets server port. --iface <string> specifies the network interface to use. --iface-addr <string> specifies your network interface IP address. --mtu <integer> specifies the MTU of the network interface. --ipv6 forces IPv6. --ipv4 forces IPv4.

CPU options You should probably not touch these options unless you know what you are doing.
--nommx disables the use of MMX CPU extensions. --no3dn disables the use of 3D Now! CPU extensions. --nommxext disables the use of MMX Ext CPU extensions. --nosse disables the use of SSE CPU extensions. --noaltivec disables the use of Altivec CPU extensions.

Miscellaneous options
--quiet deactivates all console messages. --color displays color messages. --search-path <string> specifies interface default search path. --plugin-path <string> specifies plugin search path. --no-plugins-cache disables the plugin cache (plugins cache speeds up startup)

--dvd <string> specifies the default DVD device. --vcd <string> specifies the default VCD device. --program <integer> specifies program (SID) (for streams with several programs, like satellite ones). --audio-type <integer> specifies the default audio type to use with dvds. --audio-channel <integer> specifies the default audio channel to use with dvds. --spu-channel <integer> specifies the default subtitle channel to use with dvds. --version gives you information about the current VLC version. --module <module> displays help about specified module. (Shortcut: -p)

Item-specific options
There are many options that are related to items (like --novideo, --codec, --fullscreen). For all of these, you have the possibility to make them item-specific, using ":" instead of "--" and putting the option just after the concerned item. Examples:
% vlc file1.mpg :fullscreen file2.mpg

will play file1.mpg in fullscreen mode and file2.mpg in the default mode (which is generally no fullscreen), whereas
% vlc --fullscreen file1.mpg file2.mpg

will play both files in fullscreen mode


% vlc --fullscreen file1.mpg :sub-file=file1.srt :no-fullscreen file2.mpg :filter=distort

will play file1.mpg in windowed (no-fullscreen) mode with the subtitles file file1.srt and will play file2.mpg with video filter distort enabled in fullscreen mode (item-specific options override global options).

Advanced use of filters


Filters
These are the old style VLC filters. They only apply to on screen display and thus cannot be streamed. However, on version 1.1.11 you are still able to apply these filters in transcode module using parameter vfilter. More information can be found on Advanced Streaming Using the Command Line. Deinterlacing video filter Module name: deinterlace
--deinterlace-mode {discard,blend,mean,bob,linear,x,yadif,yadif (2x),phosophor,ivtc} choose a deinterlacing mode.

Invert video filter

Module name: invert Image properties filter Module name: adjust


--contrast <float> Image contrast in the 0-2 range. --brightness <float> Image brightness in the 0-2 range. --hue <integer> Image hue in the 0-360 range. --saturation <float> Image saturation in the 0-3 range. -gamma <float> Image gamma in the 0-10 range.

Wall video filter Module name: wall This filter splits the output in several windows.
--wall-cols <integer> Number of columns. --wall-rows <integer> Number of rows. --wall-active <string> Select the windows you want to display. To select windows 2 and 4 you would write --wall-active 2,4. When this option isn't specified, all windows are displayed.

Video transformation filter Module name: transform


--transform-type {90,180,270,hflip,vflip} Select rotation angle or symmetry.

Distort video filter Module name: distort Clone video filter This filter clones the output window. Module name: clone
--clone-count <integer> Number of clones. --clone-vout-list <string> Comma separated string of video output modules.

Crop video filter Module name: crop


--crop-geometry <string> Set the geometry of the zone to crop. This is set as <width> x <height> + <left offset> + <top offset>. --autocrop Enable automatic black border cropping.

Motion blur filter

Module name: motionblur


blur-factor <integer> Blur factor in the 1-127 range.

Video pictures blending Module name: blend Video scaling filter Module name: scale

Subpictures Filters
These are the new VLC filters. They can be streamed. Time display sub filter Module name: time
--time-format <string> Time format string. You can use the following special characters %Y = year, %m = month, %d = day, %H = hour, %M = minute, %S = second. --time-x <integer> X offset from the left in pixels. --time-y <integer> Y offset from the top in pixels.

Marquee display sub filter Module name: marq


--marq-marquee <string> Marquee text to display. --marq-x <integer> X offset from the left in pixels. --marq-y <integer> Y offset from the top in pixels. --marq-timeout <timeout> Defines the time the marquee must remain displayed in milliseconds. Default value is 0 (remain forever).

Logo video filter Module name: logo This filter can be used both as an old style filter or a subpictures filter.
--logo-file <string> Full path of the PNG file to use. --logo-x <integer> X offset from the left in pixels. --logo-y <integer> Y offset from the top in pixels. --logo-transparency <integer> You can set the logo transparency value here (from 0 for full transparency to 255 for full opacity).

Note: You can move the logo by left-clicking on it.

The HTTP interface


VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface. To start VLC with the HTTP interface, use:
% vlc -I http [--http-src /directory/] [--http-host host:port]

If you want to have both the "normal" interface and the HTTP interface, use vlc --extraintf http. The HTTP interface will start listening at host:port (<all interfaces>:8080 if omitted), and will reproduce the structure of /directory at http://host:port/ ( vlc_source_path/share/http if omitted ). Use a browser to go to http://your_host_machine:port. You should be taken to the main page. VLC is shipped with a set of files that should be enough for generic needs. It is also possible to customize pages. See Documentation:Play HowTo/Building Pages for the HTTP Interface. Available pages for 1.0.3 :
http://host:port - Main Interface http://host:port/vlm.html - VLM Interface http://host:port/mosaic.html - Mosaic Wizard http://host:port/flash.html - Flash based remote playback

ADDENDUM - HTTP COMMAND LIST COMMANDS WHICH MAY BE USED OVER THE HTTP REMOTE-CONTROL PORT There is a fulsome set of remote-control commands for VLC which are for some reason not documented on the site - hence I have added them here. This seems the most convenient and reliable interface for developers to use. The commands ARE listed - but the list is tucked away in a README file, in the http subfolder of the little HTTP server under the VLC executables folder. How the Commands & Status Queries Work The commands below are all applied by submitting an HTTP-GET for one of the xml files stored in the VLC http/requests folder. For example, VLC will report back the current playlist when you submit a URL of the form
http://127.0.0.1:9090/requests/playlist.xml (that is for a VLC which was started, listening on port 9090).

Similarly,

http://127.0.0.1:9090/requests/status.xml

will report back the player status. Commands TO the player are sent by appending a trailing command parameter (following a '?' separator) to this latter status query command. A few examples: SHOW CURRENT PLAYLIST:
http://127.0.0.1:9090/requests/playlist.xml

SHOW STATUS:
http://127.0.0.1:9090/requests/status.xml

STOP
http://127.0.0.1:9090/requests/status.xml?command=pl_stop

CLEAR PLAYLIST
http://127.0.0.1:9090/requests/status.xml?command=pl_empty

PLAY AN RTSP STREAM URL:


http://127.0.0.1:9090/requests/status.xml?command=in_play&input=rtsp://user:pass@somewebcameraaddress.com:9552/c am1/mpeg4

By the bye: to start VLC's control HTTPD service on a specific port, use the syntax
vlc --intf http --http-host 10.1.1.156:9090

HERE IS the FULL http-remote-control command list (as listed in README.txt in the VLC http subfolder) :Commands available through the requests/ path: Lines starting with < describe what the page sends back Lines starting with > describe what you can send to the page All parameters need to be URL encoded. Examples:
# -> %23 % -> %25 + -> %2B space -> +

...

status.xml: < Get VLC status information, current item info and meta. > add <mrl> to playlist and start playback:
?command=in_play&input=<mrl>

> add <mrl> to playlist:


?command=in_enqueue&input=<mrl>

> play playlist item <id>:


?command=pl_play&id=<id>

NB: ?command=pl_play also works (no ID needed). > toggle pause. If current state was 'stop', play item <id>:
?command=pl_pause&id=<id>

NB: ?command=pl_pause NB: seems largely ignored ? stream often continues. (May depend on whether camera obeys pause command - NB this command may only cause a PAUSE to be sent out to the video stream source, so result will depend on whether source obeys.) > stop playback:
?command=pl_stop NB: seems not to clear the playlist. If in doubt clear the playlist and reload to start.

> jump to next item:


?command=pl_next

> jump to previous item:


?command=pl_previous

> delete item <id> from playlist:


?command=pl_delete&id=<id>

> empty playlist:

?command=pl_empty

> sort playlist using sort mode <val> and order <id>:
?command=pl_sort&id=<id>&val=<val> If id=0 then items will be sorted in normal order, if id=1 they will be sorted in reverse order A non exhaustive list of sort modes: 0 Id 1 Name 3 Author 5 Random 7 Track number

> toggle random playback:


?command=pl_random

> toggle loop:


?command=pl_loop

> toggle repeat:


?command=pl_repeat

> toggle enable service discovery module <val>:


?command=pl_sd&val=<val> Typical values are: sap shoutcast podcast hal

> toggle fullscreen:


?command=fullscreen

> set volume level to <val> (can be absolute integer, percent or +/- relative value):
?command=volume&val=<val> Allowed values are of the form: +<int>, -<int>, <int> or <int>%

> seek to <val>:


?command=seek&val=<val> Allowed values are of the form: [+ or -][<int><H or h>:][<int><M or m or '>:][<int><nothing or S or s or ">] or [+ or -]<int>% (value between [ ] are optional, value between < > are mandatory) examples: 1000 -> seek to the 1000th second +1H:2M -> seek 1 hour and 2 minutes forward -10% -> seek 10% back

playlist.xml: < get the full playlist tree browse.xml: < ?dir=<dir> > get <dir>'s filelist vlm.xml: < get the full list of VLM elements vlm_cmd.xml: < execute VLM command <cmd>
?command=<cmd>

> get the error message from <cmd>

Other control interfaces


VLC includes a number of so-called interfaces that are not really interfaces, but means of controlling VLC. Nevertheless, they are enabled by setting them as interface or extra interface, either in the Preferences, in General/Interface, or using -I or --extraintf on the command line.

Hotkeys
This module allows you to control VLC and playback via hotkeys. It is always enabled by default. You can use hotkeys in the video output window, you can't in the audio dummy interface. Hotkeys can be hacked by:
% vlc --key-<function> <code>

Code is composed by modifiers keys (Alt, Shift, Ctrl, Meta,Command) separated by a dash (-) and terminated by a key (a...z, +, =, -, ',', +, <, >, `, /, ;, ', \, [, ], *, Left, Right, Up, Down, Space, Enter, F1...F12, Home, End, Menu, Esc, Page Up, Page Down, Tab, Backspace, Mouse Wheel Up and Mouse Wheel Down). Main controls are available from hotkeys, such as : fullscreen, play-pause, faster, slower, next, prev, stop, quit, vol-up, etc. (use the --longhelp option for full list of functions). For example, for binding fullscreen to Ctrl-f, run:
% vlc --key-fullscreen 'Ctrl-f'

The list of the default hotkeys is available here.

RC and RTCI
These two interfaces allow you to control VLC from a command shell (possibly using a remote connexion or a Unix socket). Start VLC with -I rc or --extraintf rc. When you get the Remote control interface initialized, `h' for help message, press h and Enter to get help about available commands. To be able to remote connect to your VLC using a TCP socket (telnet-like connexion), use --rc-host your_host:port. Then, by connecting (using telnet or netcat) to the host on the given port, you will get the command shell. To use a UNIX socket (local socket, this does not work for Windows), use --rc-unix /path/to/socket. Commands can then be passed using this UNIX socket. The RTCI interface gives you more advanced options, such as marquee control for the marquee subpicture filter (See filter section).

Ncurses
This is a text interface, using ncurses library. Start VLC with -I ncurses or --extraintf ncurses. You will then get something like that:

The ncurses interface

Press h to get the list of all available commands, with a short description. There is also a filebrowser available for the ncurses interface in order to add playlist items. Press 'B' to use it.

The ncurses filebrowser You can set the filebrowser starting point by launching vlc with the --browse-dir option:
% vlc -I ncurses --browse-dir /filebrowser/starting/point/

Gestures
Gestures provide a simple mouse gestures control. TODO

The Mozilla plugin


VLC can also be embedded in a web browser! The following browsers are supported Mozilla, Firefox and Safari.

Install the plugin


GNU/Linux Debian, Ubuntu, etc. Install the mozilla-plugin-vlc package using your preferred package manager. For example, at the command line enter:

# apt-get update # apt-get install mozilla-plugin-vlc

Windows Quit Firefox or Mozilla. Select the Mozilla Plugin option when installing VLC Media Player. The installer will then automatically detect your browser and install the plugin. Restart Firefox or Mozilla.
Manual Install

In "Mozilla Firefox\plugins" Create the directory if it doesn't exist. Folders to copy:


osdmenu plugins

Files to copy:
vlc.exe vlc.exe.manifest vlc-cache-gen.exe npvlc.dll.manifest npvlc.dll libvlccore.dll libvlc.dll libvlc.dll.manifest axvlc.dll axvlc.dll.manifest

MacOS X

The Mozilla/Safari plugin for MacOS X is only available from vlc version 0.8.5.1 and onwards.
Quit Safari browser. Download the Mozilla/safari plugin package from MacOS X download page. Run the installer from the dmg image.

Compile the sources yourself Please look at the developers page for information on how to do this.

Use the Mozilla plugin


If in the browser you open a link to an audio or video URL handled by the VLC plugin, or if a web page has HTML code that embeds audio or video handled by the VLC plugin, then the plugin should start and play the audio/video. Note the plugin (as of version 1.1.9) does not present any user interface it has no default control panel and no keyboard shortcuts. To get the list of the media types handled by the VLC plugin, browse to about:plugins. Conflicts will arise if you have more than one plugin installed that supports the same media type. See the Web plugin documentation to create HTML pages that use JavaScript to control the plugin.
This page is part of official VLC media player Documentation (Play HowTo Streaming HowTo Hacker's Guide Modules) Please read the Documentation Editing Guidelines before you edit the documentation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Snapshot Tool
Did you know you can use special codes to automatically generate filenames in the Snaphot Tool?

Specifying Streaming Options


Main article: Documentation:Streaming HowTo New

Audio Bar Graph over Video


This section specifies how to enable the audiobargraph audio filter and video overlay, (mostly) via the GUI. This displays an audio meter overlaid on the video. There are three parts - an audio filter, which sends it's output via TCP to the Remote Control (RC) Interface. This information is then picked up and displayed by the Audio Bar Graph video subpicture filter (OSD). To enable this, VLC needs to be started with the --rc-host command-line switch - e.g.
"C:\Program Files\VideoLAN\VLC\vlc.exe" --rc-host localhost:12345

In the GUI, set the following (this example from VLC v1.1.9 on Windows 7):
Preferences:Show settings:All Audio/Filters > Enable "Audio part of the BarGraph function" Audio/Filters/audiobargraph > use defaults, change "Sends the barGraph information every n audio packets" to 1 to enable see a more accurate display Interface/Main interfaces > Enable "Remote control interface" Interface/Main interfaces/RC > Enable "Do not open a DOS command box interface" Video/Subtitles-OSD > Enable "Audio Bar Graph Video sub filter" Video/Subtitles-OSD/Audio Bar Graph > Set the following settings: o "Value of the audio channels levels" = 0 (setting this to 0:1 crashes VLC v1.1.9) o "X coordinate" = 0 o "Y coordinate" = 0 (this doesn't seem to affect anything) o "Transparency of the bargraph" = 128 for 50% transparency which looks ok o "Bargraph position" = Left (seems to only work Left,Center,Right - can't go top or bottom) o "Alarm" = 1 (enables the silence alarm - puts a red border around the bargraph if silent for too long) o "Bar width in pixel" = 10 (20 if you want it to be really visible)

Introduction: Building Web pages with Video


The VLC media player webplugins are native browser plugins, similar to Flash or Silverlight plugins and allow playback inside the browser of all the videos that VLC media player can read. Additionally to viewing video on all pages, you can build custom pages that will use the advanced features of the plugin, using Javascript functions to control playback or extract information from the plugin. There are 2 main plugins: one is ActiveX for IE, the other is NPAPI for the other browsers. They feature the same amount of features. In older versions, those plugins were very crashy. We URGE YOU to use VLC 2.0.0 or newer versions.

Browsers support
It has been tested with:
Mozilla Firefox

Internet Explorer

Safari Chrome Konqueror Opera

It has been tested on GNU/Linux, Windows and MacOS.

Embed tag attributes


To embed the plugin into a webpage use the following <embed> template:
1. 2. <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" /> <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"></object>

Required elements
These are required attributes for the <embed> tag:
width: Specifies the width of the plugin. height: Specifies the height of the plugin. target (or one of these alias: mrl, filename, src): Specifies the source location (URL) of the video to load.

Optionnal elements
These are additional attributes for the <embed> tag:
autoplay, autostart: Specifies whether the plugin starts playing on load. Default: true allowfullscreen: (since VLC version 2.0.0) Specifies whether the user can switch into fullscreen mode. Default: true windowless: (since VLC version 2.0.6) Draw the video on a window-less (non-accelerated) surface and allow styling (CSS overlay, 3D transformations, and much more). Default: false mute: Specifies whether the audio volume is initially muted. Default: false loop, autoloop: Specifies whether the video loops on end. Default: false controls (or toolbar): Specifies whether the controls are shown by default. Default: true bgcolor: Specifies the background color of the video player. Default: #000000

Normal DOM elements


id: DOM id name: DOM name

Javascript API description


The vlc plugin exports several objects that can be accessed for setting and getting information. When used improperly the API's will throw an exception that includes a string that explains what happened. For example when asking for vlc.input.length when there is no playlist item playing.

VLC objects
The vlc plugin knows the following objects:
audio: Access audio properties. input: Access input properties. playlist: Access playlist properties. subtitle: Access subtitle properties. video: Access video properties. o video.marquee: Access marquee video filter properties. o video.logo: Access logo video filter properties. mediaDescription: Access media info properties (only available in vlc version >= 2.0.2).

The following are deprecated:


log: Access log properties (only available in vlc version <= 1.0.0-rc1). messages: Access to log message properties (only available in vlc version <= 1.0.0-rc1). iterator: Access to log iterator properties (only available in vlc version <= 1.0.0-rc1). message: Access to log message properties (only available in vlc version <= 1.0.0-rc1).

Example
The following JavaScript code shows howto get a reference to the vlc plugin. This reference can then be used to access the objects of the vlc plugin.
1. 2. 3. 4. 5. 6. 7. 8. 9. 1. 2. 3. 4. 1. 2. 3. <html> <title>VLC Mozilla plugin test page</title> <body> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" width="640" height="480" id="vlc"> </embed> <script language="Javascript"> <!-var vlc = document.getElementById("vlc"); vlc.audio.toggleMute(); //!--> </script> </body> </html>

Root object
readonly properties
VersionInfo: returns version information string

read/write properties

none

methods
vlc.versionInfo(): returns version information string (same as VersionInfo) vlc.addEventListener(eventname, callback, bubble): (only for Mozilla) add a listener for mentioned event name, callback expects a function and bubble influences the order of eventhandling by JS (usually it is set to false). vlc.removeEventListener(eventname, callback, bubble): (only for Mozilla) remove listener for mentioned event name, callback expects a function and bubble influences the order of eventhandling by JS (usually it is set to false). vlc.attachEvent(eventname, callback) : (only for ActiveX) add listener for mentioned event name, callback expects a function vlc.removeEvent(eventname, callback): (only for ActiveX) remove listener for mentioned event name, callback expects a function

events
MediaPlayerNothingSpecial: vlc is in idle state doing nothing but waiting for a command to be issued MediaPlayerOpening: vlc is opening an media resource locator (MRL) MediaPlayerBuffering: vlc is buffering MediaPlayerPlaying: vlc is playing a media MediaPlayerPaused: vlc is in paused state MediaPlayerForward: vlc is fastforwarding through the media (works only when an input supports forward playback) MediaPlayerBackward: vlc is going backwards through the media (works only when an input supports backwards playback) MediaPlayerEncounteredError: vlc has encountered an error and is unable to continue MediaPlayerEndReached: vlc has reached the end of current playlist MediaPlayerTimeChanged: time has changed MediaPlayerPositionChanged: media position has changed MediaPlayerSeekableChanged: media seekable flag has changed (true means media is seekable, false means it is not) MediaPlayerPausableChanged: media pausable flag has changed (true means media is pauseable, false means it is not)

Example
The following code snippet provides easy functions to register and unregister event callbacks on all supported platforms (currently only Linux mozilla based browsers and windows activeX objects for Internet Explorer).
1. 1. 2. 3. 4. 5. 6. <script language="javascript"> <!-function registerVLCEvent(event, handler) { var vlc = getVLC("vlc"); if (vlc) { if (vlc.attachEvent) { // Microsoft

7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68.

vlc.attachEvent (event, handler); } else if (vlc.addEventListener) { // Mozilla: DOM level 2 vlc.addEventListener (event, handler, false); } else { // DOM level 0 vlc["on" + event] = handler; } } // stop listening to event function unregisterVLCEvent(event, handler) { var vlc = getVLC("vlc"); if (vlc) { if (vlc.detachEvent) { // Microsoft vlc.detachEvent (event, handler); } else if (vlc.removeEventListener) { // Mozilla: DOM level 2 vlc.removeEventListener (event, handler, false); } else { // DOM level 0 vlc["on" + event] = null; } } // event callback function for testing function handleEvents(event) { if (!event) event = window.event; // IE if (event.target) { // Netscape based browser targ = event.target; } else if (event.srcElement) { // ActiveX targ = event.srcElement; } else { // No event object, just the value alert("Event value" + event ); return; } if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; alert("Event " + event.type + " has fired from " + targ ); } // handle mouse grab event from video filter function handleMouseGrab(event,X,Y) { if (!event) event = window.event; // IE alert("new position (" + X + "," + Y + ")"); } // Register a bunch of callbacks. registerVLCEvent('MediaPlayerNothingSpecial', handleEvents); registerVLCEvent('MediaPlayerOpening', handleEvents); registerVLCEvent('MediaPlayerBuffering', handleEvents); registerVLCEvent('MediaPlayerPlaying', handleEvents); registerVLCEvent('MediaPlayerPaused', handleEvents); registerVLCEvent('MediaPlayerForward', handleEvents); registerVLCEvent('MediaPlayerBackward', handleEvents); registerVLCEvent('MediaPlayerEncounteredError', handleEvents); registerVLCEvent('MediaPlayerEndReached', handleEvents); registerVLCEvent('MediaPlayerTimeChanged', handleEvents); registerVLCEvent('MediaPlayerPositionChanged', handleEvents); registerVLCEvent('MediaPlayerSeekableChanged', handleEvents);

69. registerVLCEvent('MediaPlayerPausableChanged', handleEvents); 70. --> 1. </script>

Audio object
readonly properties
vlc.audio.count: (supported in vlc version >= 1.1.0) returns the number of audio track available.

read/write properties
vlc.audio.mute: boolean value to mute and unmute the audio. vlc.audio.volume: a value between [0-200] which indicates a percentage of the volume. vlc.audio.track: (supported in vlc version > 0.8.6) a value between [1-65535] which indicates the audio track to play or that is playing. a value of 0 means the audio is/will be disabled. vlc.audio.channel: (supported in vlc version > 0.8.6) integer value between [1-5] that indicates which audio channel mode is used, values can be: "1=stereo", "2=reverse stereo", "3=left", "4=right", "5=dolby". Use vlc.audio.channel to check if setting of the audio channel mode has succeeded.

methods
vlc.audio.toggleMute(): boolean toggle that mutes and unmutes the audio based upon the previous state. vlc.audio.description(int i): (supported in vlc version >= 1.1.0) give the i-th audio track name. 0 corresponds to disable and 1 to the first audio track.

Example
1. 2. 3. 4. 5. 6. 7. 8. Audio Channel: <select readonly onChange='doAudioChannel(this.value)'> <option value=1>Stereo</option> <option value=2>Reverse stereo</option> <option value=3>Left</option> <option value=4>Right</option> <option value=5>Dolby</option> </select>

1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

<script language="javascript"> <!-function doAudioChannel(value) { var vlc = getVLC("vlc"); vlc.audio.channel = parseInt(value); alert(vlc.audio.channel); }; --> </script>

Input object
readonly properties

vlc.input.length: length of the input file in number of milliseconds. 0 is returned for 'live' streams or clips whose length cannot be determined by VLC. It returns -1 if no input is playing. vlc.input.fps: frames per second returned as a float (typically 60.0, 50.0, 23.976, etc...) vlc.input.hasVout: a boolean that returns true when the video is being displayed, it returns false when video is not displayed

read/write properties
vlc.input.position: normalized position in multimedia stream item given as a float value between [0.0 - 1.0] vlc.input.time: the absolute position in time given in milliseconds, this property can be used to seek through the stream

<!-- absolute seek in stream !--> vlc.input.time = <absolute seek> <!-- relative seek in stream !--> vlc.input.time = vlc.input.time + <relative seek>

0 IDLE

vlc.input.state: current state of the input chain given as enumeration:

1 OPENING 2 BUFFERING 3 PLAYING 4 PAUSED 5 STOPPING 6 ENDED 7 ERROR

Note: Test for ENDED=6 to catch end of playback. Checking for STOPPING=5 is NOT ENOUGH.
vlc.input.rate: input speed given as float (1.0 for normal speed, 0.5 for half speed, 2.0 for twice as fast, etc.).

rate > 1 : is fastforward rate > 0 and rate < 1 : is slow motion rate < 0 : is rewind

methods

none

Playlist object

readonly properties
vlc.playlist.itemCount: number that returns the amount of items currently in the playlist (deprecated, do not use, see Playlist items) vlc.playlist.isPlaying: a boolean that returns true if the current playlist item is playing and false when it is not playing vlc.playlist.items: return the playlist items collection, see Playlist items

read/write properties

none

methods
vlc.playlist.add(mrl): add a playlist item as MRL. The MRL must be given as a string. Returns a number as an item identifier in playlist (this is not a position in playlist). vlc.playlist.add(mrl,name,options): add a playlist item as MRL, with metaname 'name' and options 'options'. options are text arguments which can be provided either as a single string containing space separated values, akin to VLC command line, or as an array of string values. Returns a number as an item identifier in playlist (this is not a position in playlist).
var options = new Array(":aspect-ratio=4:3", "--rtsp-tcp"); var id = vlc.playlist.add("rtsp://servername/item/to/play", "fancy name", options); vlc.playlist.playItem(id);

1. 2. 3.

vlc.playlist.play(): start playing the current playlist item vlc.playlist.playItem(number): start playing the item whose identifier is number vlc.playlist.pause(): pause the current playlist item vlc.playlist.togglePause(): toggle the pause state for the current playlist item vlc.playlist.stop(): stop playing the current playlist item vlc.playlist.next(): iterate to the next playlist item vlc.playlist.prev(): iterate to the previous playlist item vlc.playlist.clear(): empty the current playlist, all items will be deleted from the playlist (deprecated, do not use, see Playlist items) vlc.playlist.removeItem(number): remove the item from playlist whose identifier is number (deprecated, do not use, see Playlist items)

Playlist items object


readonly properties
vlc.playlist.items.count: number of items currently in the playlist

read/write properties

none

methods
vlc.playlist.items.clear(): empty the current playlist, all items will be deleted from the playlist. If a movie is playing, it stop. Note that when this method returns, playlist may not have been entirely been cleared as this operation is performed asynchronously; use the count property to verify/wait until the playlist is empty.

vlc.playlist.items.remove(number): remove the item whose identifier is number from playlist. (note: this number isn't the position in the playlist, but the number given by vlc.playlist.add() )

Subtitle object
readonly properties
vlc.subtitle.count: (supported in vlc version >= 1.1.0) returns the number of subtitle available.

read/write properties
vlc.subtitle.track: (supported in vlc version >= 1.1.0) get and set the subtitle track to show on the video screen. The property takes an integer as input value [1..65535]. If subtitle track is set to 0, the subtitles will be disabled. If set to a value outside the current subtitle tracks range, then it will return -1 and display an error message.

methods
vlc.subtitle.description(int i): (supported in vlc version >= 1.1.0) give the i-th subtitle name. 0 correspond to disable and 1 to the first subtitle.

Video object
readonly properties
vlc.video.width: returns the horizontal size of the video vlc.video.height: returns the vertical size of the video

read/write properties
vlc.video.fullscreen: when set to true the video will be displayed in fullscreen mode, when set to false the video will be shown inside the video output size. The property takes a boolean as input. vlc.video.aspectRatio: get and set the aspect ratio to use in the video screen. The property takes a string as input value. Typical values are: "1:1", "4:3", "16:9", "16:10", "221:100" and "5:4" vlc.video.subtitle: (supported in vlc version > 0.8.6a) get and set the subtitle track to show on the video screen. The property takes an integer as input value [1..65535]. If subtitle track is set to 0, the subtitles will be disabled. If set to a value outside the current subtitle tracks range, then it will return -1 and display an error message. vlc.video.teletext: (supported in vlc version >= 0.9.0) get and set teletext page to show on the video stream. This will only work if a teletext elementary stream is available in the video stream. The property takes an integer as input value [0..999] for indicating the teletext page to view, setting the value to 0 means hide teletext. On error it will return -1 and display an error message.

methods
vlc.video.toggleFullscreen(): toggle the fullscreen mode based on the previous setting vlc.video.toggleTeletext(): (supported in vlc version >= 0.9.0) toggle the teletext page to overlay transparent or not, based on the previous setting

Deinterlace Object

readonly properties

none

read/write properties

none

methods
vlc.video.deinterlace.enable("my_mode"): (supported in vlc version >= 1.1.0) enable deinterlacing with my_mode. You can enable it with "blend", "bob", "discard", "linear", "mean", "x", "yadif" or "yadif2x" mode. Enabling too soon deinterlacing may cause some problems. You have to wait that all variable are available before enabling it. vlc.video.deinterlace.disable(): (supported in vlc version >= 1.1.0) disable deinterlacing.

Marquee Object
readonly properties

none

read/write properties
vlc.video.marquee.text: (supported in vlc version >= 1.1.0) display my text on the screen. vlc.video.marquee.color: (supported in vlc version >= 1.1.0) change the text color. val is the new color to use (WHITE=0x000000, BLACK=0xFFFFFF, RED=0xFF0000, GREEN=0x00FF00, BLUE=0x0000FF...). vlc.video.marquee.opacity: (supported in vlc version >= 1.1.0) change the text opacity, val is defined from 0 (completely transparent) to 255 (completely opaque). vlc.video.marquee.position: (supported in vlc version >= 1.1.0) change the text position (CENTER=0, LEFT=1, RIGHT=2, TOP=4, TOP-LEFT=5, TOP-RIGHT=6, BOTTOM=8, BOTTOM-LEFT=9, BOTTOM_RIGHT=10). vlc.video.marquee.refresh: (supported in vlc version >= 1.1.0) change the marquee refresh period. vlc.video.marquee.size: (supported in vlc version >= 1.1.0) val define the new size for the text displayed on the screen. If the text is bigger than the screen then the text is not displayed. vlc.video.marquee.timeout: (supported in vlc version >= 1.1.0) change the timeout value. val is defined in ms, but 0 value correspond to unlimited. vlc.video.marquee.x: (supported in vlc version >= 1.1.0) change text abscissa. vlc.video.marquee.y: (supported in vlc version >= 1.1.0) change text ordinate.

methods
vlc.video.marquee.enable(): (supported in vlc version >= 1.1.0) enable marquee filter. vlc.video.marquee.disable(): (supported in vlc version >= 1.1.0) disable marquee filter.

Some problems may happen (option like color or text will not be applied) because of the VLC asynchronous functioning. To avoid it, after enabling marquee, you have to wait a little time before changing an option. But it should be fixed by the new vout implementation. NOTE: [1]

Logo Object
readonly properties

none

read/write properties
vlc.video.logo.opacity: (supported in vlc version >= 1.1.0) change the picture opacity, val is defined from 0 (completely transparent) to 255 (completely opaque). vlc.video.logo.position: (supported in vlc version >= 1.1.0) change the text position ("center", "left", "right", "top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right"). vlc.video.logo.delay: (supported in vlc version >= 1.1.0) display each picture for a duration of 1000 ms (default) before displaying the next picture. vlc.video.logo.repeat: (supported in vlc version >= 1.1.0) number of loops for picture animation (1=continuous, 0=disabled, n=n-times). The default is -1 (continuous). vlc.video.logo.x: (supported in vlc version >= 1.1.0) change the x-offset for displaying the picture counting from top-left on the screen. vlc.video.logo.y: (supported in vlc version >= 1.1.0) change the y-offset for displaying the picture counting from top-left on the screen. vlc.video.logo.width: (supported in vlc version >= 1.1.0) change the picture width. vlc.video.logo.height: (supported in vlc version >= 1.1.0) change the picture height.

methods
vlc.video.logo.enable(): (supported in vlc version >= 1.1.0) enable logo video filter. vlc.video.logo.disable(): (supported in vlc version >= 1.1.0) disable logo video filter. vlc.video.logo.file("file.png"): (supported in vlc version >= 1.1.0) display my file.png as logo on the screen.

Some problems may happen because of the VLC asynchronous functioning. To avoid it, after enabling logo video filter, you have to wait a little time before changing an option. But it should be fixed by the new vout implementation.

MediaDescription Object
readonly properties
vlc.mediaDescription.title: (supported in vlc version >= 2.0.2) returns title meta information field. vlc.mediaDescription.artist: (supported in vlc version >= 2.0.2) returns artist meta information field. vlc.mediaDescription.copyright: (supported in vlc version >= 2.0.2) returns copyright meta information field. vlc.mediaDescription.album: (supported in vlc version >= 2.0.2) returns album meta information field. vlc.mediaDescription.trackNumber: (supported in vlc version >= 2.0.2) returns trackNumber meta information field. vlc.mediaDescription.description: (supported in vlc version >= 2.0.2) returns description meta information field. vlc.mediaDescription.rating: (supported in vlc version >= 2.0.2) returns rating meta information field. vlc.mediaDescription.date: (supported in vlc version >= 2.0.2) returns date meta information field. vlc.mediaDescription.setting: (supported in vlc version >= 2.0.2) returns setting meta information field.

vlc.mediaDescription.URL: (supported in vlc version >= 2.0.2) returns URL meta information field. vlc.mediaDescription.language: (supported in vlc version >= 2.0.2) returns language meta information field. vlc.mediaDescription.nowPlaying: (supported in vlc version >= 2.0.2) returns nowPlaying meta information field. vlc.mediaDescription.publisher: (supported in vlc version >= 2.0.2) returns publisher meta information field. vlc.mediaDescription.encodedBy: (supported in vlc version >= 2.0.2) returns encodedBy meta information field. vlc.mediaDescription.artworkURL: (supported in vlc version >= 2.0.2) returns artworkURL meta information field. vlc.mediaDescription.trackID: (supported in vlc version >= 2.0.2) returns trackID meta information field.

read/write properties

none

methods

none

DEPRECATED APIs
DEPRECATED: Log object
CAUTION: For security concern, VLC 1.0.0-rc1 is the latest (near-to-stable) version in which this object and its children are supported.

This object allows accessing VLC main message logging queue. Typically this queue capacity is very small (no nore than 256 entries) and can easily overflow, therefore messages should be read and cleared as often as possible. readonly properties
vlc.log.messages: returns the message collection, see Messages object

read/write properties
vlc.log.verbosity: write number [-1,0,1,2,3] for changing the verbosity level of the log messages; messages whose verbosity is higher than set will be not be logged in the queue. The numbers have the following meaning: -1 disable, 0 info, 1 error, 2 warning, 3 debug.

methods

none

DEPRECATED: Messages object

CAUTION: For security concern, VLC 1.0.0-rc1 is the latest (near-to-stable) version in which this object and its children are supported.

readonly properties
messages.count: returns number of messages in the log

read/write properties

none

methods
messages.clear(): clear the current log buffer. It should be called as frequently as possible to not overflow the message queue. Call this method after the log messages of interest are read. messages.iterator(): creates and returns an iterator object, used to iterate over the messages in the log. Don't clear the log buffer while holding an iterator object.

DEPRECATED: Messages Iterator object


CAUTION: For security concern, VLC 1.0.0-rc1 is the latest (near-to-stable) version in which this object and its children are supported.

readonly properties
iterator.hasNext: returns a boolean that indicates whether vlc.log.messages.next() will return the next message.

read/write properties

none

methods
iterator.next(): returns the next message object in the log, see Message object

DEPRECATED: Message subobject


CAUTION: For security concern, VLC 1.0.0-rc1 is the latest (near-to-stable) version in which this object and its children are supported. message.severity: number that indicates the severity of the log message (0 = info, 1 = error, 2 = warning, 3 = debug) message.name: name of VLC module that printed the log message (e.g: main, http, directx, etc...) message.type: type of VLC module that printed the log message (eg: input, access, vout, sout, etc...) message.message: the message text

Use the command line


TODO: completely outdated All standard operations of VLC should be available from the GUI. However, some complex operations can only be done from the command line and there are situations in which you don't need or want a GUI. Here is the complete description of VLC's command line and how to use it. You need to be quite comfortable with command line usage to use this.
Note: Windows users have to use the --option-name="value" syntax instead of the --option-name value syntax.

Getting help
VLC uses a modular structure. The core mainly manages communication between modules. All the multimedia processing is done by modules. There are input modules, demultiplexers, decoders, video output modules, ... This chapter will only describe the "general" options, i.e. the core options. Each module adds new options. For example, the HTTP input module will add options for caching, proxy, authentication, ... By using vlc --help, you will get the basic core options. vlc --longhelp will give all the basic options (core + modules). Adding --advanced will give the "advanced options" (for advanced users). So vlc --longhelp --advanced will give you all options. You can also append --help-verbose if you want more detailed help. Also, you might want to get debug informations. To do this, use -v or -vv (this will show lower severity messages). If your console supports it, you can add --color to get messages in color.

Opening streams
The following commands start VLC and start reading the given element(s):

Opening a file
Start VLC with:
% vlc my_file

VLC should be able to recognize the file type. If it does not, you can force demultiplexer and decoder (see below). A list of all video and audio codecs supported by VLC is available on the VLC features list.

Opening a DVD or VCD, or an audio CD


Start VLC with:

For a DVD with menus:


% vlc dvd://[device][@raw_device][@[title][:[chapter][:angle]]]

In most cases, vlc dvd:// or vlc dvd://[device] will do. [device] is for example /dev/dvd on GNU/Linux or D: on Windows (complete path to your DVD drive). or (DVD without menus):
% vlc dvdsimple://[device][@raw_device][@[title][:[chapter][:angle]]]

or (VCD):
% vlc vcd://[device][@{E|P|E|T|S}[number]]

or (Audio CD):
% vlc cdda://[device][@[track]]

Receiving a network stream


To receive an unicast RTP/UDP stream (sent by VLC's stream output), start VLC with:
% vlc rtp://@:5004

If 5004 is the port to which packets are sent. 1234 is another commonly used port number. you use the default port (1234), vlc rtp:// will do. For more information, look at the Streaming Howto. To receive an multicast UDP/RTP stream (sent by VLC's stream output), start VLC with:
% vlc rtp://@multicast_address:port

To receive a SSM (source specific multicast) stream, you can use:


% vlc rtp://server_address@multicast_address:port

This only works on OSs that support SSM (Windows XP and Linux). To receive a HTTP stream, start VLC with:
% vlc http://www.example.org/your_file.mpg

To receive a RTSP stream, start VLC with:</para>


% vlc rtsp://www.example.org/your_stream

Modules selection
VLC always tries to select the most appropriate interface, input and output modules, among the ones available on the system, according to the stream it is given to read. However, you may wish to force the use of a specific module with the following options.

--intf <module> allows you to select the interface module. --extraintf <module> allows you to select extra interface modules that will be launched in addition to the main one. This is mainly useful for special control interfaces, like HTTP, RC (Remote Control), ... (see below) --aout <module> allows you to select the audio output module. --vout <module> allows you to select the video output module. --memcpy <module> allows you to choose a memory copy module. You should probably never touch that.

You can get a listing of the available modules by using vlc -l

Stream Output
The Stream output system allows vlc to become a streaming server. For more details on the stream output system, please have a look at the Streaming HowTo.

Other Options
Audio options

--noaudio disables audio output. Note that if you are streaming (ex: to a file) this has no effect (streaming copies the audio verbatim). Use --sout-xxx instead (ex: --no-sout-audio) --mono forces VLC to treat the stream in mono audio. --volume <integer> sets the level of audio output (between 0 and 1024). Also only applies to local playback (like --noaudio). --aout-rate <integer> sets the audio output frequency (Hz). By default, VLC will try to autodetect this. --desync <integer> compensates desynchronization of audio (ms). (If audio and video streams are not synchronized, use this setting to delay the audio stream) --audio-filter <string> adds audio filters to the processing chain. Available filters are visual (visualizer with spectrum analyzer and oscilloscope), headphone (virtual headphone patialization) and normalizer (volume normalizer)

Video options

--no-video disables video output. --grayscale turns video output into grayscale mode. --fullscreen ( or -f) sets fullscreen video. --nooverlay disables hardware acceleration for the video output.

--width, --height <integer> sets the video window dimensions. By default, the video window size will be adjusted to match the video dimensions. --start-time <integer> starts the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90) --stop-time <integer> stops the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90) --zoom <float> adds a zoom factor. --aspect-ratio <mode> forces source aspect ratio. Modes are 4x3, 16x9, ... --spumargin <integer> forces SPU subtitles postion. --video-filter <string> adds video filters to the processing chain. You can add several filters, separated by commas --sub-filter <string> adds video subpictures filter to the processing chain.

Desktop/Screen grab options


You can see the various options for "grabbing the desktop" (VLC's built-in screen grabber capture device) by using the GUI. See http://forum.videolan.org/viewtopic.php?f=4&t=46971

Playlist options

--random plays files randomly forever. --loop loops playlist on end. --repeat repeats current item until another item is forced --play-and-stop stops the playlist after each played item.

Network options

--server-port <integer> sets server port. --iface <string> specifies the network interface to use. --iface-addr <string> specifies your network interface IP address. --mtu <integer> specifies the MTU of the network interface. --ipv6 forces IPv6. --ipv4 forces IPv4.

CPU options
You should probably not touch these options unless you know what you are doing.

--nommx disables the use of MMX CPU extensions. --no3dn disables the use of 3D Now! CPU extensions. --nommxext disables the use of MMX Ext CPU extensions. --nosse disables the use of SSE CPU extensions. --noaltivec disables the use of Altivec CPU extensions.

Miscellaneous options

--quiet deactivates all console messages. --color displays color messages. --search-path <string> specifies interface default search path. --plugin-path <string> specifies plugin search path.

--no-plugins-cache disables the plugin cache (plugins cache speeds up startup) --dvd <string> specifies the default DVD device. --vcd <string> specifies the default VCD device. --program <integer> specifies program (SID) (for streams with several programs, like satellite ones). --audio-type <integer> specifies the default audio type to use with dvds. --audio-channel <integer> specifies the default audio channel to use with dvds. --spu-channel <integer> specifies the default subtitle channel to use with dvds. --version gives you information about the current VLC version. --module <module> displays help about specified module. (Shortcut: -p)

Item-specific options
There are many options that are related to items (like --novideo, --codec, --fullscreen). For all of these, you have the possibility to make them item-specific, using ":" instead of "--" and putting the option just after the concerned item. Examples:
% vlc file1.mpg :fullscreen file2.mpg

will play file1.mpg in fullscreen mode and file2.mpg in the default mode (which is generally no fullscreen), whereas
% vlc --fullscreen file1.mpg file2.mpg

will play both files in fullscreen mode


% vlc --fullscreen file1.mpg :sub-file=file1.srt :no-fullscreen file2.mpg :filter=distort

will play file1.mpg in windowed (no-fullscreen) mode with the subtitles file file1.srt and will play file2.mpg with video filter distort enabled in fullscreen mode (item-specific options override global options).

Filters
These are the old style VLC filters. They only apply to on screen display and thus cannot be streamed. However, on version 1.1.11 you are still able to apply these filters in transcode module using parameter vfilter. More information can be found on Advanced Streaming Using the Command Line.

Deinterlacing video filter


Module name: deinterlace

--deinterlace-mode {discard,blend,mean,bob,linear,x,yadif,yadif (2x),phosophor,ivtc} choose a deinterlacing mode.

Invert video filter


Module name: invert

Image properties filter


Module name: adjust

--contrast <float> Image contrast in the 0-2 range. --brightness <float> Image brightness in the 0-2 range. --hue <integer> Image hue in the 0-360 range. --saturation <float> Image saturation in the 0-3 range. -gamma <float> Image gamma in the 0-10 range.

Wall video filter


Module name: wall This filter splits the output in several windows.

--wall-cols <integer> Number of columns. --wall-rows <integer> Number of rows. --wall-active <string> Select the windows you want to display. To select windows 2 and 4 you would write --wall-active 2,4. When this option isn't specified, all windows are displayed.

Video transformation filter


Module name: transform

--transform-type {90,180,270,hflip,vflip} Select rotation angle or symmetry.

Distort video filter


Module name: distort

Clone video filter


This filter clones the output window. Module name: clone

--clone-count <integer> Number of clones. --clone-vout-list <string> Comma separated string of video output modules.

Crop video filter


Module name: crop

--crop-geometry <string> Set the geometry of the zone to crop. This is set as <width> x <height> + <left offset> + <top offset>. --autocrop Enable automatic black border cropping.

Motion blur filter


Module name: motionblur

blur-factor <integer> Blur factor in the 1-127 range.

Video pictures blending


Module name: blend

Video scaling filter


Module name: scale

Subpictures Filters
These are the new VLC filters. They can be streamed.

Time display sub filter


Module name: time

--time-format <string> Time format string. You can use the following special characters %Y = year, %m = month, %d = day, %H = hour, %M = minute, %S = second. --time-x <integer> X offset from the left in pixels. --time-y <integer> Y offset from the top in pixels.

Marquee display sub filter


Module name: marq

--marq-marquee <string> Marquee text to display. --marq-x <integer> X offset from the left in pixels. --marq-y <integer> Y offset from the top in pixels. --marq-timeout <timeout> Defines the time the marquee must remain displayed in milliseconds. Default value is 0 (remain forever).

Logo video filter


Module name: logo This filter can be used both as an old style filter or a subpictures filter.

--logo-file <string> Full path of the PNG file to use. --logo-x <integer> X offset from the left in pixels. --logo-y <integer> Y offset from the top in pixels. --logo-transparency <integer> You can set the logo transparency value here (from 0 for full transparency to 255 for full opacity).

Note: You can move the logo by left-clicking on it.

Windows
You can uninstall VLC from Add/Remove Programs (Programs and Features in Windows 7) located in the Control Panel. Search for VLC media player and right click, then select "Uninstall/Change". Follow the prompts to finish the uninstallation.

Alternatively, you can browse to VLC's installation directory (for a typical install, go to your C: Drive and look for Program Files (if 64-bit, Program Files (x86) )VideoLANVLC and double-click on the uninstall link and follow the prompts to uninstall.

Mac OS X
Drag the VLC application to your trash can. You can also remove the configuration file and the cache files in ~/Library/Preferences/VLC/. There is an AppleScript on the disk-image which lets you do this automatically. If that did not work, you can double-click on the Applications icon. This will bring up a list of all applications on your Mac. Scroll through the list of Applications, then press and hold the Ctrl button to bring up a table of options and actions. Click on "move to trash". Finally, if the previous processes failed, you can try downloading a third-party uninstaller program to

uninstall it, such as AppCleaner.

BeOS
Delete the vlc-version directory. You can also remove the configuration file /boot/home/config/settings/vlcrc.

Debian GNU/Linux
Remove the packages that you installed:
# apt-get remove --purge vlc libdvdcss2

GNU/Linux Redhat, Mandrake and SuSE


Uninstall the RPM packages that you installed:
# rpm -e vlc-version vlc-mad-version wxvlc-version libdvdcss2-version libdvdpsi1-version

Ubuntu
Remove VLC Media Player by entering this command in the Terminal.
# sudo apt-get remove vlc

Or you can also search VLC in the Ubuntu Software Center and click on Remove to uninstall it.

If you compiled VLC from source


Go to the directory containing VLC sources and execute
# make uninstall

You can then remove the VLC sources.

Introduction
This appendix describes the language used for writing dynamic web pages for the HTTP interface. Pages must be placed in the share/http folder in either VLC's folder (Windows, Mac) or /usr/share/vlc/share/http or /usr/local/share/vlc/share/http (or wherever vlc's shared files are installed). Some files are handled a bit specially:

Files beginning with '.' are not exported. A '.access' file will be opened and the http interface will expect to find at the first line a login/password (written as login:password). This login/password will be used to protect all files in this directory. Be careful that only files in this directory will be protected. (sub-directories won't be protected.)

A '.hosts' file will be opened and the http interface will expect to find a list of network/mask pairs separated by new line, for instance 192.168.0.0/255.255.255.0. If this file is present, then the default behaviour is to deny access from hosts which don't match any of the network/mask pairs to all the files of the directory. If the file is not present, then any host has access to the files of the directory. Be careful that only files in this directory will be protected. (sub-directories won't be protected.) The file <dir>/index.html will be exported as <dir> and <dir>/ and not as index.html.

The MIME type is set by looking at the file extension and cannot be specified nor modified for a specific file. Unknown extensions will have "application/octet-stream" as MIME type. You should avoid exporting big files. Each file is indeed first loaded into the memory before being sent to the client, so please be careful.

VLC macros
Each time a .html/.htm page is requested, it is parsed by VLC before being sent. The parser searches for the VLC macros, and executes or substitutes them. Moreover, URL arguments received by the GET method can be interpreted. A VLC macro looks like:
<vlc id="macro-name" param1="macro-parameters1" param2="macro-parameters2" />

"id" is the only mandatory field, param1 and param2 may or may not be present and depend on the value of "id". You should take care that you have to respect this syntax, VLC won't like invalid syntax. (It could easily leads to crashes). Examples: Correct:
<vlc id="value" param1="version" />

Incorrect:
<vlc id="value" param1="version" > (missing tag ending) <vlc id=value param1="version" /> (missing "" )

Valid macros are:


control (1 optional parameter) include (1 parameter) get (2 parameters) set (2 parameters) rpn (1 parameter)

if (1 optional parameter) else (no parameter) end (no parameter) value (1 optional parameter) foreach (2 parameters)

For powerful macros, you may use these tools:


RPN Evaluator (see part 2) Stacks: The stack is a place where you can push numbers and strings, and then pop them backs. It's used with the little RPN evaluator. Local variables: You can dynamically create new variables and changes their values. Some local variables are predefined: o url_value: parameter of the URL o url_param: 1 if url_value isn't empty else 0 o version: the VLC version o copyright: the VLC copyright o vlc_compile_time, vlc_compile_by, vlc_compile_host, vlc_compile_domain, vlc_compiler, vlc_changeset: information on the VLC build o stream_position, stream_time, stream_length, stream_state: information on the currently playing stream o volume: current volume setting

Remark: The stacks, and local variables context is reset before the page is executed.

The RPN evaluator


RPN means Reverse Polish Notation.

RPN Introduction
RPN may look strange but it's a fast and easy way to write expressions. It also avoids the use of ( and ). Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *. The idea behind it is: if we have a number or a string (using ''), push it on the stack. If it is an operator (like +), pop the arguments from the stack, execute the operators and then push the result onto the stack. The result of the RPN sequence is the value on the top of the stack. A step by step explanation of the sequence 1 2 + 5 * is shown below, to illustrate this process: Stack Contents empty 1 1|2 3 Word 1 2 + 5 1 is pushed on the stack 2 is pushed onto the stack, 'above' 1 The plus operator results in removal of 1 and 2 from the stack, then write 3 onto the stack 5 is pushed on the stack Action taken on the stack

3|5 15

The multiplication operator removes 3 and 5 and writes 15 onto the stack. Final result.

Operators
Notation: ST(1) means the first stack element, ST(2) the second one ... and op is the operator. You have access to :

Standard arithmetics operators: +, -, *, /, % these ones push the result of ST(1) op ST(2) onto the stack Binary operators: ! (push !ST(1)); ^, &, |: push the result ST(1) op ST(2) test: =, <, <=, >, >=: execute ST(1) op ST(2) and push -1 if true else 0 string functions: o strcat: pushes the result of 'ST(1)ST(2) o strcmp: compares ST(1) and ST(2) (0 if equal) o strncmp: compares the first ST(1) characters of ST(2) and ST(3) (0 if equal) o strsub: extracts characters ST(2) to ST(1) of string ST(3) o strlen: pushes the length of ST(1) o str_replace: replaces string ST(2) with ST(1) in ST(3) o url_encode: encodes non-alphanumeric characters of ST(1) as %XX so that they can be safely passed as GET or POST variables o url_extract: performs the reverse operation of url_encode o addslashes: protects single quotes (') and double quotes (") of ST(1) with backslashes (\) so that they can be safely passed to a VLC playlist function o stripslashes: performs the reverse operation of addslashes o htmlspecialchars: encodes &, ', ", <, and > of ST(1) as their &stuff; HTML counterpart, so that they don't interact with HTML tags o realpath: parses ST(1) as a filename path, and pushes an absolute path to that file, removing ~ and ../ stack manipulation: o dup: pops ST(1) and pushes the same string twice o drop: pops ST(1) and drops it o swap: exchanges ST(1) and ST(2) o flush: empties the stack variables manipulation: o store: stores ST(2) in a local variable named ST(1) o value: pushes the value of the local variable named ST(1) player control: o vlc_play: plays the playlist item whose ID is ST(1), and pushes the return value of the play function (0 in case of success); see playlist functions below o vlc_stop: stops the playlist o vlc_pause: pauses the playlist

o o o o

o o o o o o o

o o

vlc_next: plays the next playlist item vlc_previous: plays the previous playlist item vlc_seek: seeks the current input to a location defined in ST(1), for instance+3m (minutes), -20s, 45%, 1:12, 1h12m25s vlc_var_type: pushes the type of the variable ST(2) of object ST(1); the type is one of these strings VLC_VAR_BOOL, VLC_VAR_INTEGER, VLC_VAR_HOTKEY, VLC_VAR_STRING, VLC_VAR_MODULE, VLC_VAR_FILE, VLC_VAR_DIRECTORY, VLC_VAR_VARIABLE, VLC_VAR_FLOAT, UNDEFINED (no such variable) or INVALID (no input stream); the object is one of VLC_OBJECT_ROOT, VLC_OBJECT_VLC, VLC_OBJECT_INTF, VLC_OBJECT_PLAYLIST, VLC_OBJECT_INPUT, VLC_OBJECT_VOUT, VLC_OBJECT_AOUT or VLC_OBJECT_SOUT vlc_var_set: sets variable ST(2) of object ST(1) to ST(3) vlc_var_get: pushes the value of the variable ST(2) of object ST(1) vlc_object_exists: checks if object ST(1) exists vlc_config_type: pushes the type of the configuration variable ST(1); see vlc_var_type for a list of types vlc_config_set: sets configuration variable ST(1) to ST(2) vlc_config_get: pushes the value of the configuration variable ST(1) vlc_config_save: saves the modification made to the configuration variables of module ST(1) to the configuration file (ST(1) may be empty, in which case the whole configuration is saved) and pushes the return status (0 in case of success) vlc_config_reset: resets the configuration file to the default value (use with caution) vlc_volume_set: sets the volume value to ST(1) which can be a raw value between 0 and 1024, or a relative one between 0% and 400%, where 1% is equal to the maximum volume value divided by 400 (thus, the maximum volume value is equal to 400%, that is 1024). If ST(1) begins with a '+' (or '-') operator, the volume is increased (or decreased) by the raw value which follows this operator vlc_get_meta: pushes the value of the meta information named by ST(1) from the stream being played. Available meta names are: "Title" (or "TITLE"), "Author", "Artist" (or "ARTIST"), "Genre" (or "GENRE"), "Copyright", "Album/movie/show title" (or "ALBUM"), "Track number/position in set", "Description", "Rating", "Date", "Setting", "URL", "Language", "Now Playing", "Publisher" vlm_command or vlm_cmd: sends the command that is on the stack to the VLM (VideoLan Manager). Since the command can contain more than one component on the stack, it must be ended by an ';' or an empty string pushed on the stack (e.g.: param1="';' 'command' 'my' 'this is' vlm_command"). Once the VLM has executed the command, the return value is assigned to the local variable vlm_value and the error string (if available) is assigned to vlm_error snapshot: takes a snapshot

playlist functions: o playlist_add: adds MRL ST(1) to the playlist, with name ST(2) and returns the playlist ID associated to this item; special characters must be escaped with addslashes first; it is very convenient to call 'toto.mpg' playlist_add vlc_play o playlist_empty: clears the playlist of all items o playlist_move: moves playlist item at position ST(2) to position ST(1) o playlist_delete: deletes playlist item ID ST(1) o playlist_sort: sorts the playlist using the mode ST(2) and order ST(1). Available order values are 0 (normal order) and 1 (reverse order). Available mode values are 0 (sort by ID), 1 (sort by title), 2 (sort by title, nodes first), 3 (sort by author), 4 (sort by genre),

o o o

5 (sort randomly), 6 (sort by duration), 7 (numerically sort by title) and 8 (sort by album) services_discovery_add: adds the service discovery ST(1) to the playlist services_discovery_remove: removes the service discovery ST(1) from the playlist services_discovery_is_loaded: checks if the service discovery ST(1) is loaded in the playlist, and pushes the answer on the stack

The macros
The control macro
The use of the control macro is now deprecated in favour of the RPN functions above. The documentation is provided here for the maintainance of HTML pages still using this old API. The main problem with this API is that there is no way to retrieve the playlist ID of the last added item. When asking for a page, you can give arguments to it through the url. (e.g. using a <form>). Ex: http://host:port/page.html?var=value&var2=value2&... The "control" macro tells a page to parse these arguments and to execute the ones that are allowed. param1 of this macro says which commands are allowed. If empty, all commands will be permitted. Some commands require an argument that must be passed in the URL too.

URL commands o Name, Argument, Description o play, item (integer), Play the specified playlist item o stop, ,Stop o pause, Pause o next, , Go to next playlist item o previous, , Go to previous playlist item o add, mrl (string), Add a MRL to the playlist o delete, item (integer), Delete the specified playlist item or list of playlist items o empty, , Empty the playlist o close, id (hexa), Close a specific connection o shutdown, , Quit VLC

For example, you can restrict execution of the shutdown command to protected page (through a .access file), using the control macro in all unprotected pages.

The include macro


This macro is replaced by the contents of the file param1. If the file contains vlc macros, they are correctly parsed and replaced.

The get macro


This macro will be replaced by the value of the configuration variable which name is stored in param1 and which type is given by param2.

param1 must be the name of an existing configuration variable. param2 must be the right type of the variable. It can be one of int, float, or string. Example:
<vlc id="get" param1="sout" param2="string" /> will be replaced in the output page by the value of sout.

The set macro


This macro allows to set the value of a configuration variable. The name is given by param1 and the type by param2 (like for get). The value is retrieved from the url using the name given in param1. For example, if player.html contains
<vlc id="set" param1="sout" param2="string" />

and if you browse at <emphasis> http://host:ip/player.html?sout=sout_value</emphasis>, the sout variable will be set to "sout_value". If the URL doesn't contain sout, nothing will be done.

The rpn macro


This macro allows you to interpret RPN commands. (See II).

The if,else,end macro


This macro allows you to control the parsing of the HTML page. If param1 isn't empty, it is first executed with the RPN evaluator. If the first element from the stack is not 0, the test value is true, else false..
<vlc id="if" param1="1 2 =" /> <!-- Never reached --> <vlc id="else" /> <p> Test succeed: 1 isn't equal to 2 </p> <vlc id="end" />

You can also just use "if" and "end".

The value macro


If param1 isn't empty, it is first executed with the RPN evaluator. The macro is replaced with the value of the first element of the stack. Note: If the element is the name of a local variable, its value will be displayed instead of its name.

The foreach,end macro


param1 is the name of the variable that will be used for the loop. param2 is the name of the set to be built:

integer: take the first element from the stack to construct a set of integer. The stack element should be a string like: first:last[:step][,first2:last2[:step2][,...] (Ex:1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8) directory: take the first element of the stack as the base directory and construct a set of filename and directly in it. Each element has the following fields: o basename: file/directory name o name: complete file/directory name (including path) o ext: file extension in lowercase o type: "directory" or "file" or "unknown" o size: size of the file o date playlist: set based on the playlist with fields: current is 1 if item is currently selected, 0 else. index is the index value, that can be used by the play or delete control command. name is the

name of the item.

"information": Create information for the current playing stream. name is the name of the category, value is its value, info is a new set that can be parsed with a new foreach (subfields of info are name and value). input variables such as "program", "title", "chapter", "audio-es", "video-es" and "spu-es": Create lists for the current playing stream. Every list has the following fields: o name: item name (language for elementary streams, tracks, etc.) to display in places where a human-readable format is preferred o id: item ID to pass to the RPN function vlc_var_set, and returned by vlc_var_get o selected: 1 if the item is selected, 0 otherwise the name of a foreach variable if it's a set of set of value.

<vlc id="foreach" param1="cat" param2="informations" /> <vlc id="value" param1="cat.name" /> <ul> <vlc id="foreach" param1="info" param2="cat.info" /> <li> <vlc id="value" param1="info.name" /> : <vlc id="value" param1="info.value" /> </li> <vlc id="end" /> </ul> <vlc id="end" />

For more details, have a look at the share/http directory of the VLC source tree...

Starting with VLC media player 0.9.0, format string variables can be used with the following options:

--marq-marquee --snapshot-path (when specifying a full image path, not a directory) --snapshot-prefix --image-out-prefix (or --scene-prefix in 1.0.0 and newer)

--msn-format (windows only) file access output dst/url (like in std{access=file,mux=ts,dst=THIS})

There are two kinds of format string variables: time variables and meta variables.

Time
Time variables are those defined by the strftime C function. Those include:

%Y : year %m : month %d : day %H : hour %M : minute %S : second

For an extensive list have a look at man strftime.

Meta
Meta variables are VLC specific. The complete list is:

$a : artist $b : album $c : copyright $d : description $e : encoded by $f : frame count $g : genre $l : language $n : track num $p : now playing $r : rating $s : subtitles language $t : title $u : url $A : date $B : audio bitrate (in kb/s) $C : chapter (as in DVD chapter number) $D : duration $F : full name with path $I : title (as in DVD title number) $L : time left $N : name (media name as seen in the VLC playlist) $O : audio language $P : position (in %) $R : rate $S : audio sample rate (in kHz) $T : time code of the video

$U : publisher $V : volume $_ : new line $<any other char> : <any other char> (for example: $$ transforms to $)

You can insert a space between the $ sign and the character to tell it to not display anything if the meta data isn't available. For example: $ T instead will display "" if no time is available while $T would display something like "01_22_13" (for a snapshot from one hour, 22 minutes and 13 seconds in a video).

Source code
If you want to know how this works, check out src\text\strings.c (str_format_meta function)[1]

Introduction
Starting with version 0.9.0, VLC gives you the possible to implement your own playlist loading modules easily. Such modules can do stuff like:

URL translation: You give it the youtube webpage URL and VLC starts playing the
corresponding video; Text playlist parsing: You use some custom text playlist format.

Lua playlist scripts shipped with VLC are stored in the following directory:

C:\Program Files\VideoLAN\VLC\lua\playlist\ on Windows; VLC.app/Contents/MacOS/share/lua/playlist/ on Mac OS X; /usr/share/vlc/lua/playlist/ on Linux.

You can add your own Lua playlist scripts in this directory or in your VLC's preferences folder "lua/playlist" subdirectory on Windows or Mac OS X and in your local VLC shared data folder on Linux (~/.local/share/vlc/lua/playlist).

Simple Examples
URL translation
What we want to do Lets say that we want VLC to open Google Video links automatically. Google Video pages have URLs like
http://video.google.com/videoplay?docid=-5784010886294950089

to the URL of the corresponding Google Video Playlist file which is


http://video.google.com/videogvp?docid=-5784010886294950089

Probe

The Lua script is going to be made of 2 functions. The first one is the probe() function. This function tells VLC if the Lua script should be used (function returns true) or not (function returns false). Here it would look like:
function probe() if vlc.access ~= "http" then return false end if string.match( vlc.path, "video.google.com/videoplay" ) then return true else return false end end

Lets analyse that function step by step. First we check that VLC is using HTTP. If it isn't (for example it's reading a file off your hard drive or a DVD), we don't want to trigger the Google Video URL translation. The vlc Lua object provides vlc.access which should be equal to string "http". Then we check that the URL is a Google Video page. This is easily done by trying to find the "video.google.com/videoplay" string in vlc.path. Note that the same function can be written as
function probe() return vlc.access == "http" and string.match( vlc.path, "video.google.com/videoplay" ) end

Parse If the probe() function returns true, VLC will use the parse() to ask for the new playlist item(s) which need to be added.
function parse() item = {} item.path = "http://" .. string.gsub( vlc.path, "videoplay", "videogvp" ) item.name = "Some Google video playlist" return { item } end

We create a new playlist item (a Lua table). We set the item's path to the appropriate string: 1/ we prepend "http://" since the vlc.path string doesn't include that part of the original URL and 2/ we replace "videoplay" by "videogvp". We also set the new playlist item's name to "Some Google video playlist". We then return the new playlist to VLC (a Lua table which basically represents a list of items). A shorter version would be:
function parse() return { { path = "http://" .. string.gsub( vlc.path, "videoplay", "videogvp" ); name = "Some Google video playlist" } } end

Saving that to a file To make that script available to VLC, simply create a new something.lua file in one of the directories listed in the introduction (You should also remove the googlevideo.lua file shipped with VLC to make sure that it isn't used instead of your new script).

Text Playlist Parsing


In the previous example we translated a URL to another URL. This new URL redirects VLC to a Google Video Playlist which is basically a text file. This file needs to be read to get the final video's true URL. Here's what such a file would look like if you were to open it with a text editor:
# download the free Google Video Player from http://video.google.com/ gvp_version:1.1 url:http://vp.video.google.com/videodownload?version=0&secureurl=uQAAAAznrU3q0BdxTkn_lLSpVJQ4a4JBDFAc5V8lB5OXX PqJ6Dts-Hq5Ll-2dIgeBIDGN1ZAMv65MMP0Zu5cwbIrgAhinWRNl-UtZCU4CgPpnYrR5IwLCksEXjs4o89dTT8MQxWcSo3lFPKulC0_TT9L0EW_IyANloBjyoEld5KGkcXdUTtXvj1TmaRh5Yvq4zIfxmYPQ4fehJY6rucnqMQLm8NT D32NvVpSp1bJ06ub_YJgDz4Nic-_qpW0rnFReSyrQ&sigh=zy8gMs8AhAM0Hv3N1PR7djz3m2I&begin=0&len=72640&docid=5784010886294950089 docid:-5784010886294950089 duration:72640 title:Penguins go for a stroll description:African penguins caught a breath of fresh air as they were out for a stroll through Tokyo's aquarium. Ikebukuro Sunshine Aquarium offer spectators a chance to get a closer encounter with penguins as they are taken for a walk through the aquariums compound. description: description:During the parade the penguins were separated from spectators, mainly children, by portable fences on wheels which were pushed by the zookeepers. The fence ensures they don't run away and also prevents them from biting spectators. description: description:"I came up with this idea to let people get a close look at penguins walking." said Keeper Masahiro Tomiyama, adding only penguins born and raised at the aquarium can walk outside their cage without feeling stressed by all the attention. description: description:Reuters 16094/06 description:Keywords: animals, cute, sweet, funny, ITN Source.

Probe The first thing we need to worry about is making sure that the file we're playing is a Google Video Playlist (GVP) file. We could rely on the URL, but that would prevent playing GVP files from our hard drive. Fortunately, the file's contents, especially the "gvp_version:" string seem specific to GVP files. We'll thus try reading a bunch of characters from the begining of the file and look for the "gvp_version:" string.
function probe() return string.match( vlc.peek( 512 ), "gvp_version:" ) end

The vlc.peek( <number of chars> ) function asks VLC to return the first <number of chars> characters. If the string "gvp_version:" isn't found in a file's first 512 characters, we're almost 100% sure that it's not a valid GVP file. Parse

We now need to read information from the file to create our new playlist item. A simple version would only fetch the URL:
function parse() item = {} while true do line = vlc.readline() if not line then break end if string.match( line, "^url:" ) then item.path = string.sub( line, 5 ) end end return { item } end

We read all the file's lines using the vlc.readline() function. If we encounter the line starting with "url:" (string.match( line, "url:" ) would match lines containing "url:", while string.match( line, "^url:" ) only matches those starting with "url:"), we use that as our new item's path. If vlc.readline() returns nil, this means that we've finished reading the file so we break out of the while loop and return our new playlist. This simple parse() function unfortunately discards all the other usefull meta information available in the GVP file. Lets try to use it:
function parse() item = {} while true do line = vlc.readline() if not line then break end if string.match( line, "^url:" ) then item.path = string.sub( line, 5 ) elseif string.match( line, "^title:" ) then item.name = string.sub( line, 7 ) elseif string.match( line, "^duration:" ) then item.duration = string.sub( line, 10 ) / 1000 elseif string.match( line, "^description:" ) then if item.description then item.description = item.description .. "\n" .. string.sub( line, 13 ) else item.description = string.sub( line, 13 ) end end end return { item }

end

Getting the video's title works like the URL parameter. The duration is a bit more tricky. GVP uses times in miliseconds while VLC wants a time in seconds. We thus have to divide it by 1000. For the description, it works like the URL and title parameters except that a GVP file can have more than one description parameter. If we read more than one parameter we thus concatenate the different description lines.

Reference
Information about the VLC Lua scripts is available in your VLC installation in the lua subdirectory.

Global VLC Lua README Playlist script specific README

Scripts shipped with VLC


Scripts for popular playlist formats and video websites are available in the default VLC installer:

dailymotion.lua: URL translation for Daily Motion video pages; googlevideo.lua: URL translation for Google Video video pages; metacafe.lua: URL translation for metacafe video pages and flash player; youtube.lua: URL translation for YouTube video pages and flash player (including fullscreen video URLs); youtube_hompage.lua: Parse YouTube homepage and browse page.

Introduction
Overview
VideoLAN is a complete software solution for video streaming, developed by students of the Ecole Centrale Paris and developers from all over the world, under the GNU General Public License (GPL). VideoLAN is designed to stream MPEG videos on high bandwidth networks. The VideoLAN solution includes:

VLS (VideoLAN Server), which can stream MPEG-1, MPEG-2 and MPEG-4 files, DVDs, digital satellite channels, digital terrestial television channels and live videos on the network in unicast or multicast VLC (initially VideoLAN Client), which can be used as a server to stream MPEG-1, MPEG-2 and MPEG-4 files, DVDs and live videos on the network in unicast or multicast ; or used as a client to receive, decode and display MPEG streams under multiple operating systems

Here is an illustration of the complete VideoLAN solution:

Global VideoLAN solution More details about the project can be found on the VideoLAN Web site.

VideoLAN software
VLC Media Player VLC works on many platforms: Linux, Windows, Mac OS X, BeOS, *BSD, Solaris, Familiar Linux, Yopy/Linupy and QNX. It can read:

MPEG-1, MPEG-2 and MPEG-4 / DivX files from a hard disk, a CD-ROM drive, ... DVDs and VCDs from a satellite card (DVB-S) from a camcorder (DV) MPEG-1, MPEG-2 and MPEG-4 streams from the network sent by VLS or VLC's stream output

VLC can also be used as a server to stream:


MPEG-1, MPEG-2 and MPEG-4 / DivX files, DVDs, from an MPEG encoding card, from a camcorder DV,

to:

one machine (i.e. to one IP address): this is called unicast, a dynamic group of machines that the clients can join or leave (i.e. to a multicast IP address): this is called multicast,

in IPv4 or IPv6. To get the complete list of VLC's possibilities on each platform supported, see the VLC features page. Note: VLC doesn't work on Mac OS 9, and probably never will. ==== ==== SAP- SAP / SDP VideoLAN. -SAP- IPv4 IPv6, VLCs annouces . -SAP- Linux Mac OS X.

Muxers and codecs


What is a codec ?
To fully understand the VideoLAN solution, you must understand the difference between a codec and a container format. A codec is a compression algorithm, used to reduce the size of a stream. There are audio codecs and video codecs. MPEG-1, MPEG-2, MPEG-4, Vorbis, DivX, ... are codecs.

What is a container format ?

To start off, think of a container format as a standard shipping box. You get a box in the mail and you think, "Cool! What's inside." You don't really care about the box itself, you care about what's in that box. The problem? You can't see into the box. So what do you do? You get a knife and cut it open. A container format follows this same basic idea. It contains one or several streams already encoded by codecs. Very often, there is an audio stream and a video one. AVI, Ogg, MOV, ASF, MP4 ... are container formats. The streams contained can be encoded using different codecs. In a perfect world, you could put any codec in any container format. Unfortunately, there are some incompatibilities. You can find a matrix of possible codecs and container formats on the features page.

Encoding a video
This is the first step where you are going to create the shipping box. First you need to encode your file. That means that a file, wheter it is an audio, video file, is compressed to another format that normally takes up less physical drive space than the previous format. Common video encoding methods are DivX, MPEG-1, MPEG-2, MPEG-4 ... most common audio encoding method is MP3 or ogg-vorbis. Then you have to mux (or multiplex). This means basically a process where separate parts of the video (or streams) are joined together into one file.

Playing a video
Now that you have your box, you need to open it before you can see the content. That's exactly what VLC will do. To decode a stream, VLC first demuxes it. This means that it reads the container format and separates audio, video, and subtitles, if any. Demuxing files doesn't weaken the video nor audio quality, it doesn't do anything for these data streams, it just simply saves them into separate files, each containing one element of the original file. Then, each of these is passed to a decoder that does the mathematical processing to decompress the stream. There is a particular thing about MPEG:

MPEG is a codec. There are several versions of it, called MPEG-1, MPEG-2, MPEG-4, ... MPEG is also a container format, sometimes referred to as MPEG System. There are several types of MPEG: ES, PS, and TS.

When you play an MPEG video from a DVD, for instance, the MPEG stream is actually composed of several streams (called Elementary Streams, ES): there is one stream for video, one for audio, another for subtitles, and so on. These different streams are mixed together into a single Program Stream (PS). So, the .VOB files you can find in a DVD are actually MPEG-PS files. But this PS format is not adapted for streaming video through a network or by satellite, for instance. So, another format called Transport Stream (TS) was designed for streaming MPEG videos through such channels.

Intro
The easier way to start streaming with VLC is by using one of the graphical user interfaces. These are the wxWindows and skinnable interfaces for Windows and GNU/Linux and the Mac OS X native interface.

Streaming using the Wizard


The Streaming/Transcoding Wizard leads you step by step through the process of streaming your media on a network or saving it to your hard drive. This Wizard offers easy to use menus but provides a restricted set of options. Note: The wizard is only available on the wxWindows interface.

Launching the wizard


To launch the Streaming/Transcoding Wizard open the "File" menu, and select the Wizard menu item.

Launching the Wizard

Wizard dialog
First select the type of task:

Stream to network: Choose this option if you want to stream media on network. Transcode/Save to file: Choose this option if you want to change a file's audio codec and/or
video codec, its bitrate, and/or encapsulation method.

The Wizard Dialog

Input selection
Select a stream (such as a file, a network stream, a disk, a capture device ...) by selecting the Choose... dialog or an existing item in your playlist, using the Existing playlist item option.

Partial Extract: To read only part of the stream, check the "Enable" checkbox and choose a start and
end date (in seconds). This option should only be used with streams you can control such as files or discs but not network streams or capture devices.

Wizard input selection

Wizard input selection from playlist

Streaming methods
If you chose Stream to network option, you can now specify the streaming method. Available methods are:

RTP/UDP Unicast: Stream to a single computer. Enter the client's IP address (in the 0.0.0.0 -

223.255.255.255 range). RTP/UDP Multicast: Stream to multiple computers using multicast. Enter the IP address of the multicast group (in the 224.0.0.0 to 239.255.255.255 range). HTTP: Stream by using the HTTP protocol. If you leave the Destination text box empty, VLC will listen on all the network interfaces of the server on port 8080. Specify an address, port and path on which to listen using the following syntax [ip][:port][/path]. For instance, 192.168.0.1:80/stream will make VLC listen on the interface carrying the 192.168.0.1 IP address, on the 80 TCP port, in the /stream virtual file.

Wizard streaming method

Transcoding options
If you chose the Transcode/Save to file option, you can now specify the new audio and video codecs and bitrates you want you input converted to. (See <xref linkend="smc" endterm="tsmc" />)

Wizard transcode

Encapsulation method
Choose the method format. The UDP streaming methods require MPEG TS encapsulation. The HTTP streaming method can be used with the MPEG PS, MPEG TS, MPEG 1, OGG, RAW or ASF encapsulation. Saving to a file can be done using any encapsulation format compatible with the chosen codecs. (See <xref linkend="smc" endterm="tsmc" />)

Wizard encapsulation method

Streaming options
If you chose to Stream to network you can now specify several options.

Time To Live (TTL) This sets the numbers of routers your stream can go through, for UDP

unicast and unicast access methods. If you do not know what this means, you should leave the default value. Note: With UDP multicast, the default TTL is set to 1, meaning that your stream won't get accross any router. You may want to increase it if you want to route your multicast stream. SAP Announce To advertise your stream over the network when using the UDP streaming method, using the SAP protocol, enter the name of the stream in the text input and check the checkbox. This is NOT available for the HTTP streaming method.

Wizard streaming options

Save to file destination


If you chose Transcode/Save to file you can now specify the file you want to save the stream to.

interface

Wizard save file - wxWindows

You can now select the Finish button to start streaming/converting the source.

Streaming using the GUI


Introduction
A second way to set up a streaming instance using VLC is using Stream Output panel in the Open... dialog of the wxWindows (Windows / GNU Linux), skinnable (Windows / GNU Linux) and MacOS X interfaces. Streaming methods and options used 99% of time should be available in this panel. To stream the opened media, check the "Stream output" or "Stream/Save" checkbox in the "Open File/Disc/Network Stream/Capture Device" dialog and click on the "Settings" button.

Open file dialog wxWindows interface

dialog - Mac OS X interface

Open file

Note that "Capture" is not available as an option in Mac OSX because VLC does not support live streaming of audio or video under Mac OSX.

The Stream Output dialog

output dialog - wxWindows interface

Stream

- wxWindows interface Stream Output MRL

Stream output dialog

On the wxWindows interface, a text box displays the Stream Output MRL (Media Resource Locator). This is updated as you change options in the Stream output dialog. For more information on how to edit the Stream Output MRL read <xref linkend="cmdline" endterm="tcmdline" />. Output methods

Play localy: display the stream on your screen. This allows you to display the stream you are

actually streaming. Effects of transcoding, rescaling, etc. can be monitored locally using this function. File: Save the stream to a file. The Dump raw input option allows you to save the input stream as it is read by VLC, without any processing. HTTP: Use the HTTP streaming method. Specify the IP address and TCP port number on which to listen.

MMSH: This access method allows you to stream to Microsoft Windows Media Player. Specify the IP address and TCP port number on which to listen. Note: This will only work with the ASF
encapsulation method. UDP: Stream in unicast by providing an address in the 0.0.0.0 - 223.255.255.255 range or in multicast by providing an address in the 224.0.0.0 - 239.255.255.255 range. It is also possible to stream to IPv6 addresses. Note: This will only work with the TS encapsulation method. RTP: Use the Real-Time Transfer Protocol. Like UDP, it can use both unicast and multicast addresses.

Note: UDP, HTTP, MMSH, and RTP methods require you to select the Stream option on the MacOS X interface. (See <xref linkend="smc" endterm="tsmc" />) Encapsulation method Select an encapsulation method that fits the codecs and access method of your stream, among MPEG TS, MPEG PS, MPEG 1, OGG, Raw, ASF, AVI, MP4 and MOV. (See <xref linkend="smc" endterm="tsmc" />) Transcoding options Enable video transcoding by checking the "Video Codec" checkbox. Choose a codec from the list. You can also specify an average bitrate and scale the input. (See <xref linkend="smc" endterm="tsmc" />) Enable audio transcoding by checking the "Audio Codec" checkbox. Choose a codec from the list. You can also specify an average bitrate and the number of audio channels to encode. (See <xref linkend="smc" endterm="tsmc" />) Miscellaneous options Select methods to announce your stream. You can use SAP (Service Announce Protocol) or SLP (Service Location Protocol). You must also specify a channel name. The Mac OS X interface also allows you to export the description (SDP) file of a RTP session using the internal HTTP or RTSP server of VLC, or as a file. This can be done using the according checkboxes. The SDP URL text box allows to give the url or destination where the SDP file will be available.

Structure of stream output


Stream output is the name of the feature of VLC that allows to output any stream read by VLC to a file or as a network stream instead of displaying it. Different kind of processing can be applied to the stream during this process (transcoding, re-scaling, filters, re-muxing...). Stream output includes different modules, each of them having different capabilities. You can chain modules to enhance the possibilities. Here is the list of the modules currently available:

standard allows to send the stream via an access output module: for example, UDP, file, HTTP, ... You will probably want to use this module at the end of your chains. transcode is used to transcode (decode and re-encode the stream using a different codec and/or bitrate) the audio and the video of the input stream. If the input or output access method doesn't allow pace control (network, capture devices), this done "on the fly", in real time. This can require quite a lot of CPU power, depending on the parameters set. Other streams, such as files and disks are transcoded as fast as the system allows it. duplicate allows you to create a second chain, where the stream will be handled in an independent way. display allows you to display the input stream, as VLC would normally do. Used with the duplicate module, this allows you to monitor the stream while processing it. rtp streams over RTP (one UDP port for each elementary stream). This module also allows RTSP support. es allows you to make separate Elementary Streams (ES) out of an input stream. This can be used to save audio and video streams to separate files, for instance. bridge-out TODO bridge-in TODO mosaic-bridge TODO

Each of these modules may take options. Here is the syntax that you must use:

% vlc input_stream --sout "#module1{option1=parameter1{parameteroption1},option2=parameter2}:module2{option1=...,option2=...}:..."

NOTE: Some of the module options (option1 in the example) have to be set, others are optional. Option parameters (parameter-option1 in the example) are always optional. These option parameters are also often very advanced settings. If you don't understand their description, this certainly means that you don't need them. You may also use the following syntax :

% vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-module2-option1=... -sout-module2-option2=... ...

For example, to transcode a stream and send it, use:


% vlc input_stream --sout '#transcode{options}:standard{options}'

Description of the modules


standard (alias std)
This module saves the stream to a file or sends it over a network, after having muxed it. The available options are: access This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are:

file: saves the stream to a file.

Use the append option to append the stream to an existing file instead of replacing it:
standard{ ... ,access=file{append}, ... }

udp: streams to a UDP unicast or multicast address.

Item options are:


o o o o o

caching=<time in ms> to set the time VLC should buffer data before sending it; ttl=<ttl> to set the ttl of the sent udp packets; group=<amount of packets> to sent packets by burst instead of one by one; late=<time in ms> to drop packets that arrive too late at this stage of the chain; raw if you don't want to wait until the MTU is filled before sending the packet.

http: streams over HTTP.

Item options are:


o o o

user=<user name> to enable HTTP basic authentication and set the user; pwd=<password> to set the basic authentication password; mime=<mime type> to set the mime type returned by the server.

https: streams over HTTP, using a secured SSL connection.

Item options are the same as for http and:


o o o o

cert=<path to certificate>to set the certificate to use; key=<path to key> to set the private key file the server should use for the SSL connection; ca=<path to certificate> to set the path to the root CA certificates to use for SSL; crl=<path to certificate> to set the revocation certificate to use for the SSL connection.

mmsh: streams using the Microsoft MMS protocol. This protocol is used as transport method by many Microsoft's softwares.

Note that only a small part of the MMS protocol is supported (MMS encapsulated in HTTP). Item options are the same as for the http module.

rtp: streams over RTP. This can only be used to stream MPEG-TS over plain RTP.

Support for this option has been removed in VLC 0.9.0 and latter. You should use the rtp stream output module instead. Options are the same as for the udp setting. mux This option allows you to set the encapsulation method used for the resulting stream. This option has to be set. Available options are:

ts: the MPEG2/TS muxer. This the standard muxer used to stream MPEG 2. This muxer can be used with any access method. Supported codecs are MPEG 1/2/4, MJPEG, H263, H264, I263, WMV 1/2 and theora for video, MPEG audio, AAC and a52 for the audio stream.

Item options are:


o o o o o o o o o o o

pid-video=<pid> to set the PID of the video track; pid-audio=<pid> to set the PID of the audio track; pid-spu=<pid> to set the PID of the subtitle track; pid-pmt=<pid> to set the PID of the PMT (Program Map Table); tsid=<id> to set the ID of the resulting TS stream; shaping=<shaping delay in ms> to set the minimum interval during which the bitrate of the stream will remain constant, for variable bitrate streams; use-key-frames uses I frames as limits for the shaping intervals; pcr=<PCR interval in ms> allows to set at which interval Program Clock References will be sent; dts-delay=<delay in ms> allows to delay PTS (Presentation Time Stamps) from the DTS (Decoding Time Stamp) from the given time; crypt-audio allows to enable encryption of the audio track using the CSA algorithm; csa-ck=<key as a 16 character word> allows to set the key used for CSA encryption.

ps: the MPEG2/PS muxer. This the standard muxer for MPEG 2 files(.mpg). It can be used with the file and http output methods. Supported codecs are MPEG 1/2 and MJPEG for video, MPEG audio and a52 for audio streams.

The only available item option is:


o

dst-delay=<delay in ms>: It allows to delay PTS (Presentation Time Stamps) from the DTS (Decoding Time Stamp) from the given time.

mpeg1: the standard MPEG 1 muxer. This muxer should be used instead of ps with MPEG 1 video streams, when saved to a file or streamed over HTTP. Supported codecs are MPEG 1 and MPEG audio.

Items options are the same as for the PS muxer.

ogg: the ogg muxer. This is the muxer from the Xiph project. It can be used with the HTTP and file output methods. Supported codecs are MPEG 1/2/4, MJPEG WMV 1/2 and Theora, audio streams can be vorbis, flac, speex, a52 or MPEG audio.

There is no item option for this muxer.

asf: the Microsoft ASF muxer. This is the standard muxer used for streaming by Microsoft's softwares. Is also used as container for WMA audio files. This muxer can be used with the file and HTTP output methods. Supported codecs are MPEG 4, MJPEG, WMV 1/2 for video, MPEG audio, a52 for audio streams.

Item options are:


o o o o o

title=<title>; autor=<author>; copyright=<copyright message>; comment=<comments>; rating=<rating> allow you to set what will be displayed in the according field of the stream comments.

asfh: this is a special version of the ASF muxer, that should be used for MMSH streaming. MMSH is the only supported output

method. Supported codecs are the same as for ASF. Item options are the same as for ASF.

avi: the Microsoft AVI muxer. This is very common encapsulation format for MPEG 4 files. The only supported output method

is file. Supported codecs are MPEG 1/2/4, H263, H264 and I263 for video, MPEG audio and a52 for audio streams. There is not item option for this muxer. Note: The avi muxer in VLC is known to produce corrupt files.

mpjpeg: the multipart jpeg muxer.

This encapsulation format is mostly used on surveillance video cameras with an integrated webserver. Such streams are usually embedded in web-pages and seen with standard Internet browsers, as they are seen as a succession of jpeg images. The only supported output method is HTTP. The only usable codec is MJPEG. No sound track can be muxed in such streams. No item option is available for this muxer. dst This option allows to give informations about the location where the stream should actually be saved or sent. Here is the meaning of the dst option depending on the parameter used for the access option.

If the file output method is used, dst is the path where the file should be saved. If the udp or rtp output method is used, dst is the unicast or multicast destination address and, optionally, UDP port, in the form address:port. If the http, https or mmsh output method is chosen, dst is the address, port and path of the local network interface on which the server should listen for requests. If no address is given, VLC will listen on all the network interfaces. These information have to be supplied using the address:port/path syntax.

sap Use this option if you want VLC to send SAP (Session Announcement Protocol) announces. SAP is a service discovery protocol, that uses a special multicast address to send a list of available streams on a server. This option can only be enabled with the udp output method. group This option allows to specify the name of an optional group of streams. A VLC used as a client will use this field to classify the stream. This option uses a private extension of the SAP protocol. VLC will be the only client able to read this field. This option can only be used if the sap option has been enabled. sap-ipv6 Use this option if you want the SAP announces to be sent using the IPv6 protocol instead of IPv4. This option can only be used if the sap option has been enabled. slp SLP stands for Service Location Protocol. It is an alternative to SAP for session announcement. Use this option if you want to send such announces.

name Use this option to specify the name of the stream that will be sent in SAP and SLP announces. This option can only be used if the sap or slp option has been enabled.

display
This module can be used to display the stream. This is particularly useful in a duplicate chain, in order to monitor a stream while it is being saved or streamed. Available options are: novideo You can use this option to disable video in the displayed stream. noaudio You can use this option to disable audio in the displayed stream. delay You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms.

rtp
This module can be used to send a stream using the RTP (Real Time Protocol) protocol (see RFC 3550). Although use of RTSP is possible using this module, it won't allow you to make Video On demand. Please have a look at the description of the VLM module for that. The different available options are: dst This option allow to give the destination UDP address. This can be the address of a host or a multicast group. This option has to be given, unless the sdp=rtsp://option is given (see below). In the latter case, the stream will be sent to the host doing the RTSP request. port This option allows to set the UDP port used to send the first elementary stream. This port has to be even. Other streams will be streamed using even ports directly above this one.

port-video This option allows to set the UDP port used to send the first video elementary stream. This port has to be even. port-audio This option allows to set the UDP port used to send the first audio elementary stream. This port has to be even. sdp This option allows to set the way the SDP (Session Description Protocol) file corresponding the the stream should be made available. Options are:

file://<path to the file>, to export the SDP as a local file. http://<local interface IP:port/path>, to make the file available using the integrated HTTP server of VLC.

Note: The local interface IP argument is optional. If not given, VLC will listen on all available interfaces.

'rtsp://<local interface IP:port/path>, to make the SDP file available using the RTSP protocol (see RFC 2326).

Note: The local interface IP argument is optional. If not given, VLC will listen on all available interfaces.

sap, to export the SDP using the SAP (Session Announcement Protocol, see RFC 2974).

ttl This option can be used to set the TTL (Time to Live) of the sent UDP packets. mux This option allows to set the encapsulation method used to send the stream. See mux options of the standard module for a description of the available method. Only ts is possible for RTP streams. By default, each elementary stream is sent as a separate RTP media, i.e. no encapsulation is done. rtcp-mux This options enables RTP/RTCP multiplexing (see draft-ietf-avt-rtp-and-rtcp-mux), i.e. sends and receives RTCP packets on the same port numbers as RTP packets. By default, RTCP packets are sent and received on the next port. proto=

This selects the transport protocol to carry RTP packets. Possible values include:

dccp, accept incoming DCCP connections at the specified IP address (dst=), sctp, accept SCTP connections at the specified IP address (dst=), not implemented yet, tcp, accept TCP connections at the specified IP address (dst=) and use RFC4571 RTP framing,

not implemented yet,

udp, send UDP packets to the specified destination (either unicast or multicast); this is the default value, udplite, send UDP-Lite packets to the specified destination (either unicast or multicast).

This options uses UDP-Lite instead of UDP as the transport protocol for RTP and RTCP packets. name This option can be used to set the name that will be displayed on the client receiving the stream. description This option can be used to give an additional description of the stream. url This option allows to give the address of a website with additional informations about the stream. email This options allows to give a contact e-mail address.

es
The es module can be used to separate the different elementary streams from a stream, and save each of them in a different file or send it to a separate destination. The available parameters are: access-video Use this option to set the medium used to save or send the video elementary streams. Possible values and item options are the same as for the access option of the standard module (see above). access-audio Use this option to set the medium used to save or send the audio elementary streams. Possible values and item options are the same than for the access option of the standard module (see above). access

This option can be used instead of both access-video and access-audio options, when they share the same setting. mux-video Use this option to set the encapsulation method used for the video elementary streams. Possible values and item options are the same as for the mux option of the standard module (see above). mux-audio Use this option to set the encapsulation method used for the audio elementary streams. Possible values and item options are the same than for the mux option of the standard module (see above). mux This option can be used instead of both mux-video and mux-audio options, when they share the same setting. dst-video Use this option to set the location where the video elementary streams should be saved, sent, or made available. The exact meaning of this option depends on the value of the access-video option and is the same as for the url option of the standard module (see above). Note: If you use the %n string in the url field, VLC will replace it by the number of the audio or video track considered. The %c string will be replaced by the name (FOURCC) of the codec of the track. %a prints the access output used and %m the muxer used. dst-audio Use this option to set the location where the audio elementary streams should be saved, sent, or made available. The exact meaning of this option depends on the value of the access-audio option and is the same as for the url option of the standard module (see above). Note: If you use the %n string in the url field, VLC will replace it by the number of the audio or video track considered. The %c string will be replaced by the name (FOURCC) of the codec of the track. %a prints the access output used and %m the muxer used. dst This option can be used instead of both dst-video and dst-audio options, when they share the same setting.

transcode
You can use this module to transcode a stream, i.e. to change its codecs or the encoding bitrates. Some additional processing can be done during this process, such as re-scaling, deinterlacing, resampling, etc.

Note: Depending on the bitrate of the original stream and of the options chosen, transcoding can be a very CPU intensive task. As a consequence, streaming of a real time transcoded stream can lead to dropped frames or a jerky image and sound in some cases, when running out of resources. Available options are: vcodec This options allows to specify the codec the video tracks of the input stream should be transcoded to. List of available codecs can be found on the streaming features page. vb This option allows to set the bitrate of the transcoded video stream, in kbit/s. venc This allows to set the encoder to use to encode the videos stream. Available options are:

ffmpeg: this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the streaming features page.

Item options are:


o o o o o o o o o o o o o o

keyint=<number of frames> allows to set the maximal amount of frames between 2 key frames; hurry-up allows the encoder to decrease the quality of the stream if the CPU can't keep up with the encoding rate; interlace allows to improve the quality of the encoding of interlaced streams; noise-reduction=<noise reduction factor> enables a noise reduction algorithm (will decrease required bitrate at the cost of details in the image); vt=<bitrate tolerance in kbit/s> allows to set a tolerance for the bitrate of the output video stream; bframes=<amount of frames> allows to set the amount of B frames between 2 key frames; qmin=<quantizer> allows to set the minimum quantizer scale; qmax=<quantizer> allows to set the maximum quantizer scale; qscale=<quantizer scale> allows to specify a fixed quantizer scale for VBR encodings; i-quant-factor=<quantization factor> allows to set the quantization factor of I frames, compared to P frames; hq=<quality> allows to choose the quality level for the encoding of the motion vectors (arguments are simple, rd or bits, default is simple *FIXME*); strict=<level of compliance> allows to force a stricter standard compliance (possible values are -1, 0 and 1, default is 0); strict-rc enables a strict rate control algorithm; rc-buffer-size=<size of the buffer in bits> allows to choose the size of the buffer used for rate control (bigger means more efficient rate control);

o o o o

rc-buffer-aggressivity=<float representing the aggressiveness> allows to set the rate control buffer aggressiveness *FIXME*; pre-me allows to enable pre motion estimation; mpeg4-matrix enable use of the MPEG4 quantization matrix with MPEG2 streams, improving quality while keeping compatibility with MPEG2 decoders; trellis enables trelli quantization (better quality, but slower processing).

theora: The Xiph.org theora encoder. The module is used to produce theora streams. Theora is a free patent and royalties free video codec.

The only available item option is:


o

quality=<quality level>. This option allows to create a VBR stream, overriding vb setting. the quality level must be an integer between 1 and 10. Higher is better.

x264. x264 is a free open-source h264 encoder. h264 (or MPEG4-AVC) is a quite recent high quality video codec.

Item options are:


o o o o o o o o o o o

keyint=<number of frames> allows to set the maximal amount of frames between 2 key frames; idrint=<number of frames> allows to set the maximal amount of frames between 2 IDR frames; bframes=<amount of frames> allows to set the amount of B frames between an I and a P frame; qp=<quantizer parameter> allows to specify a fixed quantizer (between 1 and 51); qp-max=<quantizer parameter> allows to set the maximum value for the quantizer; qp-min=<quantizer parameter> allows to set the minimum value for the quantizer; cabac enables the CABAC (Context-Adaptive Binary Arithmetic Coding) algorithm (slower, but enhances quality); loopfilter enables deblocking loop filter; analyse enables the analyze mode; frameref=<amount of frames> allows to set the number of previous frames used as predictors; scenecut=<sensibility> allows to control how aggressively the encoder should insert extra I-frame, on scene change.

fps This options allows to set the framerate of the transcoded video, in frames per second; reducing the framerate of a video can help decrease its bitrate. deinterlace This option allows to enable deinterlacing of interlaced video streams before encoding.

croptop This option allows to crop the upper part of the source video while transcoding. The argument is the number of lines the video should be cropped. cropbottom This option allows to crop the lower part of the source video. The argument is the Y coordinate of the first line to be cropped. cropleft This option allows to crop the left part of the source video while transcoding. The argument is the number of columns the video should be cropped. cropright This option allows to crop the right part of the source video. The argument is the X coordinate of the first column to be cropped. scale This option allows the give the ratio from which the video should be rescaled while being transcoded. This option can be particularly useful to help reduce the bitrate of a stream. width This options allows to give the width of the transcoded video in pixels. height This options allows to give the height of the transcoded video, in pixels. acodec This options allows to specify the codec the audio tracks of the input stream should be transcoded to. List of available codecs can be found on the streaming features page. ab This option allows to set the bitrate of the transcoded audio stream, in kbit/s. aenc This allows to set the encoder to use to encode the audio stream. Available options are:

ffmpeg: this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the streaming features page).

vorbis. This module uses the vorbis encoder from the Xiph.org project. Vorbis is a free, open, license-free lossy audio codec.

Item options are:


o

quality=<quality level> allows to use VBR (variable bitrate) encoding instead of the default CBR (constant bitrate), and

to set the quality level (between 1 and 10, higher is better); max-bitrate=<bitrate in kbit/s> allows to set the maximum bitrate, for vbr encoding; o min-bitrate=<bitrate in kbit/s> allows to set the minimum bitrate, for vbr encoding; o cbr allows to force cbr encoding. speex. This module uses the speex encoder from the Xiph.org project. Speex is a lossy audio codec, best fit for very low bitrates (around 10 kbit/s) and particularly video conference.
o

samplerate This option allows to set the samplerate of the transcoded audio stream, in Hz. Reducing the samplerate is be a way to lower the bitrate of the resulting audio stream. channels This option allows to set the number of channels of the resulting audio stream. This is useful for codecs that don't have support for more than 2 channels, of to lower the bitrate of an audio stream. scodec This options allows to specify subtitle format the subtitles tracks of the input stream should be converted to. List of available codecs can be found on the streaming features page. senc This allows to set the converter to use to encode the subtitle stream. The only subtitle encoder we have at this time is dvbsub. soverlay This option allows rendering subtitles directly on the video, while transcoding it. Do not confuse this option with senc/scodec that transcode the subtitles and stream them. sfilter

This option allows to render some images generated by a so called subpicture filter (e.g. a logo, a text string, etc) on top of the video. List of available subpicture filters can be found on the [http://www.videolan.org/streaming/features.html streaming features page] (FIXME?). The Item options of this modules can be found using the following command line:
% vlc -p --advanced <module name>

threads This options allows to set the amount of threads that should be used to encode the streams. Increasing this number to the amount of processors on the computer, (or twice this number on Intel P4 HT processors) should improve transcoding performance. audio-sync When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track on the audio track. vfilter Uses video filter during transcode process. Parameters of vfilter can be found on the Advanced Use of VLC Filters. The example
vlc input_file -sout="#transcode{vfilter=adjust{gamma=1.5},vcodec=theo,vb=2000,scale=0.67,acodec=vorb,ab=128,cha nnels=2}:standard{access=file,mux=ogg,dst="output_file.ogg"}"

will adjust input_file gamma to 1.5, resize the video size (resolution) by 0.67 (eg. 1080x720 to 720x480) and convert video using Theora codec with bitrate 2000 kb/s and audio using Vorbis codec with bitrate 128 kb/s, encapsulate the video and audio to Ogg container and saves it to output_file.ogg.

duplicate
This module can be used to duplicate the stream, and so process it through several different chains. Available options are: dst This options allows to give the chain through which the duplicated stream should be processed. Note: dst options have to be used in the same duplicate block to actually duplicate the stream. Any of the stream output module described earlier can be used as parameter of this option. select

This options can be used to duplicate only a part elementary streams of a complete stream. Several criteria can be given, by separating each of them with a comma. For criteria that need a parameter, such as es and program, you can also specify a range, using the syntax criteria=num_startnum_end. Available parameters are:

program=: duplicate only elementary streams belonging to the selected program (or SID). This option only works with MPEG2/TS streams. noprogram=: do not duplicate elementary streams belonging to the selected program (or PID). This option only works with MPEG2/TS streams. es=: duplicate only the elementary stream with the selected id. noes=: do not duplicate the elementary stream with the selected id. video: duplicate only video elementary streams. novideo: do not duplicate video elementary streams. audio: duplicate only audio elementary streams. noaudio: do not duplicate audio elementary streams. spu: duplicate only subtitle elementary streams. nospu: do not duplicate subtitle elementary streams.

Example:
#duplicate{dst=std{...},select="program=100-200,novideo"}

This duplicate chain will only output the non video elementary streams belonging to the programs which PID are between 100 and 200.

Miscellaneous
Here are a few additional global options:

--sout-all, --no-sout-all: Enable streaming of all ES (default disabled). By default VLC will only stream one audio ES and one video ES (the first ones). If you enable sout-all, all ES (audio, video and SPU) will be streamed. --sout-keep, --no-sout-keep: Keep sout open (default disabled) : use the same sout instance across the various playlist items, if possible. --no-sout-audio: This options allows to disable audio in the outputted stream. --no-sout-video: This options allows to disable video in the outputted stream.

Simplified Syntax
The stream output also offers a simplified syntax, with which you can only you use the standard module's main options:
% vlc input_stream --sout access/mux://url

where access, mux and url are as defined in the options of the standard module.

Examples
To understand fully the complex syntax of VLC's stream output, please look at the examples in the next section.

Transcoding
Transcode the input stream and send it to a multicast IP address with the associated SAP announce:
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}'

Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce:
% vlc -vvv input_stream --sout #duplicate{dst=display,dst="transcode{vcodec=mp4v,acodec=mpga,vb=800, ab=128,deinterlace}:rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}"}'

Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce:
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}}'

To receive the input stream that is being multicasted above on a client:


vlc rtp://239.255.12.42

More complex transcoding example


Stream a SDI card to H.264 and AAC in TS on udp
% cvlc -vvv --live-caching 2000 decklink:// --decklink-audio-connection embedded --decklink-aspect-ratio 16:9 --decklink-mode hp50 --sout-x264-preset slow --sout-x264-tune film --sout-transcode-threads 8 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 6000 --sout-x264-vbv-bufsize 6000 --sout '#transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=192.168.2.1:1234}'

Multiple streaming
Send a stream to a multicast IP address and a unicast IP address:
vlc -vvv input_stream --sout '#duplicate{dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"},dst=rtp{mux=ts,dst=192.168.1.2}}'

Display the stream and send it to two unicast IP addresses:


vlc -vvv input_stream --sout '#duplicate{dst=display,dst=rtp{mux=ts,dst=192.168.1.12},dst=rtp{mux=ts,dst=192.168.1.42}}'

Send parts of a multiple program input stream:

vlc -vvv multiple_program_input_stream -sout'#duplicate{dst=rtp{mux=ts,dst=239.255.12.42},select="program=12345",dst=rtp{mux=ts,dst=239.255.12.43},select ="video,program=1234-2345"}'

This command sends the program of the input stream which id is 12345 to 239.255.12.42 and all video programs with id between 1234 and 2345 to 239.255.12.43.

Transcoding and multiple streaming


Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce and an unicast IP address:
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}, dst=rtp{mux=ts,dst=192.168.1.2}}'

Display the input stream, transcode it and send it to two unicast IP addresses:
% vlc -vvv input_stream --sout '#duplicate{dst=display,dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: duplicate{dst=rtp{mux=ts,dst=192.168.1.2},dst=rtp{mux=ts,dst=192.168.1.12}"}'

Send the input stream to a multicast IP address and the transcoded stream to another multicast IP address with the associated SAP announces:
% vlc -vvv input_stream --sout '#duplicate{dst=rtp{mux=ts,dst=239.255.1.2,sdp=sap,name="OriginalStream"}, dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: rtp{mux=ts,dst=239.255.1.3,sdp=sap,name="TranscodedStream"}"}'

More complex multi-transcoding example


Take a SDI input, and transcode it twice, once in HD, and one in SD and send both on udp.
% cvlc -vv --live-caching 2000 --decklink-audio-connection embedded --decklink-aspect-ratio 16:9 --decklink-mode hp50 decklink:// --sout-x264-preset fast --sout-x264-tune film --sout-transcode-threads 24 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 4000 --sout-x264-vbv-bufsize 4000 --sout '#duplicate{dst="transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=192. 168.1.2:4013}", dst="transcode{height=576,vcodec=h264,vb=2000,acodec=mp4a,aenc=fdkaac,ab=128}:std{access=udp,mux=ts,dst=192. 168.1.2:4014}"}'

Take a SDI input, and restreaming it once in raw and transcoding it for the second
% cvlc -vv --live-caching 2000 --decklink-audio-connection embedded --decklink-aspect-ratio 16:9 --decklink-mode hp50 decklink:// --sout-x264-preset fast --sout-x264-tune film --sout-transcode-threads 24 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 4000 --sout-x264-vbv-bufsize 4000 --sout '#duplicate{dst="transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=192. 168.1.2:4013}",

dst="std{access=udp,mux=ts,dst=192.168.1.2:4014}"}'

HTTP streaming
Stream in HTTP:

on the server, run:

% vlc -vvv input_stream --sout '#standard{access=http,mux=ogg,dst=server.example.org:8080}'

on the client(s), run:

% vlc http://server.example.org:8080

Transcode and stream in HTTP:


% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: standard{access=http,mux=ogg,dst=server.example.org:8080}'

Recording a live video stream:


% vlc http://example.com/live.asf --sout="#duplicate{dst=std{access=file,mux=asf, dst='C:\test\test.asf'},dst=nodisplay}"

For example, if you want to stream an audio CD in Ogg/Vorbis over HTTP:


% vlc -vvv cdda:/dev/cdrom --sout '#transcode{acodec=vorb,ab=128}:standard{access=http,mux=ogg,dst=server.example.org:8080}'

RTSP live streaming


Stream with RTSP and RTP:

Run on the server:

vlc -vvv input_stream --sout '#rtp{dst=192.168.0.12,port=1234,sdp=rtsp://server.example.org:8080/test.sdp}'

Run on the client(s):

vlc rtsp://server.example.org:8080/test.sdp

RTSP on-demand streaming


See Documentation:Streaming HowTo/VLM.

MMS / MMSH streaming to Windows Media Player


% vlc -vvv input_stream --sout '#transcode{vcodec=DIV3,vb=256,scale=1,acodec=mp3,ab=32, channels=2}:std{access=mmsh,mux=asfh,dst=:8080}'

VLC media player can connect to this by using the following url: mmsh://server_ip_address:8080. Windows Media Player can connect to this by using the following url: mms://server_ip_address:8080.

Use the es module


Separate audio and video in two PS files:
% vlc -vvv input_stream --sout '#es{access=file,mux=ps,url_audio=audio-%c.%m,url_video=video%c.%m}'

Extract the audio track of the input stream to a TS file:


% vlc -vvv input_stream --sout '#es{access_audio=file,mux_audio=ts,url_audio=audio-%c.%m}'

Stream in unicast the audio track on a port and the video track on another port (NOTE: This will not only work with VLC 0.8.6 or older - FIXME?):

on the server side:

% vlc -vvv input_stream --sout '#es{access=rtp,mux=ts,url_audio=192.168.1.2:1212, url_video=192.168.1.2:1213}'

on the client side: o to receive the audio:

% vlc udp://@:1212

to receive the video:

% vlc udp://@:1213

Stream in multicast the video and dump the audio in a file:


% vlc -vvv input_stream --sout '#es{access-video=udp,mux-video=ts,dst-video=239.255.12.42, access-audio=file,mux-audio=ps,dst-audio=audio-%c.%m}'

Note: You can also combine the es module with the other modules to set-up even more complex solution.

Keeping the stream open


% % vlc -vvv input_stream -sout-keep -sout=#transcode{acodec=mp3}:duplicate{dst=display{delay=6000}, dst=gather:std{mux=mpeg1,dst=:8080/stream.mp3,access=http},select="novideo"}

The basic transcoding is an mp3 stream from the file you select (if it is a video file, then the video is ignored). It is streamed via http to localhost:8080/stream.mp3

The combination of :sout-keep and dst=gather:std mean that the stream is kept open and subsequent items are played through the same stream.

Using VLC as a reflector


Taking a udp input and resending it once raw via ipv6 multicast, and once in HLS
% cvlc -vvv udp://@:4013 --ttl 60 --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3013}", dst=std{access=udp,mux=ts,dst=ffe2::1]:2013}, dst=std{access=livehttp{seglen=5,delsegs=true,numsegs=5,index=/path/to/stream.m3u8, index-url=http://example.org/stream-########.ts},mux=ts{use-key-frames},dst=/path/to/stream-########.ts}}}

VLM
VideoLAN Manager is a small media manager designed to control multiple streams with only one instance of VLC. It allows multiple streaming and video on demand (VoD). This manager being a new
feature, it can only be controlled by the telnet interface or the http interface.

Interfaces
Telnet interface You can launch the telnet interface as a common interface using the command line:
% vlc --intf telnet % vlc --extraintf telnet

The telnet interface can also be launched in the wxWindows interface:

interface

Launching the Telnet interface - wxWindows

The default port is 4212. The default password is "admin". These can be changed using --telnetport <integer> and --telnet-password <string> command line options. They can also be changed in the preferences panel when using the wxWindows interface in the Modules->interface>telnet section (check the Advanced options checkbox). HTTP interface Launching the HTTP interface is described in Control_VLC_via_a_browser To access the vlm section of the http interface, use the following URL: http://host:port/vlm.html (http://host:port/vlm/ for VLC 0.8.4 and older). Note: People who aren't used to command line streaming with VLC but want to use VLM's features are advised to use the HTTP interface.

VLM Elements
Medias A Media is composed with a list of inputs (the video and audio streams you want to stream), an output (how and where you want to stream them) and some options.

There are two types of medias:


vod: A vod media is commonly used for Video on Demand. It will be launched only if a vod client asks for it. broadcast: A broadcast media is very close to a TV program or channel. It is launched, stopped or paused by the administrator and may be repeated several times. The client has no control over this media.

Schedules A Schedule is a script with a date. When the schedule date is reached, the script is launched. There are several options available like a period or a number of repetitions.

Command line syntax


Command lines

help: Displays an exhaustive command lines list new (name) vod|broadcast|schedule [properties]: Create a new vod, broadcast or schedule element. Element names must be unique and cannot be "media" or "schedule". You can specify properties in this command line or later on by using the setup command. setup (name) (properties): Set an elements property. See <xref linkend="vlmprop" endterm="tvlmprop" />. show [(name)|media|schedule]: Display current element states and configurations. o show (name): Specify an element's name to show all information concerning this element. o show media displays a summary of media states. o show schedule displays a summary of schedule states. del (name)|all|media|schedule: Delete an element or a group of elements. If the element wasn't stopped, it is first stopped before being deleted. o del (name): Delete the (name) element. o del all: Delete all elements o del media: Delete all media elements. o del schedule: Delete all schedule elements. control (name) [instance_name] (command): Change the state of the (instance_name) instance of the (name) media. If (instance_name) isn't specified, the control command affects the default instance. See <xref linkend="vlmctrl" endterm="tvlmctrl" /> for available control commands. save (config_file): Save all media and schedule configurations in the specified config file. The config file path is relative to the directory in which vlc was launched. If the file exists it will be overwritten. Note that states, such as playing, paused or stop, are not saved. See <xref linkend="vlmconf" endterm="tvlmconf" /> for more info. load (config_file): Load a configuration file. The config file path is relative to the directory in which vlc was launched. See <xref linkend="vlmconf" endterm="tvlmconf"/> for more info.

Media Properties Note: Except the "append" property, all properties can be followed by another one.

input (input_name): Add an input to the end of the media's input list.

output (output_name): Define the media's output. The syntax is the same as the vlc ":sout=..." vlc option but you do not have to put the ":sout=..." string. See <xref linkend="cmdline" endterm="tcmdline" /> for more information concerning stream outputs (sout). Note: You do not have to specify an output for vod elements. option (option_name)[=value] : Adds the (option_name) to the media option list. The syntax is equivalent to the ":(option)=..." option , but you do not have to put the ":" string. Options are global: they are applied to all inputs of the media. enabled|disabled: Enable or Disable the media. If a media is disabled, it cannot be streamed, paused, launched by a schedule, or played as VoD. loop|unloop (broadcast only): If a media with the "loop" option receives the "play" command, it will automatically restart to play the input list once the end of the input list is reached. Note: loop|unloop is only used for broadcast media types. mux (mux_name): This option should only be specified if you want the elementary streams to be sent encapsulated instead of raw. The (mux_name) should be specified as a four characters length identifier such as mp2t for MPEG TS or mp2p for MPEG PS. See <xref linkend="smc" endterm="tsmc" />. Note: The mux property is only used for vod media types.

Schedule Properties

enabled|disabled: A disabled schedule will never be launched. append (command_until_rest_of_the_line): Add a command to the command line lit. The command line can be every command VLM can understand. Note: The rest of the line will be considered as part of the command line. You cannot put another option after the append one. date (year)/(month)/(day)-(hour):(minutes):(seconds)|now: Specify the first date the schedule should be launched. You can specify a date using the (year)/(month)/(day)(hour):(minutes):(seconds) format (example: 2004/11/16-00:43:12) or using the now keyword. If now is used, the schedule will be launched as soon as possible (i.e. as soon as it is enabled) and the current date will be used as the first date of the schedule. period (years_aka_12_months)/(months_aka_30_days)/(days)(hours):(minutes):(seconds): Specify the period of time a schedule must wait for launching itself another time. (Months are considered as 30 days, Years as 12 months) If a period is specified without a repeat property, the schedule will be launched endlessly. repeat (number_of_repetitions): Specify the number of times the schedule will be launched again. For example, if a schedule has repeat 11 it will be launched 12 times.

Control Commands

play: Stat a broadcast media. The media begins to launch the first item of the input list, then launches the next one and so on. (like a play list) pause: Put the broadcast media in paused status. stop: Stop the broadcast media. seek (percentage): Seek in the current playing item of the input list.

Configuration Files
A VLM configuration file is a list of command lines : one line corresponds to one command line.

To create a configuration file, just edit a text file and type a list of VLM commands. Beware of recursive calls: you can put a load (file) in a configuration file which can lead to recursive inclusion of the same file and result in VLC's crash. You can automatically load a VLM configuration when launching VLC with the --vlm-conf <vlm conf filename> command line option. The minimal command to make that work is:
% vlc -I telnet --vlm-conf vlm.conf

As of versions > 0.8.1, any line where the first non white space character is a # is considered as a comment.

Examples
This section provides several small vlm configuration files.

Multiple streams
Simple broadcasting
new channel1 broadcast enabled setup channel1 input http://host.mydomain/movie.mpeg setup channel1 output #rtp{mux=ts,dst=239.255.1.1,port=5004,sdp=sap://,name="Channel 1"} new channel2 broadcast enabled setup channel2 input udp://@239.255.12.42 setup channel2 output #rtp{mux=ts,dst=239.255.1.2,port=5004,sdp=sap://,name="Channel 2"} control channel1 play control channel2 play

if you are using direct show and are getting "control : unknown error" try "setup channel enabled"

Scheduled broadcasting
new my_media broadcast enabled setup my_media input my_video.mpeg input my_other_movie.mpeg setup my_media output #rtp{mux=ts,dst=239.255.1.1,sdp=sap://,name="My Media"} new my_sched schedule enabled setup my_sched date 2012/12/12-12:12:12 setup my_sched append control my_media play

Video On Demand
Basic example First launch the vlc
% vlc --ttl 12 -vvv --color -I telnet --telnet-password videolan --rtsp-host 0.0.0.0 --rtsp-port 554

where:

12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers). telnet launches the telnet interface of the vlc. videolan is the password to connect to the telnet interface. 0.0.0.0 is the host address. 554 is the port on which you stream.

Then you connect to the vlc telnet interface and create the vod object. You can connect to vlc telnet interface by use the terminal.
% telnet localhost 4212

and create the vod object.


new Test vod enabled setup Test input my_video.mpg

You can access to the stream with:


% vlc rtsp://server:554/Test

where:

server is the address of the streaming server (IP or DNS)

Advanced example You can also specify options, a muxer, or an additional output chain that will be prepended to the RTP output used by VoD (e.g. to enable transcoding). Note: make sure to enter the corresponding commands before the VoD media is enabled, or before you setup the input.
new Test2 vod setup Test2 output #transcoding{vcodec=h264,vb=512,acodec=mp4a,ab=96} setup Test2 mux mp2t setup Test2 input my_video.mpg setup Test2 enabled

Receive a stream with VLC


Receive an unicast stream
% vlc -vvv rtp://

Receive a multicast stream


% vlc -vvv rtp://@239.255.12.42

where 239.255.12.42 is the multicast IP address you want to join.

Receive an HTTP/FTP/MMS stream


Use one of the following command lines:
% vlc -vvv http://example/stream.xyz

where http://example/stream.xyz is the HTTP address of the stream;


% vlc -vvv ftp://example/stream.xyz

where ftp://example/stream.xyz is the FTP address of the stream;


% vlc -vvv mms://viptvr.yacast.fr/encoderfranceinfo

where mms://viptvr.yacast.fr/encoderfranceinfo is the MMS address of the stream.

Receive a RTP stream available through RTSP


% vlc -vvv rtsp://www.hardradio.com/tonbeme.mov

where rtsp://www.hardradio.com/tonbeme.mov is the address of the stream.

Receive a stream described by an SDP file


% vlc -vvv http://server.example.org/stream.sdp

Save a stream with VLC


VLC can save the stream to the disk. In order to do this, use the Stream Output of VLC : you can do it via the graphical interface (Media [menu] -> streaming) or use the record button, or you can add to the command line the following argument:
--sout file/muxer:stream.xyz

where:

muxer is one of the formats supported by VLC's stream output, i.e. :

ogg for OGG format, ps MPEG2-PS format, ts for MPEG2-TS format. and stream.xyz is the name of the file you want to save the stream to, with the right extension.
o o o

For example:
vlc your_input_file_or_stream_here --sout=file/ps:go.mpg

This is short hand for the more verbose


vlc your_input_file_or_stream_here --sout="#std{access=file,mux=ps,dst=go.mpg}"

NB that you must choose a muxer that supports your stream type. See Transcode#Compatibility_issues It can also be quite helpful to look at the settings VLC uses when it records using its record button. For example, in the logs you might see something like this: ...: Using record output `std{access=file,mux='ps',dst='C:\vlc-record-2010__E-.mpg'}' Which gives you a hint/clue as to how to record your current stream. In this case this would translate into --sout "#std{access=file... on the command line.

Receive a stream with a set-top-box


Some set-top-boxes with Ethernet cards can receive MPEG2-TS streams over UDP and support multicast. Set-top-boxes known to work with VLC are :

Pace set top boxes. (Pace Micro DSL 4000) Aminocom set top boxes. (all the models with mpeg2) tuxia / gct-allwell (mpeg4 and mpeg2) sigma designs8174 chipset i3micro mood200 (mpeg4 and mpeg2 in transport streams) ps3 media server streams using VLC (or mencoder) to the PS3

Introduction
VLC media player is able to stream, transcode and save different media streams. For more information about the formats and codecs supported please see the VideoLAN Streaming Features list.

Transcoding
Transcoding is the process of taking a media file or stream and converting it to a different format or bitrate. There are two methods for transcoding in VLC, via the GUI (VLC's default interface) or via the commandline. The term transcode by itself normally refers to converting one media format to another and saving the output to a file (i.e. no streaming involved).

Transcoding using the GUI


One of the methods of transcoding is via the GUI. To access this: 1. In VLC, go to "Media >> Convert / Save..." (Ctrl+R). 2. Add the input file(s) or stream(s) you want to transcode. Press "Convert / Save". 3. In the "Convert" windows specify the destination file name (including file extension - e.g. on Windows "C:\out.mp3"). 4. Select the desired codec from the profile list. To check/edit the settings of a given profile press the "Edit selected profile" button. Profiles can also be added/deleted. 5. Press "Start". If the profile settings were compatible and transcoding was sucessful a playable destination file should be created.

Using the commandline

Another method of transcoding is via the commandline. This is more flexible than via the GUI as it enables full usage of the modules and options available in VLC. To use the VLC's commandline you need to have access to the commandline interface, for example via a shell. Windows-based systems On Windows-based system Command Prompt can be used. This can be found in the "Accessories" folder of the Start menu. Alternatively by going to "Start >> Run..." or pressing "Windows key + R", entering "cmd" into the text field and press "OK" or Enter. Once the Command Prompt window is opened navigating to the folder/directory where VLC is located is easiest for using the commandline as only "vlc.exe" or "vlc" (as the .exe part is assumed) needs to entered to run VLC. If VLC is installed in the default location (on a 32-bit system) running:
cd "C:\Program Files\VideoLAN\VLC"

Should change to the directory where vlc.exe is located. Unix systems On Unix-based system (such as Linux and Mac OS X) a terminal window can be opened. Running "vlc" should be all that is needed to open VLC. Transcoding commandline string structure A typical commandline string for converting a file to another format is:
vlc --sout "#transcode{[TRANSCODE_OPTIONS]}:std{[OUTPUT_OPTIONS]}" INPUT

Where INPUT is the input stream, [TRANSCODE_OPTIONS] are the options set for the desired output format, codecs, bitrate etc. and [OUTPUT_OPTIONS] are the option set for the output type. --sout is the stream output commandline option. Example commandline: Converting an audio file to a MP3 file An example usage might be converting an audio file to a MP3 file:
vlc --sout "#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=file,mux=raw,dst=OUTPUT}" INPUT

Where INPUT is the input file ans OUTPUT is the destination file (for example "C:\out.mp3" on Windows or "/home/username/out.mp3" on a *nix system). The above sout string is the default "Audio - MP3" profile setting accessible via the GUI. It will convert an audio input to a 128kbps CBR MP3 file (sample rate 44100Hz, 2 channels). Other examples commandline strings Convert an audio input to an uncompressed WAVE (*.wav) file:

vlc --sout "#transcode{acodec=s16l,channels=2,samplerate=44100}:std{access=file,mux=wav,dst=OUTPUT}" INPUT

Convert an audio input to an AAC file (MP4 container):


vlc --sout "#transcode{acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=OUTPUT}" INPUT

Streaming
Streaming using the GUI
Streaming using the GUI is only available on the Qt interface. To stream using the GUI, open VLC, then Media [menu] -> Stream:

Launching the Wizard Select a stream (such as a file, a network stream, a disk, a capture device ...) from the "Open Media" dialogs that pops up.

After selecting an item, the wizard is ready to begin The following streaming methods are available for use with VLC:

Display locally: display the stream on your screen. This allows you to display the stream you

are actually streaming. Effects of transcoding, rescaling, etc. can be monitored locally using this function. File: Save the stream to a file. HTTP: Use the HTTP streaming method. Specify the TCP port number on which to listen. MS-WMSP (MMSH): This access method allows you to stream to Microsoft Windows Media Player. Specify the IP address and TCP port number on which to listen. Note: This will only work with the ASF encapsulation method. UDP: Stream in unicast by providing an address in the 0.0.0.0 - 223.255.255.255 range or in multicast by providing an address in the 224.0.0.0 - 239.255.255.255 range. It is also possible to stream to IPv6 addresses. Note: This will only work with the TS encapsulation method. RTP: Use the Real-Time Transfer Protocol. Like UDP, it can use both unicast and multicast addresses. IceCast: Stream to an IceCast server. Specify the address, port, mount point and authentication of the IceCast server to stream to.

The most common way is via HTTP. To stream via HTTP, click on "Destinations", choose HTTP from the drop down as a "New Destination" and click add. Now if you are streaming video, you will want to stream to something like "/go.mpg." Now hit stream, and you should be able to use a different instance of VLC as a client, and listen to that stream now (ex: on the same computer it would be "Media" [menu] -> Open Network Stream -> "http://localhost:8080/go.mpg" and it should work.

Wizard streaming method A few caveats:


even though you click on "enable transcoding" and specify some other container type, it will give you the flv container type unless you use a suffix, like ".mpg" ref VLC client cannot receive a stream at less than 5 fps, though it can stream it all right for those speeds (and other players can receive it). ref. NB that *many* times when using the GUI to stream it will choose the wrong thing. For example, if you give a path of "/" it will use FLV container type (which you probably didn't want, and which overrides your transcoding settings' container type *silently*), and if you give it "/go.mp4" it will *silently* fail (you can look at the log messages to see what the error is--it says "mp4 type is not supported except for files"). It is tricky to get it setup. It's like the GUI sets it up wrong most times. Here is a [laundry list].

Select a transcoding profile that fits the codecs and access method of your stream, such as MPEG TS, MPEG PS, MPEG 1, OGG, Raw, ASF, AVI, MP4 and MOV. You can also create or modify profiles by clicking the "Edit selected profile" button next to the selection combobox.

Transcoding options Select methods to announce your stream. You can use SAP (Service Announce Protocol) or SLP (Service Location Protocol). You must also specify a channel name. The Mac OS X interface also allows you to export the description (SDP) file of a RTP session using the internal HTTP or RTSP server of VLC, or as a file. This can be done using the according checkboxes. The SDP URL text box allows to give the url or destination where the SDP file will be available. There is a text box displays the Stream Output MRL (Media Resource Locator). This is updated as you change options in the Stream output dialog, and can be tweaked by hand if necessary.

Selecting methods to announce the stream Click "Stream" to start streaming.

Streaming using the command line interface


See also: Documentation:Streaming_HowTo/Command_Line_Examples
If you want to stream using the command line interface instead of the GUI (more control, for example you can specify your own container), you can "sniff" the options the GUI is using by opening up the logger (Tools menu -> message) and setting verbosity level to "2" then doing a stream. It will output debug messages that basically tell you what it is using for command line parameters, then you will take those same parameters and use them on the command line (you may need to add quotation marks around words that have spaces in them, and you may need to add --'s). An example is in a unique command line:
C:\Program Files\VideoLAN\VLC>vlc "C:\Users\Public\Videos\Sample Videos\Wildlife.wmv": sout=#transcode{vcodec=h264,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{dst=:8090/go.mpg}

Stream a file with VLC


% vlc -vvv video1.xyz --sout udp:192.168.0.42 --ttl 12

where:

video1.xyz is the file you want to stream, 192.168.0.42 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

If you want to stream the file continuously, add the --loop option. Of course, you can add more options (like transcoding, or streaming to a TCP port, etc.), but this should get you started.

Stream a DVD with VLC


% vlc -vvv --color dvdsimple:/dev/dvd --sout udp://192.168.0.12 --ttl 12 --sout-all

where:

/dev/dvd is the name of your DVD drive (put D: under Windows if D is the letter of your DVD drive) or the directory where you copied your DVD, 192.168.0.42 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers). sout-all allows you to stream all soundtracks and subtitles

If you want to stream the DVD continuously, add the --loop option.

Note: This is possible under GNU/Linux only.

Install the DVB drivers


If you want to be able to stream from a DVB card (a satellite card or a digital terrestial TV card), you need to install the DVB drivers:

if you use a Linux 2.6.x kernel, you just need to select the right modules in your kernel configuration. if you use a dvb-card Technisat SkyStar2 rev. 2.8, you must download the latest release of the DVB drivers from the DVB-S(S2) drivers for Linux. if you are using a Linux 2.4.x kernel, you must download the latest release of the DVB drivers from the DVB drivers download page of the LinuxTV Project.

The following sections assume that you have a working linux-dvb installation, either from stock kernel 2.6 or from kernel 2.4 with DVB patches. If you have any problem with the linux-dvb drivers, please report the problem to the maintainers of the drivers, not to us. Thanks.

Stream with VLS


Note: VLS is currently deprecated and hasn't been maintained for years. It is strongly advised to use VLC instead, which now supports the same features as VLS, and many more. The only advantage of VLS is to support the dvbrc file syntax, and it requires a bit less CPU horsepower. However, we do not support VLS any longer. Put a .dvbrc file containing the DVB channels (satellite or digital terrestial TV channels) you want to stream in your home directory (some are provided in the libdvb tarball for the satellite channels). Run VLS with the following command line:
% vls -vv -d udp:192.168.0.42 dvb:"EUROSPORT" --ttl 12

where:

"EUROSPORT" is the channel you want to stream as written in your ~/.dvbrc file, 192.168.0.42 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

Stream with VLC


Note: VLC has many more features than VLS. First you can use the advanced stream output options such as transcoding and all kinds of output supports. Second VLC can take advantage of the Common Interface supported by some DVB adapters to descramble one or several services. Currently released versions of VLC only support the low-level API so some adapters won't work (budget-ci cards work, twinhan doesn't). Some CAM modules aren't compatible with some DVB cards, check the linux-dvb

documentation for more information. So-called "professional" CAM modules are able to descramble up to twelve services, whereas customer-oriented modules are often limited to one or two services unless otherwise specified. VLC must be compiled with --enable-dvb and you need the linux-dvb headers installed in your system. An example command-line is as follows:
% vlc -vvv --color --ttl 12 --ts-es-id-pid --programs=8508,8505 dvb: \ --dvb-frequency=11739000 --dvb-srate=27500000 --dvb-voltage=13 \ --sout-standard-access=udp --sout-standard-mux=ts --sout \ '#duplicate{dst=std{dst=address1},select="program=8508",dst=std{dst=address2},select="program=850 5"}'

The example above shows the minimum set of options needed to stream out two services. Here is a list of frontend options, depending on the frontend type:

common options
o o o o o

satellite frontend (QPSK)


o

dvb-adapter: specifies the adapter to use in case you have several adapters in your machine (by default use adapter 0) dvb-device: specifies the name of the DVB device to use (should not be needed with a standard linux-dvb installation) dvb-srate: specifies the symbol rate of the modulated signal, in symbols/s dvb-inversion: specifies whether the signal is inverted or not (default is automatic detection) dvb-budget-mode: enters a special mode where all PIDs are retrieved by the driver; it should no longer be necessary as VLC should filter wanted PIDs dvb-frequency: specifies the frequency to tune to in kHz; according to the frequency range, VLC auto-detects the band to use: S (2.5-2.7 GHz), C-lower (3.4-4.2 GHz), Chigher (4.5-4.8 GHz), Ku (10.7-13.25 GHz) or direct BIS frequency (0.95-2.15 GHz); it is mandatory to supply the dvb-srate option to satellite frontends dvb-voltage: specifies the voltage to apply on the IF; most LNBs behave differently when supplied with 13 V or 18 V; universal LNBs select vertical polarity with 13 V and horizontal with 18 V; you can also select 0 V if your LNB has another power supply (default is 13 V) dvb-tone: specifies whether to send a 22 kHz pulse tone to the LNB; universal LNBs switch to high-band when this pulse is sent; by default VLC automatically adopts the correct behaviour if the frequency supplied is in the Ku band (other bands do not need this) dvb-fec: specifies the code-rate to use for Forward Error Correction; type in the first number of the code-rate, for 2/3 use --dvb-rate=2, etc. (default is 9, meaning automatic detection) dvb-high-voltage: enables a special mode of the DVB adapter to compensate for the voltage loss in very long cables (AFAIK it is present in the API, but no DVB adapter actually implements it) dvb-lnb-lof1, dvb-lnb-lof2, dvb-lnb-slof: specifies the frequencies of the first and second local oscillators, and the frequency at which the 22 kHz pulse should be activated to enable the second oscillator; by default VLC uses the values for universal LNBs if the frequency supplied is in the Ku band (other bands do not need this)

cable frontend (QAM)

o o

terrestrial frontend (OFDM)


o o o o o o

dvb-frequency: specifies the frequency to tune to in Hz; it is mandatory to supply the dvb-srate option to cable frontends dvb-modulation: specifies the modulation of the analog signal; valid values are -1 (QPSK), 0 (automatic QAM, default), 16 (QAM16), 32 (QAM32), 64 (QAM64) 128 (QAM128), 256 (QAM256) dvb-frequency: specifies the frequency to tune to in Hz; it is mandatory to supply the dvb-bandwidth option, all other parameters are optional dvb-bandwidth: specifies the bandwidth of the OFDM channel (6, 7 or 8 MHz depending on the country) dvb-hierarchy: specifies if the OFDM channel uses hierarchic information; allowed values are -1 (no hierarchy), 0 (automatic, default), 1, 2 and 4 dvb-code-rate-hp, dvb-code-rate-lp: specifies the code-rate to use for higher and lower hierarchies respectively (default auto, same syntax as dvb-fec) dvb-guard: specifies the guard interval; valid values are 0 (automatic, default), 4 (1/4), 8 (1/8), 16 (1/16) and 32 (1/32) dvb-transmission: specifies the transmission mode; valid values are 0 (automatic, default), 2 (2K) and 8 (8K)

We also ought to explain the other non-dvb-specific options of the example command-line:

ts-es-id-pid: this option is necessary if you use the #duplicate stream output filter to split the multiplex in several outputs; there is no need to use #duplicate neither ts-es-id-pid if you have one program only programs, program, sout-all: there are several ways of specifying the services to select (and optionally descramble): o programs: used to specify one or serveral programs to select; VLC selects all known elementary streams of these programs; this is the currently recommended way o program: used to specify one program to select; it differs from using programs with only one program in that this option only select the first audio stream, and no subtitle stream; it should be used if you plan to switch programs and audio with a GUI o sout-all: tells VLC to select all programs; this is discouraged because of the extra CPU load needed to demultiplex unwanted programs, and because it is not compatible with CAM descrambling The other options are standard stream output options and are described in the other chapters of this documentation.

Hardware encoding cards


Note: This is possible under GNU/Linux only. VideoLAN supports two kinds of MPEG-2 encoding cards:

Hauppauge WinTV-PVR-250 and WinTV-PVR-350, Visiontech Kfir.

The Hauppauge WinTV-PVR-250/350 gives much better results and is cheaper than the Visiontech Kfir.

Stream with the Hauppauge WinTV-PVR-250/350 card


Install the drivers First, you will have to patch your kernel (version 2.4) to support the v4l2 API (Video 4 Linux version 2). The patch is available on the Video4Linux HQ. If you use a 2.6 kernel, you only need to build I2C support and the BT848 Video For Linux module. Once your kernel is ready, install the CK version (currently in development) of the Linux drivers for the Hauppauge WinTV-PVR-250/350. They are hosted on ivtv ck. You will need to patch your kernel to use it with a 2.4. You can also use the CVS version available here: ivtv.sourceforge.net (this version is not developped anymore). Then, you will have to create the device and load the modules; for this, please refer to the documentation shipped with the drivers. Stream with VLC Note: You must add --enable-pvr to ./configure to use this feature.
% vlc -vvv --color pvr:///dev/video0:norm=secam:size=720x576:frequency=576250:bitrate=3000000:maxbitrate=4000000 -cr-average 1000 --sout '#rtp{mux=ts,dst=192.168.0.42,port=5004}' --ttl 12

where:

/dev/video0 is the device corresponding to the encoding card, norm=secam is name of the standard of the analogic signal (possible values are pal, secam, and ntsc), size=720x576 is the size of the video you want to stream, frequency=567250 is the frequency in kHz of the channel you want to stream, bitrate=3000000 is the average bitrate of the stream, maxbitrate=4000000 is the maximum bitrate of the stream, 1000 is a secret value to work around a bug of the card. 192.168.0.42 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

Stream with the Visiontech Kfir card


Install the drivers If you want to be able to stream from a Visiontech Kfir card, you need to install its Linux drivers. Download the latest release of the drivers from the drivers download page of the [http://www.linuxtv.org/ LinuxTV web site]. Uncompress the tarball and follow the instructions written in the INSTALL file to compile and install the drivers. Note: If you have a VIA chipset, you need to disable USB in the BIOS. Stream
% vlc -vvv --color kfir:///dev/video --sout '#rtp{mux=ts,dst=192.168.0.42,port=5004}' --ttl 12

where:

/dev/video is the device corresponding to the Kfir card, 192.168.0.42 is either : o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

Software encoding cards


Under GNU/Linux
Install the Video for Linux drivers If you want to stream from an acquisition card or a webcam, a video4linux driver must be available for it. You can find more information about video4linux and supported devices here. Compile the right module for your device, and insert it into your kernel. Some video4linux modules are shipped with the 2.4.x and 2.6.x Linux kernels, the patch is available on the Video4Linux HQ. You can test your device by using any of the listed programs in the Video: TV and PVR/DVR section of this page. Note that v4l2 modules will also work with VLC. Stream with VLC Note: You must add --enable-v4l to ./configure to use this feature.

% vlc -vvv --color v4l:///dev/video:norm=secam:frequency=543250:size=640x480:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,venc=ffmpeg{keyint=80,hurryup,vt=800000},deinterlace}:rtp{mux=ts,dst=239.255.12.13,port=5004}' --ttl 12

Note: You can find all transcode options on this page : Advanced Streaming Using the Command Line. where:

/dev/video is the device corresponding to your acquisition card or your webcam, norm=secam is name of the standard of the analogic signal (possible values are pal, secam, and ntsc), frequency=543250 is the frequency of the channel in kHz (Warning: for VLC < 0.6.1, Frequency is channel frequency in MHz multiplied by 16), size=640x480 is the size of the video you want (you can also put the standard size like subqcif (128x96), qsif (160x120), qcif (176x144), sif (320x240), cif (352x288) or vga (640x480)), channel=0 is the number of the channel (usually 0 is for tuner, 1 for composite and 2 for svideo), adev=/dev/dsp is the audio device, audio=1 is the number of the audio channel (usually 0 is for mono and 1 for stereo), vcodec=mp4v is the video format you want to encode in (mp4v is MPEG-4, mpgv is MPEG-1, and there is also h263, DIV1, DIV2, DIV3, I420, I422, I444, RV24, YUY2), acodec=mpga is the audio format you want to encode in (mpga is MPEG audio layer 2, a52 is A52 i.e. AC3 sound), vb=3000 is the video bitrate in Kbit/s ab=256 is the audio bitrate in Kbit/s venc=ffmpeg allows to set the encoder to use, where: o keyint=80 is the maximal amount of frames between two key frames o hurry-up allows the encoder to decrease the quality of the stream if the CPU can't keep up with the encoding rate o vt=800000 is the tolerance in kbit/s for the bitrate of the outputted video deinterlace tells VLC to deinterlace the video on the fly, 192.168.0.42 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

Stream with DirectShow (Windows)


Install your peripheral drivers
You need to install your peripherals under Windows with the appropriate drivers. Nothing else is necessary.

Stream unicast/multicast with VLC in command line


% C:\Program Files\VideoLAN\VLC\vlc.exe -I rc --ttl 12 dshow:// vdev="VGA USB Camera" adev="USB Camera" size="640x480" --sout=#rtp{mux=ts,dst=239.255.42.12,port=5004}

Note: You either need to provide the full path to the vlc.exe executable or add its location to the Windows Path variable.

-I rc is to activate the remote control interface (MS/DOS console) 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers), vdev="VGA USB Camera" is the name of the video peripheral that DirectShow will use (this is only an exemple), adev="USB Camera" is the name of the audio peripheral, size="640x480" is the resolution (you can also put the standard size like subqcif (128x96), qsif (160x120), qcif

(176x144), sif (320x240), cif (352x288) or vga (640x480)).

239.255.42.12 is either: o the IP address of the machine you want to unicast to; o or the DNS name the machine you want to unicast to; o or a multicast IP address.

Stream to file(s) with VLC in command line


% C:\Path\To\vlc.exe -I rc dshow:// :dshow-vdev="Osprey-210 Video Device 1" :dshow-adev="Unbalanced 1 (Osprey-2X0)" :dshow-caching=200 -sout="#duplicate{dst='transcode{vcodec=h264,vb=1260,fps=24,scale=1,width=640,height=480,acodec= mp4a,ab=96,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\Path\\To\\File1.mp4}',dst='transcode{vcodec=h264,vb=560,fps=24,scale=1,width=427,height=320,acodec=mp4a,ab=96 ,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\Path\\To\\File-2.mp4}'}"

-I rc is to activate the remote control interface (MS/DOS console) dshow://... configures your input capture card / settings #duplicate{} multiple output configurations transcode{} video/audio codec settings std{} output/muxer settings

Mac OSX
Note that VLC does not support streaming from live video or audio sources on Mac OSX. Note: This is possible under GNU/Linux only.

Install the libraw1394 and libavc1394


If you want to be able to stream from a DV camcorder, then you need to install the libraries libraw1394 and libavc1394:

if you use a Fedora Core distribution then you just need to install the libraries using:

% yum update % yum install libraw1394 libavc1394'

if you want to install the libraries from the source then you must download them from the libraw1394 and libavc1394 from their projects website. if you have a distribution that uses udev, then you must add/change the following line to the file 50-udev.rules in your /etc/udev/rules.d directory.

% vi /etc/udev/rules.d/50-udev.rules # IEEE1394 (firewire) devices (must be before raw devices below) KERNEL=="raw1394", NAME="%k" KERNEL=="dv1394", NAME="dv1394/%k" KERNEL=="video1394*", NAME="video1394/%n"

The following sections assume that you have a working linux installation with the IEEE 1394 (Firewire) libraries installed, either manually from the source code or through your distributions upgrade mechanism.

Stream with DV
Connect the DV camcorder with a Firewire cable to your computer, and check the creation of the file /dev/raw1394. Run VLC with the following in one command line:
% vlc -vvv dv/rawdv:///dev/raw1394 --dv-caching 10000 --sout '#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mp3,ab=192,channels=2,fps=25.0}: std{access=mmsh,mux=asfh,url=:8080}'

where:

dv/rawdv:// is the DV input and /dev/raw1394 the device file, dv-caching is the delay is miliseconds (ms) (start with a high value, 10s or so, and lower it later), sout is the stream output chain that is used to stream the DV camcorder as a multimedia stream over the network. The transcode syntax is explained in the chapter about transcoding. The example as given above generates a multimedia stream that is compatible with Windows Media Player, sout-transcode-fps is the number of pictures per second 25.0 that the transcode module should generate of the requested audio/video codec.

Streaming for the iPhone


This functionality allows you to link VLC's transcoding capability with a segmenter which will in turn create the series of files needed for http live streaming to the iPhone. Unlike most of VLC's streaming, it doesn't actually stream the files, but assumes that you have your own webserver which will do that job.

Notes from the developer:


This has only been tested using H.264 w/MP3 or AAC audio using mux=ts, and raw MP3 using mux=raw I've been mostly an FFMPEG guy till now, so forgive me if my VLC understanding/terminology is somewhat off. This plug-in should support both Live and non-live HTTP Live streaming feeds, depending on the options passed to the module.

Notes from the community:

The user running vlc needs to have read/write/delete permissions on the directory where the .m3u8 playlist and .ts file segments will be created and deleted on the webserver.

Instructions
The name of the module is livehttp, and is specified by specifying "access=livehttp"

Options
splitanywhere= (default: false)

Tells livehttp to split the stream anywhere, not just on video keyframes. Currently required to be set to true for audio-only streams and not recommended (probably won't work) for video streams.

seglen= (default: 10)

How many seconds of audio/video each segment should contain. Apple recommends 10, I have been using 5.

numsegs=(default: 0)

The number of segments to keep in the index file. The default of 0 keeps all segments in the index (which you would want for non-live streaming). For live streaming the specification require at least 3.

delsegs= (default: true)

Delete segments as they are no longer needed. If numsegs=0 this parameter is ignored (as all segments are assumed to be needed)

dst=

This is actually an option to the access std module. The path of the segment files to write. The # characters get replaced with the segment number. So a path of "seg-###.ts" will end up with files called "seg-001.ts, seg-002.ts, seg-003.ts" etc.

index=

The path of the index file to write, which will contain the "playlist" of video/audio segments to stream. Recommended to end in .m3u8 by specifications. This is the file the <video> tag should be pointed to.

index-url=

This is the URL that corresponds to the dst above (how a browser would access the dst file). The # characters get replaced same as in the dst parameter. Note: The filename portion of this URL will most likely need to be in the exact same format as the dst parameter. So for example if dst=/www/seg-##.ts then the index-url should be something like indexurl=http://mydomain.com/streams/seg-##.ts (Note the same number of # characters)

ratecontrol=(default: false)

If set to false the there is no rate control (the muxer sends the data as fast/slow as it can to the streamer). If set to true the muxer should do rate-control to control the speed to muxed audio/video is sent to the streamer. Recommended setting is false in most cases. The only time I've needed this set to true is while doing a live sliding window stream of a local media file.

Examples
All examples assume the following:

The Web Server root directory is /var/www The domain name of the web server is mydomain.com The stream segments & index files will be written into /var/www/streaming/ and will be accessed via http://mydomain.com/streaming/... The destination stream name index file will be called "mystream.m3u8" The following HTML will allow you to view the video based on the above on an iPhone:

Re-stream a live video feed:


% vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit -sout='#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,le vel=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=true,numsegs=5,in dex=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}'

Create a VOD stream: (Non-live. When this command finishes, all the segments should have been created and the index file contain pointers to all of them)
% vlc -I dummy /var/myvideos/video.mpg vlc://quit -sout='#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,le vel=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=false,numsegs=0,in dex=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}'

Re-stream a live audio feed:

% vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit -sout='#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numse gs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream########.mp3},mux=raw,dst=/var/www/streaming/mystream-########.mp3},select=audio}'

Note: I found that these example don't work as written here; I won't edit them in place as they might work in different circumstances. I found two problems using the released version of VLC 2.0.0 on WinXP: 1. All examples need to have the single quotes surrounding the --sout parameter removed. Otherwise VLC complains "stream_out_standard stream out error: no mux specified or found by extension". 2. The final example is audio-only, but does not specify the splitanywhere=true flag. As a result it writes one massive chunk waiting for a keyframe that never comes. Example commandline that did work for me:
% vlc -I dummy x:\some\audio\here.ogg vlc://quit -sout=#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,splitanywhere=true,delsegs=true,nu msegs=5,index=c:\temp\mystream.m3u8,index-url=http://mydomain.com/streaming/mystream########.mp3},mux=raw,dst=c:\temp\mystream-########.mp3},select=audio}

Smowton 03:23, 27 February 2012 (CET)

Formats supported by the iOS


See the iPhone article for a list of supported codecs as well as Apple's HTTP Live Streaming FAQ.

Possible improvements/fixes
from the developer:

Have the module auto-detect audio only streams, so the splitanywhere option is not required. I'm not sure I am doing the right thing with the Win32 rename function. Linux (I believe) allows me to rename a file over an existing file, even if the existing file is in use. Win32 is not so friendly. This ability is useful for updating the index file at same time it may be currently being read by the HTTP server serving the files. Break the dst= and index= parameter into seperate filename/directory entries, so you only need to specify the filename format once. (instead of once for the dst= parameter, and once for the index-url= parameter)

from the community:


Have the module detect the codecs used and warn the end user if they are not compatible with the iPhone/iPod Touch/iPad. Possible multibitrate implementation that meets the iPhone SDK specs so app developers can use VLC to host streams for their apps.

fixes:

Audio only streams do not validate with Apple's mediastreamvalidator. Audio streams are missing id3tags and timestamps. Check with command, "mediastreamvalidator validate -timeout=60 [url]"

Streaming over IPv6


This chapter covers the specifics of streaming over IPv6. You should still read the previous chapters if you are not confortable with streaming in general.

Requirements
You will obviously need an IPv6-aware operating system. That includes Windows XP/2003, Linux 2.6, Mac OS X (starting from version 10.2). Windows 2000 and Linux 2.4 are supported too, but their IPv6 stacks are not as good, so upgrade if you can. IPv6 must be properly configured and working on your system and network. On Linux, the ipv6 kernel module must be loaded (or compiled-in). On Windows, the IPv6 protocols suite can be installed by running "ipv6 install" from the command line, or through the Network configuration panel. Note: Under Windows 2000, you must add by hand a default multicast IPv6 route, with the following command:
# ipv6 rtu ff::/8 4

where the last number (4 in this example) is the number of your true IPv6 interface. To have a list of your IPv6 interfaces, run ipv6 if Warning: Under Windows XP SP1, you may have problems with a hidden IPv6 firewall. To solve the problem, go to the list of Windows Services and stop the IPv6 firewalling service. You should consider upgrading to Service Pack 2 which provides an integrated IPv4/IPv6 firewall that can be configured through the GUI. Warning: If you are using VMware under Linux, you will have to stop VMware and unload the VMware kernel modules, because we noticed it prevented IPv6 streaming!

Limitations
There are still some features of the VLC media player which do not support IPv6. In particular, it is not possible to use RTSP over IPv6 because the underlying library, Live.com, does not support IPv6 at the time of writing. Additionnaly, note that at the moment, VLC defaults to using IPv4 mostly every, as it is what most people uses. That might be changed to something more transparent in future versions.

Streaming with VLC


With the Streaming Wizard (GUI) The streaming wizard accepts IPv6 addresses between braces, for example: [2002:8ac3:802d:1242:211:11ff:fe25:e6b4]. If you specify a link-local address, you will most likely need to specify the networking interface to use. On Unix, that can be done this way: [fe80::211:11ff:fe25:e6b4%eth0] to attach to eth0. Similarly, on Windows, you may specify

[fe80::211:11ff:fe25:e6b4%1] where 1 is the number of the network interface as defined by the operating system. If you're streaming over HTTP, note that IPv6 is automatically used by default (so that both IPv6 and IPv4 clients will be allowed). If you want to specify DNS hostname, keep in mind that the VLC defaults to IPv4 resolution. You must either specify hostnames that only resolves to IPv6 addresses, or enable the "Force IPv6" advanced option in Preferences / General Settings / Input. From the command-line The --ipv6 command line option force the use of IPv6 by default (ie. IPv6 is always attempted before IPv4).
% vlc -vvv video1.xyz --ipv6 --sout udp:[ff08::1] --ttl 12

where:

video1.xyz is the file you want to stream (you can also put dvdsimple:/dev/dvd to stream a DVD or any other input configuration), ff08::1 is either: o the IPv6 address of the machine you want to unicast to; o or the multicast IPv6 address. 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).

Note: Under Unix/Linux, you may have to protect the square brackets around the IPv6 address:
% vlc -vvv video1.xyz --ipv6 --sout udp:\[ff08::1\] --ttl 12

Note: You may have to specify the output network interface:


% vlc -vvv video1.xyz --ipv6 --sout udp:[ff08::1%eth0] --ttl 12

where eth0 is the name of the network interface (under Linux the network interfaces are named ethX, under Mac OS X it's enX and under Windows it's X, where X is the appropriate number).

Receiving an IPv6 stream


With the graphical user interface Select File / Open Network Stream. To receive an UDP/RTP unicast stream sent to your system, you should select the Force IPv6 option (and possibly adjust the destination UDP port). To receive an UDP multicast stream, select the UDP/RTP Multicast option, and specify the multicast address to subscribe to inside square brackets. The IPv6 addresses syntax is the same as that explained in the Streaming over IPv6 section of this chapter. From the command line

As for streaming, the --ipv6 command line option force the use of IPv6 by default (ie. IPv6 is always attempted before IPv4).
% vlc -vvv --ipv6 udp:@[ff08::1]

Under Unix/Linux, you may have to protect the square brackets around the IPv6 address:
% vlc -vvv --ipv6 udp:@\[ff08::1\]

You may have to specify the output network interface:


% vlc -vvv video1.xyz --ipv6 --sout udp:[ff08::1%eth0] --ttl 12

where eth0 is the name of the network interface (under Linux the network interfaces are named ethX, under Mac OS X it's enX and under Windows it's X, where X is the appropriate number).

S-ar putea să vă placă și