VideoLAN - VLC media player. Video playback on terminals

In WTware now there's embedded VideoLAN — VLC media player.

Turn on it by this line in configuration file: application=vlc

Works only in WTware for x86 and only with video=...(U). There's no way to run VLC with video=...(F) or video=...(X). If you fail to run any video driver from (U) list on your computer with 1024Mb RAM, send us e-mail, we'll try fix it.

In UEFI WTware build and WTware for Raspberry Pi VLC is not working yet.

The easiest sample

Just to run VLC and see it's working write these three lines in configuration file:

application = vlc
vlc_files = vlc.jpg
vlc_cmdline = file:///vlc_files/vlc.jpg --image-duration=-1

With such configuration file there will be orange-green image with text "VLC for WTware test screen." on the screen. Here's the meaning of each line in configuration file:

application = vlc

Turns on VLC player instead of RDP client.

vlc_files = vlc.jpg

Tells terminal to download vlc.jpg file from VLC directory on TFTP or HTTP server (by default full path to this directory is C:\ProgramData\WTware\VLC). File will be stored to terminal RAM and will be available as /vlc_files/vlc.jpg

vlc_cmdline = file:///vlc_files/vlc.jpg --image-duration=-1

Tells VLC player to open //vlc_files/vlc.jpg file, and magic word --image-duration=-1 means infinite playback of this image. Without this word VLC turns off after playback end.

VLC and virtual screens

VLC player may work on second virtual screen. For more details about screens read manual and here's the example of configuration file with two screens: on the first screen there's connection to 192.168.1.1 RDP server, on the second screen there's VLC player with test image. Switch between screens by Win-1..Win-2, Win-arrows or using popup menu at the right bottom corner of the screen:

server=192.168.1.1
next screen
application = vlc
vlc_files = vlc.jpg
vlc_cmdline = file:///vlc_files/vlc.jpg --image-duration=-1

Video from terminal RAM

Image is not video. It's not interesting. You can copy videofile to VLC directory and specify it's name instead of vlc.jpg in vlc_files= and vlc_cmdline= parameters. Then VLC player will play video. Specified in vlc_files= parameter files will be loaded into terminal RAM during boot. Do not specify gigabyte size files: terminal will boot for a long time and it may run out of RAM. Files will be loaded faster if you configure boot by HTTP.

For infinite video playback in vlc_cmdline parameter remove magic word --image-duration=-1 and add another magic word --loop. Example:

application = vlc
vlc_files = yourvideo.mov
vlc_cmdline = /vlc_files/yourvideo.mov --loop

RTSP stream, video source configuration

VLC is able to show RTSP stream. This protocol is used by security cameras, WTware can be configured to accept image from cameras. Or you may configure video streaming to network from Linux-computer and show similar, synchronous video on several WTware terminals.

As RTSP streaming source you'll need Linux computer, with Windows computer it works worse. Download any fresh Linux. Live USB in virtual machine is ok. Here are the screenshots of streaming start from Ubuntu Linux. On screenshots you see embedded into our distributive Ubuntu VLC. It's not complicated:







RTSP stream, terminal configuration

Example of configuration file for the terminal receiving RTSP stream:

application = vlc
vlc_cmdline = rtsp://10.1.1.32:8554/test

Instead of 10.1.1.32 specify Linux computer IP, where streaming is started. Just as shown on screenshots above. 8554 port and /test path are specified on these screenshots. On terminal screen should appear video. You may run several terminals with the same settings, and all of them will show similar video, broadcasted by RTSP by Linux computer.

To receive stream from camera use the same settings, specify port and path from camera settings.

VLM configuration file

VLC player complex configuration is better to perform using special VLM configuration file. First of all, the easiest example, VLM for image. Write these line to test1.txt file in VLC directory:

new c1 broadcast enabled
+setup c1 input /vlc_files/vlc.jpg
 control c1 play

In WTware configuration file specify:

application = vlc
vlc_files = test1.txt, vlc.jpg
vlc_cmdline = --vlm-conf=/vlc_files/test1.txt --image-duration=-1

On the screen should appear image with "VLC for WTware test screen." text.

Mosaic. Four streams on the screen

More complicated example of VLC player configuration using VLM configuration file. First of all start video streaming to network on Linux computer as you see on screenshots above. Then place this text to test2.txt file in VLC directory, replacing 10.1.1.20 to IP of your Linux computer:

new c1 broadcast enabled loop
setup c1 input rtsp://10.1.1.20:8554/test
setup c1 output #mosaic-bridge{id=1,width=300,height=224}
control c1 play

new c2 broadcast enabled loop
setup c2 input rtsp://10.1.1.20:8554/test
setup c2 output #mosaic-bridge{id=2,width=300,height=224}
control c2 play

new c3 broadcast enabled loop
setup c3 input rtsp://10.1.1.20:8554/test
setup c3 output #mosaic-bridge{id=3,width=300,height=224}
control c3 play

new c4 broadcast enabled loop
setup c4 input rtsp://10.1.1.20:8554/test
setup c4 output #mosaic-bridge{id=4,width=300,height=224}
control c4 play

In WTware configuration file specify lines below. Pay attention, that everything after vlc_cmdline= is one long line:

application = vlc
vlc_files = test2.txt, vlc.jpg
vlc_cmdline =  --sub-source=mosaic{width=640,height=480,xoffset=10,yoffset=10,rows=2,cols=2,keep-picture} --vlm-conf=/vlc_files/test2.txt /vlc_files/vlc.jpg --file-caching=2000 --image-duration=-1

You should see such image:


Four fishes are four times better than one fish! You can specify different video sources, for example from different security cameras.

Abaout sizes. Mosaic works so: firstly videostreams are scaled, their sizes become equal to specifies in width= and height= in #mosaic-bridge{}.Then streams overlay on background image. And after that background image with videostreams is stretched to terminal screen. So to avoid mistakes use instead of our vlc.jpg image background image of the same size as terminal physical resolution, and in width= and height= in mosaic{} specify size of this image.

Application area

Two 1920x1080 monitors with nine security cameras on each:


VLC turn off timeout

By default WTware turns on VLC player only when user switches to corresponding virtual screen. And turns off when user selects another screen. This helps not to load processor and network by video playback, when VLC works in background. But while network video streaming image is fully drawn only in several seconds after VLC start. That's inconvenient when you have to switch between screens often. This line in WTware configuration file:

vlc_timeout = 30

tells terminal not to turn off VLC for 30 seconds after user switched to another screen, where possibly RDP client is working. For example, it allows to quickly make note in database then switch back to video monitoring and see all cameras immediately without delays. Possible values — from 0 (default value) to 300 (5 minutes of VLC work in background). Also you can tell terminal not to turn off VLC player at all:

vlc_timeout = off

VLC interface

Advanced option. These lines in configuration file:

application = vlc
vlc_cmdline = -I qt4

start VLC with interface. It's not comfortable in using, but you may open player settings or see the list of installed plug-ins.



If you have any comments or remarks to this article, please, let us know!