logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Suhil  
#1 Posted : Thursday, March 31, 2022 9:53:01 AM(UTC)
Suhil

Rank: Member

Groups: Registered
Joined: 4/13/2021(UTC)
Posts: 15
Germany
Location: Düsseldorf

Hi!
Maybe someone can help me to modify batch file and script? its working but its keep trying to reopen Vmix and loop commands.
The purpose is as follows:
-After 5 seconds of Close or Crash, Vmix restarts and after 10 seconds from lunch start to stream

Batch file in startup:

ECHO Start vMix
:VMIX
start "" "C:\Users\Admin\AppData\Roaming\last.vmix
echo (%time%) Streaming started.
PING 127.0.0.1 -n 10> NULL
ECHO Start Streaming
start "" "D:\vmix\stream.vbs"
echo (%time%) WARNING: VMIX closed or crashed, restarting.
:: Wait 5 seconds before restarting.
TIMEOUT /T 5
GOTO VMIX

Stream.vbs:

On Error Resume Next

Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://localhost:8088/api/?Function=StartStreaming", False
o.send



User is suspended until 5/19/2029 2:05:28 PM(UTC) Winops  
#2 Posted : Monday, October 17, 2022 4:48:50 PM(UTC)
Winops

Rank: Advanced Member

Groups: Registered
Joined: 5/15/2022(UTC)
Posts: 39
Man
Argentina

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Suhil Go to Quoted Post
Hi!
Maybe someone can help me to modify batch file and script? its working but its keep trying to reopen Vmix and loop commands.
The purpose is as follows:
-After 5 seconds of Close or Crash, Vmix restarts and after 10 seconds from lunch start to stream

Batch file in startup:

ECHO Start vMix
:VMIX
start "" "C:\Users\Admin\AppData\Roaming\last.vmix
echo (%time%) Streaming started.
PING 127.0.0.1 -n 10> NULL
ECHO Start Streaming
start "" "D:\vmix\stream.vbs"
echo (%time%) WARNING: VMIX closed or crashed, restarting.
:: Wait 5 seconds before restarting.
TIMEOUT /T 5
GOTO VMIX

Stream.vbs:

On Error Resume Next

Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "http://localhost:8088/api/?Function=StartStreaming", False
o.send




Hi Bro ,
first of all
good job !
nice script!
but it can be done so easily , just by vmix itself web api !
look at this :

timeout 60
start http://localhost:8088/api?function=StartPlayList
timeout 10
start http://localhost:8088/api?function=StartStreaming

put the batch file and a shortcut from your last.vmix file into windows startup
shell:startup
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.