0

Currently I managed to get 3 videos playing at the same time when I save the following to a ".bat" file and run it in Windows, but all of them start at 00:00.

START "VLC media player - Instance 1" "C:\Users\MyPC\vid1.mp4" && ^
START "VLC media player - Instance 2" "C:\Users\MyPC\vid2.mp4" && ^
START "VLC media player - Instance 3" "C:\Users\MyPC\vid3.mp4"

Then I tried using the following to open them at different start times:

cd C:\Program Files (x86)\VideoLAN\VLC\
vlc.exe --one-instance --start-time=10  "C:\Users\MyPC\vid1.mp4"
vlc.exe --one-instance --start-time=40  "C:\Users\MyPC\vid2.mp4"

vid1.mp4 does indeed open at 10 seconds into the video, but vid2.mp4 doesn't open until I have closed vid1.mp4

I have also tried something like:

START "VLC media player - Instance 1" "C:\Users\MyPC\vid1.mp4"  --start-time=10 &&^
START "VLC media player - Instance 2" "C:\Users\MyPC\vid2.mp4"  --start-time=10

But both videos open from time 00:00 I read the forums that ":start-time=10" might work instead of "--start-time=10". No luck either.

Any help would be appreciated. Thanks

2 Answers 2

1

By pure luck this seem to work, but if there is a more elegant solution, please share.

cd C:\Program Files (x86)\VideoLAN\VLC\

start "1 MP4" vlc.exe "C:\Users\MyPC\VLC_test\vid1.mp4" --start-time=10 &&^
start "2 MP4" vlc.exe "C:\Users\MyPC\VLC_test\vid2.mp4" --start-time=20 &&^
start "3 MP4" vlc.exe "C:\Users\MyPC\VLC_test\vid3.mp4" --start-time=30
2
  • What do you mean by "more elegant"? Be precise please. You could certainly shorten it with e.g PowerShell, but not sure what the goal is. E.g. maybe you want to run it with more vids as inputs or perhaps you'd like to make it more dynamic. Or you're just wondering if there are better commands for this task.
    – Destroy666
    Mar 23, 2023 at 0:16
  • Just wondering if there are better commands
    – Sirius Lee
    Mar 23, 2023 at 11:02
0
@echo off

set "_vlc=%ProgramFiles(x86)%\VideoLAN\VLC\vlc.exe"

for /f ^usebackq^ ^tokens^=1-2*^ ^delims^=^,^" %%i in =;(`
     2^>nul "%__AppDir__%findstr.exe" /br .0[1-3] ^<"%~f0"
    `);= do start "%%~i" "%_vlc%" "%%~j" --start-time=%%~k
    
exit /b 

: title | the full file path to your mp4's | start-time
"01 MP4","C:\Users\MyPC\VLC_test\vid01.mp4",10
"02 MP4","C:\Users\MyPC\VLC_test\vid02.mp4",20
"03 MP4","C:\Users\MyPC\VLC_test\vid03.mp4",30

  • Output:
start "01 MP4" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "C:\Users\MyPC\VLC_test\vid01.mp4" --start-time=10
start "02 MP4" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "C:\Users\MyPC\VLC_test\vid02.mp4" --start-time=20
start "03 MP4" "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" "C:\Users\MyPC\VLC_test\vid03.mp4" --start-time=30

My deficiencies in the language used here, but really I also didn't understand "more elegant", I'm answering what I would try for a similar task.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .