Vlc команды командной строки
VLC is one of the most loved media players out there. Free, open source and compatible with almost every operating system, it can do almost everything that one expects it to do and sometimes even more. However, there is something that makes VLC even more special on Linux-the command line. The command line lets you bypass the graphical interface of VLC and makes it very easy to create and use scripts to get what you want done from the media player. We are going to go through 7 of such command lines that you must know.
Linux/Unix
How to get a Linux terminal varies by distribution (for any desktop setup it will be somewhere in the applications; these are merely shortcuts). If you use Ubuntu or Linux Mint, gnome-terminal can be opened with the key combination Ctrl+Alt+T . If you use RHEL/Fedora/CentOS, gnome-terminal can be opened by right-clicking on the desktop and selecting Open terminal .
To run VLC, you can normally type
replacing options with the name of the file to play and its options.
You need to be quite comfortable with command line usage to use this.
Clone video filter
This filter clones the output window.
Module name: clone
- clone-count : Number of video windows in which to clone the video. default value: 2
- clone-vout-list : You can use specific video output modules for the clones. Use a comma-separated list of modules. default value: ""
Network options
- --server-port sets server port.
- --iface specifies the network interface to use.
- --iface-addr specifies your network interface IP address.
- --mtu specifies the MTU of the network interface.
- --ipv6 forces IPv6.
- --ipv4 forces IPv4.
Other Options
Video pictures blending
Module name: blend
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.
- --no-repeat --no-loop prevents the video from being executed again. (Useful when want to encode a file)
Запуск и справка
Для того чтобы осуществлять взаимодействие с функциями плеера путем ввода указаний консоль, необходимо осуществить вызов этого программного модуля.
Запуск средства производится пошаговым входом в:
Таким образом, открывается знакомое опытным пользователям аскетичное окно, сразу же готовое к приему команд.
Первым указание, которое следует осуществить, это вызов справки, демонстрирующей многие доступные пользователю VLC параметры командной строки и синтаксис вводимого. Набираем help и нажимаем «Enter».
Как запустить VLC с возможностью удалённого управления?
Удалённое управление позволяет делать несколько интерфейсов управления.
Управление VLC через веб-браузер
Для запуска VLC плеера необходимо набрать команду:
После запуска необходимо открыть в браузере страницу:
Через эту страницу можно управлять работой плеера.
Управление VLC через RC
Данное управление очень удобно для создания программы, которая будет управлять VLC плеером, так как управление осуществляется отправкой простых команд. Для запуска плеера необходимо набрать команду:
Для управления необходима программа, которая может передавать бинарные команды. Для этого подойдёт команда putty. Запускаем программу и выбираем протокол RAW, IP адрес 127.0.0.1 и порт 4444. Стоит отметить, что если установлен русский язык, то на вкладке Windows->Translation необходимо установить UTF-8.
После жмём Open.
Протестировано на версии VLC 1.0.0
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, .
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.
Marquee display sub filter
Module name: marq
- marq-marquee : Marquee text to display. default value: VLC
- marq-file : File to read the marquee text from. default value: NULL
- marq-x : X offset, from the left screen edge. default value: 0
- marq-y : Y offset, down from the top. default value: 0
- marq-position : Marquee position: 0=center, 1=left, 2=right, 4=top, 8=bottom, you can also use combinations of these values, eg 6 = top-right. default value: -1
- marq-opacity : Opacity (inverse of transparency) of overlaid text. 0 = transparent, 255 = totally opaque. default value: 255
- marq-color : Color of the text that will be rendered on the video. This must be an hexadecimal (like HTML colors). The first two chars are for red, then green, then blue. default value: 0xFFFFFF
- marq-size : Font size, in pixels. 0 uses the default font size. default value: 0
- marq-timeout : Number of milliseconds the marquee must remain displayed. 0 means forever. default value: 0
- marq-refresh : Number of milliseconds between string updates. This is mainly useful when using meta data or time format string sequences. default value: 1000
The time sub filter was merged into this module.
Video transformation filter
Module name: transform
- transform-type : Transformation type default value: "90"
Command Line 2: How to Capture A Screencast Using VLC Command Line
Please note that this is a long command as you can see and the whole things is one single line. So you have to copy & paste it or type it exactly the same way for it to work. The sections that you may have to change are as follows:
- c:pathtovlc.exe: You can change this to the actual path to your vlc.exe file as on your computer.
- :screen-fps=24: This one is simple, set this to your choice of the frames-per-second rate you want to record with.
- :screen-follow-mouse: This will record the the mouse pointer as well. You may exclude this section if you do not want the mouse pointer recorded in your screencast.
- :screen-mouse-image: If recording the mouse pointer too, this little piece of command will fetch the pointer image as you want.
- vb=1024: This is used to set the bitrate you want to record with. Remeber, that a higher bitrate produces better quality video but with a larger file size (also, this will work combined with the fps value). Values of 1500 / 2048 are the recommended ones for improved quality.
- :scale=1.0: This value helps in reducing or enlarging your video proportionally. A value of 0.5 would help in creating a screencast of your desktop in a scaled down to half-size version, for example.
- cropleft,croptop,cropright,cropbottom: This is the set of values that will determine the pixel size of the crop areas. If you choose to set it to 0, it will capture your complete desktop. And, let's say that you decide to set cropleft to 100, then the recorded desktop will end up being with cropped out width from the left side of your desktop by 100 pixels exactly.
- dst="": This indicates the complete path and the file name of the video you are creating.
Opening streams
The following commands start VLC and start reading the given element(s):
Command Line 1: Starting VLC via Command Line to Play A Video as Desktop Wallpaper
"C:Program Files (x86)VideoLANVLCvlc.exe" rel="nofollow" --qt-start-minimized --video-wallpaper --no-video-title-show --repeat "C:DownloadsTutorial.mp4"
In this command, replace the paths C:Program Files (x86)VideoLANVLCvlc.exe (default location of VLC Media Player) and C:DownloadsTutorial.mp4(location of the video file) with the ones that are appropriate for your computer.
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 sets the video window dimensions. By default, the video window size will be adjusted to match the video dimensions.
- --start-time starts the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90)
- --stop-time stops the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90)
- --zoom adds a zoom factor.
- --aspect-ratio forces source aspect ratio. Modes are 4x3, 16x9, .
- --spumargin forces SPU subtitles postion.
- --video-filter adds video filters to the processing chain. You can add several filters, separated by commas
- --video-splitter adds video splitters to the processing chain. (wall, panoramix, clone)
- --sub-filter adds video subpictures filter to the processing chain.
Opening a DVD or VCD, or an audio CD
In most cases, vlc dvd:// or vlc dvd://[device] will do.
- On GNU/Linux [device] is the path to the block device: e.g., vlc dvd:///dev/dvd.
- On Windows, [device] is the drive letter with / and :/: e.g., vlc dvd:///D:/.
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.
will play file1.mpg in fullscreen mode and file2.mpg in the default mode (which is generally no fullscreen), whereas
will play both files in fullscreen mode
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).
Где log файл VLC?
Обычно лог файл VLC расположен там, где находится сам исполняемый файл, то есть в C:\Program Files\VideoLAN\VLC\. Если там файла нет, то он может быть в директории, в которой находится файл, который вы запускали.
Протестировано на версии VLC 1.0.0
Opening a 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.
Command Line 4: Capture Video from VLC Command Line with A Stop Time
cvlc -vvv rtp://address:port --start-time=00 --run-time=300 --sout file/ts:test.ts
Adjust the run-time to the time in seconds you want the video to be captured.
Command Line 7: Run VLC from the Command Line on Mac OS X and Stream Internet Radio (Such as Radio Paradise)
You may also make this executable after having saved it to /usEr/local/bin-chmod +x /usr/local/bin/vlc
This page describes how to access the terminal and start VLC in it.
A terminal is a text-based way to run programs. It is normally pre-installed on your computer. The command prompt may also be called the "Command Prompt", "Console", "Terminal", "MS-DOS Prompt", or something similar.
Running VLC from the terminal gives you access to many commands and features in VideoLAN which you would not otherwise have: see the VLC command-line help page to find out more about options from the command line.
Tip: For extended command-line work (or play) it may be worth changing to the directory of VLC. Most command-line interpreters will understand vlc or vlc.exe to be the program in that directory.
macOS
You can run VLC on macOS using a terminal application, such as Terminal.app in /Applications/Utilities. In the terminal window type
replacing options with VLC options, commands, the name of the file to play, and so on.
In older versions you could replace the "VLC" at the end of the path with "clivlc" to suppress the launch of any Mac-like interface.
Как запустить VLC в полноэкранном режиме?
Для запуска в полноэкранном режиме необходимо набрать команду:
Протестировано на версии VLC 1.0.0
Receiving a network stream
To receive an unicast RTP/UDP stream (sent by VLC's stream output), start VLC with:
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:
To receive a SSM (source specific multicast) stream, you can use:
This only works on OSs that support SSM (Windows XP and Linux).
To receive a RTSP stream, start VLC with:
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.
Deinterlacing video filter
Module name: deinterlace
- sout-deinterlace-mode : Streaming deinterlace mode. Deinterlace method to use for streaming
- sout-deinterlace-phosphor-chroma : Phosphor chroma mode for 4:2:0 input. Choose handling for colours in those output frames that fall across input frame boundaries.
- Latest (1): take chroma from new (bright) field. Good for interlaced input, such as videos from a camcorder
- AltLine (2): take chroma line 1 from top field, line 2 from bottom field, etc. Default, good for NTSC telecined input (anime DVDs, etc.)
- Blend (3): average input field chromas. May distort the colours of the new (bright) field, too
- Upconvert (4): output in 4:2:2 format (independent chroma for each field). Best simulation, but requires more CPU and memory bandwidth default value: 2
Distort video filter
Module name: distort
Subpictures Filters
These are the new VLC filters. They can be streamed.
Wondershare UniConverter (originally Wondershare Video Converter Ultimate) - Your Complete Video Toolbox
- Play what VLC cannot play, one player to play all!
- Converts files 30x faster than other converters.
- Convert to fast all Formats Including 4K/3D.
- Edit, Enhance & Personalize Your Videos File.
- Download videos from 1000+ video sharing sites.
- Record streaming online videos or screens.
- Burn & Customize your video to DVD with free DVD menu templates. , Samsung TV, LG TV, etc.
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.
Пример использования
В большинстве случаев рассматриваемый способ взаимодействия используется для удаленного управления функциями приложения. При этом следует отметить, командная строка способна заменить графический интерфейс практически полностью. Пошлем несколько указаний плееру, просматривая медиапоток из Интернета, чтобы продемонстрировать возможности инструмента.
Точно таким же образом осуществляется управлением массой других функций. Некоторые возможности доступны исключительно из консоли, поэтому изучение команд инструмента является необходимым для использования приложения в профессиональной сфере.
Command Line 5: Using VLC to Record MP3 Streams
You only have to change the file path accordingly to your choice and can even include the line --stop-time 10 to control how much of the file do you want recorded.
Windows
In Windows, this is called the command prompt. To open the command prompt:
- Click on the Start Menu and select Run.
- In the Run box, type cmd (or command for older versions of Windows) and press enter.
The command prompt will look something like this:
To run VLC, you will need to know where you installed VLC; the default is "%PROGRAMFILES%\VideoLAN\VLC" . So to start VLC, type the full path to VLC and the options:
replacing options with the name of the file to play and its options.
Invert video filter
Module name: invert
Logo video filter
Module name: logo
This filter can be used both as an old style filter or a subpictures filter.
- logo-file : Image to display. The full format is [,[,]][;[,[,]]][;. ] .
- logo-x : X offset from upper left corner. default value: 0
- logo-y : Y offset from upper left corner. default value: 0
- logo-position : Logo position. default value: 5
- logo-opacity : Logo opacity. 0 is transparent, 255 is fully opaque. default value: 255
- logo-delay : Global delay in ms. Sets the duration each image will be displayed for in a loop iteration unless specified otherwise in the --logo-file option. default value: 1000
- logo-repeat : Number of loops for the logo animation. -1 for continuous, 0 to disable. default value: -1
Note: You can move the logo by left-clicking on it.
This page is part of official VLC media player Documentation (User Guide • Streaming HowTo • Hacker Guide • Modules)
Please read the Documentation Editing Guidelines before you edit the documentationPermission 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.
Информация отладки выводит много дополнительной информации, в том числе ошибки, дополнительную информация о файлах. Это очень удобно для выявления причин, вызывающих ошибку.
Для получения отладочной информации необходимо набрать команду:
Стоит отметить, что в данном случае VLC запустится и также запустится окно консоли с информацией об отладке, но вся отладочная информация будет дублироваться в файл vlc-log.txt. Файл vlc-log.txt должен быть в кодировке UTF8. Также поддерживается разный уровень детальности:
- --verbose=2 - значит, что будет выводиться вся информация отладки.
- --verbose=1 - значит, что будут выводиться предупреждения и ошибки.
- --verbose=0 - значит, что будут выводиться только ошибки.
Протестировано на версии VLC 1.0.0
Как запустить vlc с определенного интерфейса?
VLC включает в себя много различных интерфейсов, как стандартных, так и специфических. Например, управление им через браузер или управление удалённо. Также возможен запуск сразу с несколькими интерфейсами. Для того, чтобы запустить VLC с определённым интерфейсом, необходимо набрать в командной строке команду:
В данном случае dummy - название интерфейса, вместо ИМЯ_ФАЙЛА следует написать файл, который вы хотите запустить, в принципе его можно и не указывать. Кроме него там могут быть и другие названия, которые приведены ниже:
- blackpearl.vlt - название файла скина, который расположен в папке skins.
- qt4 - стандартный интерфейс под Windows.
- rc - интерфейс удалённого управления.
- ntservice - запуск как служба, может и не сработать. Возможно необходимы дополнительные параметры.
- lua - для запуска необходимо задать дополнительные параметры.
- gestures - управление мышью.
Также вместо -I можно использовать --extraintf, при этом интерфейс будет не основным, а добавочным. Команда может выглядит так:
Далеко не все функциональные возможности медиакомбайна VLC Media Player доступны при использовании графического интерфейса программы. Для многих пользователей плеера весьма полезным может оказаться знание команд, расширяющих перечень возможных действий с медиафайлами и сетевыми мультимедиапотоками. О параметрах командной строки VLC и не совсем стандартных способах взаимодействия с проигрывателем пойдет речь в статье.
Command Line 1: Starting VLC via Command Line to Play A Video as Desktop Wallpaper
"C:Program Files (x86)VideoLANVLCvlc.exe" rel="nofollow" --qt-start-minimized --video-wallpaper --no-video-title-show --repeat "C:DownloadsTutorial.mp4"
In this command, replace the paths C:Program Files (x86)VideoLANVLCvlc.exe (default location of VLC Media Player) and C:DownloadsTutorial.mp4(location of the video file) with the ones that are appropriate for your computer.
Crop video filter
Module name: crop
- crop-geometry : Set the geometry of the zone to crop. This is set as × + +
- autocrop : Automatically detect black borders and crop them default value: disabled
- autocrop-ratio-max : Maximum image ratio. The crop plugin will never automatically crop to a higher ratio (ie, to a more "flat" image). The value is ×1000: 1333 means 4⁄3 default value: 2405
- crop-ratio : Force a ratio (0 for automatic). Value is ×1000: 1333 means 4⁄3 default value: 0
- autocrop-time : The number of consecutive images with the same detected ratio (different from the previously detected ratio) to consider that ratio changed and trigger recrop default value: 25
- autocrop-diff : The minimum difference in the number of detected black lines to consider that ratio changed and trigger recrop default value: 16
- autocrop-non-black-pixels : The maximum of non-black pixels in a line to consider that the line is black default value: 3
- autocrop-skip-percent : Percentage of the line to consider while checking for black lines. This allows skipping logos in black borders and crop them anyway default value: 17
- autocrop-luminance-threshold : Maximum luminance to consider a pixel as black (0-128) default value: 40
Command Line 3: How to Play Only A Part from A Video with VLC Command Line
start "C:Program FilesVLCvlc.exe" rel="nofollow" "D:MoviesThe Italian Job.avi" --start-time 12 --stop-time 20
You simply have to use the command line as given above, with the file paths and the time changed as needed. The numbers 12 and 20 in the command line indicate 12 seconds and 20 seconds respectively.
We also suggest an amazing alternative for this since not all of us would be comfortable using command lines to get these results. The way out for those who prefer a less complicated means to achieve this would be using Wondershare UniConverter (originally Wondershare Video Converter Ultimate)instead.
Image properties filter
Module name: adjust
- contrast : Contrast default value: 1.0
- brightness : Brightness default value: 1.0
- hue : Hue default value: 0
- saturation : Saturation default value: 1.0
- gamma : Gamma default value: 1.0
- brightness-threshold : When this mode is enabled, pixels will be shown as black or white. Also may invert the brightness value. The threshold value will be the brightness defined below default value: disabled
Command Line 6: Make VLC Stop Automatically after Recording
In order to make VLC stop / quit after the recording is over, just add this small section vlc://quit to the end of the above command line.
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.
You can get a listing of the available modules by using vlc -l
Motion blur filter
Module name: motionblur
- motionblur-factor : The bluring factor (1 to 127). Higher values mean more blurring default value: 80
Wall video filter
Module name: wall
This filter splits the output in several windows.
- wall-cols : Number of horizontal windows in which to split the video default value: 3
- wall-rows : Number of vertical windows in which to split the video default value: 3
- wall-active : Comma-separated list of active windows, defaults to all default value: NULL
- wall-element-aspect : Aspect ratio of the individual displays building the wall default value: 4:3
Note: for --wall-active , to select windows 2 and 4 you would write --wall-active 2,4. When this option isn't specified, all windows are displayed.
Desktop/Screen grab 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.
Miscellaneous options
- --quiet deactivates all console messages.
- --color displays color messages.
- --search-path specifies interface default search path.
- --plugin-path specifies plugin search path.
- --no-plugins-cache disables the plugin cache (plugins cache speeds up startup)
- --dvd specifies the default DVD device.
- --vcd specifies the default VCD device.
- --program specifies program (SID) (for streams with several programs, like satellite ones).
- --audio-type specifies the default audio type to use with dvds.
- --audio-channel specifies the default audio channel to use with dvds.
- --spu-channel specifies the default subtitle channel to use with dvds.
- --version gives you information about the current VLC version.
- --module displays help about specified module. (Shortcut: -p)
Video scaling filter
Module name: scale
Audio options
Note that in recent versions (3.x.x branch, possibly earlier):
- --mono no longer exists: use --stereo-mode=0 instead
- --volume no longer exists but --volume-step and --gain may be used
- --aout-rate no longer exists: --audio-resampler might be equivalent?
- --desync no longer exists: use --audio-desync instead
- --audio, --no-audio 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)
- --gain audio gain (between 0 and 8)
- --volume-step audio output volume step (between 1 and 256)
- --volume-save, --no-volume-save remember the volume (default enabled)
- --spdif, --no-spdif Force S/PDIF support (default disabled)
- --force-dolby-surroundForce detection of Dolby Surround
- --stereo-modeStereo audio output mode
- --audio-desync Audio desynchronization compensation
- --audio-replay-gain-modeReplay gain mode
- --audio-replay-gain-preamp Replay preamp
- --audio-replay-gain-default Default replay gain
- --audio-replay-gain-peak-protection, --no-audio-replay-gain-peak-protection Peak protection (default enabled)
- --audio-time-stretch, --no-audio-time-stretch Enable time stretching audio (default enabled)
- -A, --aoutAudio output module
- --roleMedia role
- --audio-filter adds audio filters to the processing chain. Available filters are visual (visualizer with spectrum analyzer and oscilloscope), headphone (virtual headphone spatialization) and normalizer (volume normalizer)
- --audio-visualAudio visualizations
- --audio-resamplerAudio resampler
Читайте также: