Google
 
Web navigator-tv.narod.ru
videolan.org

 

 

 

Глава 4. Передовое использование VLC

Table of Contents

Use the command line (Используйте командную линию)

Advanced use of filters (Передовое использование фильтров)

The HTTP interface (Интерфейс http)

Other control interfaces (Другие управляющие интерфейсы)

 
Качественный хостинг по самым низким ценам - VIPstorage.ru
 http://www.vipstorage.ru.

The Mozilla plugin (Mozilla плагин)

Use the command line (Используйте командную линию)

Все стандартные действия VLC доступны в "Графическом интерфейсе пользователя". Тем не менее, более сложные действия могут быть выполнены с командной линии и есть ситуации в которых вам не нужно пользоватся "Графическим интерфейсом пользователя". Вот полное описание командной линии VLC's и как, ее использовать

You need to be quite comfortable with command line usage to use this.

Примечание

Пользователи Windows должны использовать --option-name="value" синтаксис --option-name value синтаксис

Основные понятия

VLC ИСПОЛЬЗУЕТ модульную структуру. Сердцевина главным образом управляет связью между модулями. Вся обработка мультимедиа сделана посредством модулей. Есть входные модули, демультиплексоры, дешифраторы, видео выходные модули,...

Эта глава опишет только общие и основные опции. Каждый модуль добавляет новые опции. Например, входной модуль HTTP добавит опции для кэширования, полномочия, аутентификации,...

Используя vlc --help, вы получите основные опции. vlc --longhelp все основные опции (сердцевина + модули). Дополнение --advanced даст "передовые опции" (для опытных пользователей). Так vlc --longhelp --advanced даст вам все опции

Также, вы можете получить отладочную информацию. Для того, чтобы сделать это, используйте -v или -vv ( покажет более низкие серьёзные сообщения). Если ваша консоль поддерживает это, Вы можете добавить --цвет, чтобы получать сообщения в цвете.

Opening streams (Открытие потоков)

Следующее приказывает начать VLC ичитать данный элемент(элементы)

Открытие файла

запуск VLC с:

 
% vlc my_file

VLC способен распознать файловый тип. Если это он этого несмог, Вы можете запустить демультиплексор и дешифратор (смотри ниже).

Список всего видео и звука codecs поддерживаемого VLC доступен в списке характеристик VLC.

Открытие DVD или VCD, или аудио CD

запуск VLC:

DVD с меню:

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

В большинстве случаев,vlc dvd:// or vlc dvd://[device] нужно. [device] например /dev/dvd на GNU/Linux или D: в Windows (полный путь в ваш привод DVD).

или (DVD без меню):

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

или (VCD):

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

или (Audio CD):

 
% vlc cdda://[device][@[track]]

Receiving a network stream (Получение сетевого потока)

Для того, чтобы получать поток unicast UDP (посланное VLS или выходом потока VLC's), запустите VLC с:

 
% vlc udp:[@:server_port]

Если вы используете встроенный порт (1234), vlc udp: заработает. Более подробно, смотрите в Streaming Howto

Чтобы получать multicast UDP stream(широковещательный поток UDP) (посланное VLS или выходом потока VLC's), запустите VLC с:

 
% vlc udp:@multicast_address[:server_port]

Чтобы получать SSM поток (исходный специфический широковещательный)( (source specific multicast)), вы можете использовать

 
% vlc udp:server_address@multicast_address[:server_port]

Это только работает на OSs, которое поддерживает SSM (Windows XP и последние Linux kernels

Для того, чтобы получать поток HTTP, запустите VLC с:

 
% vlc http://www.example.org/your_file.mpg
 
Для того, чтобы получать поток RTSP, запустите VLC с:
 
% vlc rtsp://www.example.org/your_stream

Modules selection (Выбор Модулей)

VLC ВСЕГДА пытается, выбирать наиболее подходящий интерфейс, входные и выходные модули, среди тех что доступны в системе, в зависимости от того кем выдаётся поток , для воспроизведения. Тем не менее, вы можете использовать другие специфические модули с следующими опциями.

         --intf <module> позволяет выбирать модуль интерфейса.

         --extraintf <module> позволяет выбирать дополнительные модули интерфейса, которые будут запущены дополнительно к основному. Это главным образом полезное для специальных управляющих интерфейсов, подобно HTTP, RC (Дистанционный Контроль ((Remote Control), )),... (смотри ниже)

         --aout <module> позволяет выбирать аудио выходной модуль.

         --vout <module> позволяет выбирать видео выходной модуль.

         --memcpy <module> позволяет выбирать модуль копии памяти. Вы вероятно никогда не будете касаться его.

Вы можете получить листинг доступных модулей используя vlc -l

Выход Потока

Выходная система потока настраивает vlc, streaming сервером.

Если нужна дополнительная информация о выходной системе потока, пожалуйста ознакомьтесь Streaming Howto.

Other Options (Другие опции)

Audio options

         --noaudio блокирует аудио выход.

         --mono forces VLC, переключение потока на моно звук

         --volume <integer> устанавливает уровень аудио выхода (между 0 и 1024)

         --aout-rate <integer> устанавливает аудио выходную частоту (Гц). По умолчанию, VLC пытается сделать это автоматически.

         --desync <integer> компенсирует desynchronization(десинхронизирует) звук (мс). (Если звук и видео потоки не синхронизированы, используется эта установка, чтобы задерживать аудио поток)

         --audio-filter <string> добавляет аудио фильтры к обработке цепи. Доступные фильтры визуальные (visualizer с анализатором спектра и осциллографа), наушник (виртуальный наушник spatialization) и нормализатор (нормализатор объема)

Видео опции

         --novideo блокирует видео выход.

         --greyscale видео выход поворотов в режим полутоновой шкалы.

         --fullscreen ( или -f) комплекты fullscreen видео.

         --nooverlay блокирует аппаратное ускорение для видео выхода.

         --width, --height <integer> устанавливает видео измерение окна. По умолчанию, видео размер окна будет скорректирован, чтобы соответствовать видео измерениям.

         --zoom <float> добавляет изменение масштаба показателя.

         --aspect-ratio <mode> исходное отношение свободной длины к высоте сил. Способы - 4x3, 16x9, ...

         --spumargin <integer> давать подзаголовок субтитров сил SPU postion.

         --filter <string> добавляет видео фильтры к обработке цепи. Вы можете добавить несколько фильтров, разделенных запятыми

         --sout-transcode-sfilter <string> добавляет видео subpictures фильтр к обработке цепи.

Playlist options (опции Playlist)

         --random файлы произвольно воспроизводятся.

         --loop циклы playlist в конце.

         --repeat повторяет текущий пункт до следующего пункта принудительно

         --play-and-stop останавливает playlist после каждого сыгранного пункта.

Сетевые опции

         --server-port <integer> устанавливает порт сервера

         --iface <string> определяет сетевой интерфейс, пользователя.

         --iface-addr <string> определяет ваш сетевой адрес интерфейса IP.

         --mtu <integer> определяет MTU сетевой интерфейс.

         --ipv6 принудительный IPv6.

         --ipv4 принудительный IPv4.

CPU options (опции CPU)

Неиспользуйте эти опции если вы незнаете что делаете.

         --nommx блокирует использование расширений MMX CPU

         --no3dn disables the use of 3D Now! CPU extensions.

         --nommxext блокирует использование расширений MMX Ext CPU.

         --nosse блокирует использование расширений MMX Ext CPU.

         --noaltivec блокирет использование расширений MMX Ext CPU.

Miscellaneous options (Смешанные выборы)

         --quiet деактивизирует все консольные сообщения.

         --color окрашивают сообщения.

         --search-path <string> определяет путь встроенного поиска интерфейса.

         --plugin-path <string> определяет plugin путь поиска.

         --no-plugins-cache блокирует кеш plugin (plugins кеш ускоряющий запуск)

         --dvd <string> определяет встроенное устройство DVD.

         --vcd <string> определяет встроенное устройство VCD.

         --program <;integer> определяет программу (SID) (для потоков с несколькими программами, подобно спутнику ).

         --audio-type <integer> определяет встроенный аудио тип, чтобы пользоваться сdvds.

         --audio-channel <integer> определяет встроенный аудио канал, чтобы пользоваться dvds.

         --spu-channel <integer> определяет встроенный канал подзаголовка, чтобы использоваться с dvds.

         --version дает вам информацию о текущей версии VLC.

         --module <module> помощь показов об определенном модуле. (Сокращенный : -p)

Advanced use of filters (Передовое использование фильтров)

Фильтры

These are the old style VLC filters. They only apply to on screen display and thus cannot be streamed.

Видео фильтр Deinterlacing

         Модульное имя : deinterlace

          

         --deinterlace-mode {discard,blend,mean,bob,linear} выберите deinterlacing способ.

Инвертируйте видео фильтр

Модульное имя: invert

Фильтр свойств Образа

Модульное имя: adjust

         --contrast <float> Контраст Образа в 0-2 дипазонах.

         --brightness <float> Яркость Образа в 0-2 дипазонах.

         --hue <integer> Цвет Образа в 0-360 дипазонах

         --saturation <float> Насыщение Образа в 0-3 дипазонах.

         --gamma <float> Гамма Образа в 0-10 дипазонах.

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.

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

Интерфейс HTTP

VLC обладает интегрированным сервером HTTP.

Для того, чтобы запускать VLC с интерфейсом HTTP, используйте:

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

Интерфейс HTTP начнет слушать на host:порт (<all interfaces>:8080 если опущено), и воспроизведет структуру /directory в 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 Appendix B, Building pages for the HTTP interface.

Available pages are :

         /index.html gives access to the playlist, allows you to add or delete items and to control playback.

         /info.html gives you statistics and data about the usage of the server.

         /admin/. This folder gives more power and is therefore protected by a login/password. The default couple is admin/admin. The passwords and users can be changed in the .access file in the VLC_directory/share/http/admin folder. (Each folder can be protected, see Appendix B, Building pages for the HTTP interface for more details).

         /vlm/. This folder allows you to control the VideoLAN manager (VLM). The VLM allows you to stream several input streams with only one VLC instance. For more information about VLM, please look at the Streaming Howto.

Другие управляющие интерфейсы

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.

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'

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:


[D]

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.


[D]

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 ! At the moment, this function is only available with Mozilla or Firefox.

Install the plugin

GNU/Linux Debian

You should already have the following lines in your /etc/apt/sources.list file, if you run Debian Woody:

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

VLC's latest packaged version is always in the official Debian unstable branch. However you should still use our apt-get line if you need libdvdcss in its latest version:

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

Install the mozilla-plugin-vlc package:

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

Windows

Quit Firefox or Mozilla

Copy the two files in VLC_Installation_folder\mozilla (usually C:\Program Files\VideoLAN\VLC\mozilla) to your mozilla plugins directory (Usually C:\Program Files\Mozilla\plugins or C:\Program Files\Mozilla Firefox\plugins).

Restart Firefox or Mozilla

Compile the sources yourself

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

Use the plugin

If you open a link to a video file handled by the VLC plugin (To get the list of handled types, browse to about:plugins) or a page with an embedded video, the plugin should open and read the video.

Build HTML pages that use the plugin

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.

The vlc plugin supports the following function calls:

         play() : Start playing media in the plugin.

         pause() : Pause playback.

         stop() : Stop media playback.

         fullscreen() : Switch the video to full screen.

         set_volume(vol) : Set the volume. vol has to be an int in the 0-200 range.

         get_volume() : Get the current volume setting.

         mute() : Toggle volume muting.

         set_int_variable(var_name, value) :

         set_bool_variable(var_name, value) :

         set_str_variable(var_name, value) :

         get_int_variable(var_name) :

         get_bool_variable(var_name) :

         get_str_variable(var_name) :

         clear_playlist() : Clear the playlist.

         add_item(mrl>) : Append an item whose location is given by the Media Resource Locator to the playlist.

         next()

         previous()

         isplaying() : return true if the plugin is playing something.

         get_length() : Get the media's length in seconds.

         get_position() : Get the current position in the media in percent.

         get_time() : Get the current position in the media in seconds.

         seek(seconds,is_relative) : If is_relative is true, seek relatively to current time, else seek from beginning of the stream. Seek time is specified in seconds.

Here are a few examples of HTML pages that use the Mozilla plugin.

Example 1

In this example, the plugin will read an HTTP stream inside the web page. If the user goes fullscreen, he will have to press f to go back in normal view.

 
<html>
<head><title>Demo of VLC mozilla plugin</title></head>
 
<body>
 
<h1>Demo of VLC mozilla plugin - Example 1</h1>
 
<embed type="application/x-vlc-plugin"
 name="video1"
 autoplay="no" loop="yes" width="400" height="300"
 target="http://server.example.org/video1.vob" />
<br />
 <a href="javascript:;" onclick='document.video1.play()'>Play video1</a>
 <a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a>
 <a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a>
 <a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a>
 
</body>
</html>

Example

In this example, the plugin will read a multicast UDP stream in a dedicated video output window.

 
<html>
<head><title>Demo of VLC mozilla plugin</title></head>
 
<body>
 
<h1>Demo of VLC mozilla plugin - Example 2</h1>
 
<embed type="application/x-vlc-plugin"
 name="video2"
 autoplay="no" loop="no" hidden="yes"
 target="udp:@239.255.12.42" />
<br />
 <a href="javascript:;" onclick='document.video2.play()'>Play video2</a>
 <a href="javascript:;" onclick='document.video2.stop()'>Stop video2</a>
 <a href="javascript:;" onclick='document.video2.fullscreen()'>Fullscreen</a>
 
</body>
</html>

Prev 

 

 Next

Chapter 3.  Basic use of VLC  

Home

 Appendix A. GNU General Public License

 

Сайт управляется системой uCoz