Difference between revisions of "Documentation:Command line"

From VideoLAN Wiki
Jump to navigation Jump to search
(Created page with "'''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 ...")
 
Line 1: Line 1:
 +
== Use the command line ==
 +
 
'''TODO: completely outdated'''  
 
'''TODO: completely outdated'''  
  
Line 7: Line 9:
 
  Note: Windows users have to use the ''--option-name="value"'' syntax instead of the ''--option-name value'' syntax.
 
  Note: Windows users have to use the ''--option-name="value"'' syntax instead of the ''--option-name value'' syntax.
  
=== Getting help ===
+
== 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, ...  
 
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, ...  
Line 17: Line 19:
 
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.'''  
 
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 ===
+
== Opening streams ==
  
 
The following commands start VLC and start reading the given element(s):
 
The following commands start VLC and start reading the given element(s):
  
==== Opening a file ====
+
=== Opening a file ===
  
 
Start VLC with:  
 
Start VLC with:  
Line 31: Line 33:
 
A list of all video and audio codecs supported by VLC is available on the [http://www.videolan.org/vlc/features.html VLC features list].  
 
A list of all video and audio codecs supported by VLC is available on the [http://www.videolan.org/vlc/features.html VLC features list].  
  
==== Opening a DVD or VCD, or an audio CD ====
+
=== Opening a DVD or VCD, or an audio CD ===
  
 
Start VLC with:  
 
Start VLC with:  
Line 59: Line 61:
 
  % '''vlc cdda://[device][@[track]]'''
 
  % '''vlc cdda://[device][@[track]]'''
  
==== Receiving a network stream ====
+
=== Receiving a network stream ===
  
 
To receive an unicast RTP/UDP stream (sent by VLC's stream output), start VLC with:  
 
To receive an unicast RTP/UDP stream (sent by VLC's stream output), start VLC with:  
Line 85: Line 87:
 
  % '''vlc rtsp://www.example.org/your_stream'''
 
  % '''vlc rtsp://www.example.org/your_stream'''
  
=== Modules selection ===
+
== 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.  
 
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.  
Line 97: Line 99:
 
You can get a listing of the available modules by using '''vlc -l'''  
 
You can get a listing of the available modules by using '''vlc -l'''  
  
=== Stream Output ===
+
== Stream Output ==
  
 
The Stream output system allows vlc to become a streaming server.  
 
The Stream output system allows vlc to become a streaming server.  
Line 105: Line 107:
 
<br>  
 
<br>  
  
=== Other Options ===
+
== Other Options ==
  
==== Audio 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)  
 
*'''--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)  
Line 116: Line 118:
 
*'''--audio-filter &lt;string&gt;''' 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)
 
*'''--audio-filter &lt;string&gt;''' 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 ====
+
=== Video options ===
  
 
*'''--no-video''' disables video output.  
 
*'''--no-video''' disables video output.  
Line 131: Line 133:
 
*'''--sub-filter &lt;string&gt;''' adds video subpictures filter to the processing chain.
 
*'''--sub-filter &lt;string&gt;''' adds video subpictures filter to the processing chain.
  
==== Desktop/Screen grab options ====
+
=== 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&amp;t=46971  
 
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&amp;t=46971  
  
==== Playlist options ====
+
=== Playlist options ===
  
 
*'''--random''' plays files randomly forever.  
 
*'''--random''' plays files randomly forever.  
Line 142: Line 144:
 
*'''--play-and-stop''' stops the playlist after each played item.
 
*'''--play-and-stop''' stops the playlist after each played item.
  
==== Network options ====
+
=== Network options ===
  
 
*'''--server-port &lt;integer&gt;''' sets server port.  
 
*'''--server-port &lt;integer&gt;''' sets server port.  
Line 151: Line 153:
 
*'''--ipv4''' forces IPv4.
 
*'''--ipv4''' forces IPv4.
  
==== CPU options ====
+
=== CPU options ===
  
 
You should probably not touch these options unless you know what you are doing.  
 
You should probably not touch these options unless you know what you are doing.  
Line 161: Line 163:
 
*'''--noaltivec''' disables the use of Altivec CPU extensions.
 
*'''--noaltivec''' disables the use of Altivec CPU extensions.
  
==== Miscellaneous options ====
+
=== Miscellaneous options ===
  
 
*'''--quiet''' deactivates all console messages.  
 
*'''--quiet''' deactivates all console messages.  
Line 177: Line 179:
 
*'''--module &lt;module&gt; ''' displays help about specified module. (Shortcut: '''-p''')
 
*'''--module &lt;module&gt; ''' displays help about specified module. (Shortcut: '''-p''')
  
=== Item-specific options ===
+
== Item-specific options ==
  
 
There are many options that are related to items (like '''--novideo''', '''--codec''', '''--fullscreen''').  
 
There are many options that are related to items (like '''--novideo''', '''--codec''', '''--fullscreen''').  
Line 196: Line 198:
  
 
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).
 
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).
 +
  
 
{{Documentation}}
 
{{Documentation}}
  
 
{{Category:Stubs}}
 
{{Category:Stubs}}

Revision as of 13:49, 26 September 2013

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


This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
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.


This page contains entries which need some work: add pages with {{Stub}} or {{Compat}}