How to dispose 4 windows (VLC) in mosaic with a scrip .bat

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
actia
New Cone
New Cone
Posts: 4
Joined: 22 Jan 2018 14:20

How to dispose 4 windows (VLC) in mosaic with a scrip .bat

Postby actia » 25 Jan 2018 14:22

Hello , i am creating a script .bat to see and save 4 videos from each flux from my camera.
It works with the following command:

@echo on
cd c:\Program Files
start VideoLAN\VLC\vlc.exe -vvv rtsp://169.254.198.169:554/live.sdp --sout="#std{mux=mp4,access=file,dst=d:\recording\1.mp4}" --sout="#duplicate{dst=std{mux=mp4,access=file,dst=d:\recording\1.mp4},dst=display}"
start VideoLAN\VLC\vlc.exe -vvv rtsp://169.254.198.169:554/live2.sdp --sout="#std{mux=mp4,access=file,dst=d:\recording\2.mp4}" --sout="#duplicate{dst=std{mux=mp4,access=file,dst=d:\recording\2.mp4},dst=display}"
start VideoLAN\VLC\vlc.exe -vvv rtsp://169.254.198.169:554/live3.sdp --sout="#std{mux=mp4,access=file,dst=d:\recording\3.mp4}" --sout="#duplicate{dst=std{mux=mp4,access=file,dst=d:\recording\3.mp4},dst=display}"
start VideoLAN\VLC\vlc.exe -vvv rtsp://169.254.198.169:554/live4.sdp --sout="#std{mux=mp4,access=file,dst=d:\recording\4.mp4}" --sout="#duplicate{dst=std{mux=mp4,access=file,dst=d:\recording\4.mp4},dst=display}"
exit

Now i am trying to dispose my 4 streams in mosaic on my screen with an other command! Can you help my pls :D

verbal_666
Cone that earned his stripes
Cone that earned his stripes
Posts: 129
Joined: 02 Nov 2010 20:46

Re: How to dispose 4 windows (VLC) in mosaic with a scrip .bat

Postby verbal_666 » 25 Jan 2018 18:37

Take "CMDOW". HERE.

Try this,

[MOSAIC.BAT]
@echo off
:: MOSAIC FOR WINDOWS IN WINDOW ## VERBAL 2018
setlocal enabledelayedexpansion
set cmdow=D:\Utility\Scripts\cmdow.exe
set window=VLC
set X=0
set Y=0
set Xadd=250
set Yadd=250
set counter=1
for /f "tokens=1" %%w in ('%cmdow% /t ^| findstr "%window%$"') do @(
echo MOVE: %%w TO !X! - !Y!
if !counter! EQU 3 set /a Y=!Y!+%Yadd%%
if !counter! EQU 3 set /a X=0
%cmdow% %%w /MOV !X! !Y!
set /a X=!X!+%Xadd%
set /a counter=!counter!+1
)

You can edit X , Y, Xadd, Yadd variables at your own for your Display Resolution.

verbal_666
Cone that earned his stripes
Cone that earned his stripes
Posts: 129
Joined: 02 Nov 2010 20:46

Re: How to dispose 4 windows (VLC) in mosaic with a scrip .bat

Postby verbal_666 » 27 Jan 2018 09:14

Replace /t switch with /f, for full Information. Lines, otherwise, are truncated...

@echo off
:: MOSAIC FOR WINDOWS IN WINDOW ## VERBAL 2018
setlocal enabledelayedexpansion
set cmdow=D:\Utility\Scripts\cmdow.exe
set window=VLC
set X=0
set Y=0
set Xadd=250
set Yadd=250
set counter=1
for /f "tokens=1" %%w in ('%cmdow% /f ^| findstr "%window%$"') do @(
if !counter! EQU 3 set /a Y=!Y!+%Yadd%%
if !counter! EQU 3 set /a X=0
if !counter! EQU 3 set counter=1
echo MOVE: %%w TO !X! - !Y!
%cmdow% %%w /MOV !X! !Y!
set /a X=!X!+%Xadd%
set /a counter=!counter!+1
)


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 47 guests