Setting VLC to display Multiple Videos on Multiple Monitors starting at Multiple Times from command line.

So I had this project where basically we wanted to display some footage in a showroom and it had to meet the following criteria.

Be a single video file
Loop 24/7
Span 3 1920×1080 monitors that are independent (not cloned)
The video can never be at the same point on multiple TVs
Be super automated so anyone would be able to launch it with zero technical skill

Be warned the code is rough and I am sure there is room for improvement but its here.

Problem: I want VLC to run multiple times to show two videos. VLC wont automatically open on another monitor. Have VLC open a file at a specific point.

Solution:

First off we need to be sure we are talking about the same version of VLC all the testing was done on Windows 7 and 8.1 with VLC version 2.1.5 Ricewind.

First click on Tools and select  Preferences.
vlc2

You need to uncheck Use only one instance when started from file manager. This is on by default.
vlc1

Now Im going to make two assumptions so my code is easy to follow.
– All your video file(s) must be located in a folder called C:\bin\vids\
– Your master script is also located in C:\bin\vids
– You are trying to fix this on a windows box of a 64bit nature

First make a batch file called v1.bat in the batch file put in the following code:

“C:\Program Files (x86)\VideoLAN\VLC\vlc.exe” –started-from-file –playlist-enqueue “C:\bin\Vids\videoplayback720.mp4” –start-time=0 -f -L –video-x 10 –video-y 10 –no-one-instance –no-embedded-video

Lets break this down part by part. First we need to call VLC from the command line and use the built in file manager from windows.
“C:\Program Files (x86)\VideoLAN\VLC\vlc.exe” –started-from-file

We now want to add the video to the playlist of this VLC instance so tell VLC where the file is NOTE! Replace the words videoplayback720.mp4 with the name of your own video file.
–playlist-enqueue “C:\bin\Vids\videoplayback720.mp4”

Start the video at the zero , make it full screen, and loop forever.
–start-time=0 -f -L

Now we need to choose what monitor to start the video on. I used starting location 10 10. This can be anything within the primary monitor.
–video-x 10 –video-y 10

Now we want to ensure that any new videos that open dont open ontop of this one and we want the window to be free floating so there is no VLC bar.
–no-one-instance –no-embedded-video

Perfect now we need to make a new batch file called v2.bat it will be very similar to v1.bat but have a few tweaks that I outline below changes are in bold:

“C:\Program Files (x86)\VideoLAN\VLC\vlc.exe” –started-from-file –playlist-enqueue “C:\bin\Vids\videoplayback720.mp4” –start-time=600 -f -L –video-x 1930 –video-y 10 –no-one-instance –no-embedded-video

First we modified start time to 600 seconds. This is 10 min. into the video file so that both files will be at different points of time. Second we modified video-x this will place the video on the 2nd screen and then full screen it. The reason it is 1930 is you need to have a X point larger than your first monitor. So for those of you who are bad at math look below:

For two videos playing on to screens you can use

Two 1920×1080 Screens:
v1.bat –video-x 10
v2.bat –video-x 1930
If you wanted to have a 3rd screen just add the resolution again:
v3.bat –video-x 3845

Two 1440×900 Screens:
v1.bat –video-x 10
v2.bat –video-x 1450

Two 1920×1080 Screens but the primary is on the Right:
v1.bat –video-x 10
v2.bat –video-x -1930

Now we need to automate the opening of these files, I made a crude master batch script to do so and made a shortcut on the desktop so even a intern could operate the system.

I have 3 screens so mine contained 3 files. Make a master file called StartVids.bat and paste in:

start cmd /k CALL “C:\bin\vids\v1.bat”
start cmd /k CALL “C:\bin\vids\v2.bat”
start cmd /k CALL “C:\bin\vids\v3.bat”

Save your file and then give it a run!

Leave a Reply

Your email address will not be published. Required fields are marked *