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 --loop

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 --loop

Tells VLC player to open //vlc_files/vlc.jpg file, and magic word --loop means infinite playback. 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. 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 --loop

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.

RTSP stream, video source configuration

VLC is able to show RTSP stream. This protocol is used by surveillance 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.

All VLC command line parameters

VLC player is huge and complicated. It has dozens of parameters. Full list of parameters, that VLC player may receive from vlc_cmdline= WTware parameter. This list is large. In our opinion useful parameters are already mentioned --loop and --udp-caching 500.

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:

del all
new c1 broadcast enabled
setup c1 input "fake://" option "fake-file=/vlc_files/vlc.jpg"
setup c1 loop
control c1 play

In WTware configuration file specify:

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

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

Mosaic. Four streams on the screen

More complex 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.32 to IP of your Linux computer:

del all
new bg broadcast enabled
setup bg input "fake://" option "fake-file=/vlc_files/vlc.jpg"
setup bg option sub-filter=mosaic
setup bg output #bridge-in{offset=100}:display
setup bg option mosaic-width=640
setup bg option mosaic-height=480
setup bg option mosaic-xoffset=10
setup bg option mosaic-yoffset=10
setup bg option mosaic-keep-picture
new c1 broadcast enabled
setup c1 input "rtsp://10.1.1.32:8554/test"
setup c1 output #mosaic-bridge{id=c1,width=300,height=224}
setup c1 loop
new c2 broadcast enabled
setup c2 input "rtsp://10.1.1.32:8554/test"
setup c2 output #mosaic-bridge{id=c2,width=300,height=224}
setup c2 loop
new c3 broadcast enabled
setup c3 input "rtsp://10.1.1.32:8554/test"
setup c3 output #mosaic-bridge{id=c3,width=300,height=224}
setup c3 loop
new c4 broadcast enabled
setup c4 input "rtsp://10.1.1.32:8554/test"
setup c4 output #mosaic-bridge{id=c4,width=300,height=224}
setup c4 loop
control bg play
control c1 play
control c2 play
control c3 play
control c4 play

WTware configuration file is almost the same, only text1.txt is replaced to test2.txt:

application = vlc
vlc_files = test2.txt, vlc.jpg
vlc_cmdline = --vlm-conf=/vlc_files/test2.txt

You should see such image:


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

Please, pay attention: firstly mosaic overlays images with specified in width= and height= dimensions on background, and only then stretches background with video streams to full screen. So instead of our vlc.jpg it's better to use background with the same size as screen resolution and in mosaic-width and mosaic-height specify the same size. Otherwise video size selection becomes non-trivial.

Application area

Example of configuration file showing nine surveillance cameras on 1920x1080 display:

del all
new bg broadcast enabled
setup bg input "fake://" option "fake-file=/vlc_files/sec.jpg"
setup bg option sub-filter=mosaic
setup bg output #bridge-in{offset=100}:display
setup bg option mosaic-height=1080
setup bg option mosaic-width=1920
setup bg option mosaic-rows=3
setup bg option mosaic-cols=3
setup bg option mosaic-order=c1,c2,c3,c4,c5,c6,c7,c8,c9
setup bg option mosaic-delay=0
setup bg option mosaic-keep-picture
new c1 broadcast enabled
setup c1 input "rtsp://admin:password@192.168.0.202:554/mpeg4/ch1/sub/av_stream" 
setup c1 output #mosaic-bridge{id=c1,width=640,height=360}
setup c1 loop
new c2 broadcast enabled
setup c2 input "rtsp://admin:password@192.168.0.203:554/mpeg4/ch1/sub/av_stream"
setup c2 output #mosaic-bridge{id=c2,width=640,height=360}
setup c2 loop
new c3 broadcast enabled
setup c3 input "rtsp://admin:password@192.168.0.209:554/mpeg4/ch1/sub/av_stream"
setup c3 output #mosaic-bridge{id=c3,width=640,height=360}
setup c3 loop
new c4 broadcast enabled
setup c4 input "rtsp://admin:password@192.168.0.208:554/mpeg4/ch1/sub/av_stream"
setup c4 output #mosaic-bridge{id=c4,width=640,height=360}
setup c4 loop
new c5 broadcast enabled
setup c5 input "rtsp://admin:password@192.168.0.225:554/mpeg4/ch1/sub/av_stream"
setup c5 output #mosaic-bridge{id=c5,width=640,height=360}
setup c5 loop
new c6 broadcast enabled
setup c6 input "rtsp://admin:password@192.168.0.217:554/mpeg4/ch1/sub/av_stream"
setup c6 output #mosaic-bridge{id=c6,width=640,height=360}
setup c6 loop
new c7 broadcast enabled
setup c7 input "rtsp://admin:password@192.168.0.229:554/mpeg4/ch1/sub/av_stream"
setup c7 output #mosaic-bridge{id=c7,width=640,height=360}
setup c7 loop
new c8 broadcast enabled
setup c8 input "rtsp://admin:password@192.168.0.226:554/mpeg4/ch1/sub/av_stream"
setup c8 output #mosaic-bridge{id=c8,width=640,height=360}
setup c8 loop
new c9 broadcast enabled
setup c9 input "rtsp://admin:password@192.168.0.210:554/mpeg4/ch1/sub/av_stream"
setup c9 output #mosaic-bridge{id=c9,width=640,height=360}
setup c9 loop
control bg play
control c1 play
control c2 play
control c3 play
control c4 play
control c5 play
control c6 play
control c7 play
control c8 play
control c9 play

WTware allows to use VLC simultaneously on two displays, in total 18 cameras. Looks like that:


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!