Question / Help Source video VLC reconnect

I use obs studio 22.0.1 to permanently transmit the video from an ipcamera foscam. In my scene I use video source video VLC plugin to capture camera video (RTSP file). Everything works perfectly if there are no disconnections with the ipcamera. In this case the plugin does not handle automatic reconnection and the scene is blocked requiring a manual restart.
Can I with VLC video source have an autoreconnect?

Thank you
 
So I solved the reconnect to vlc source video.
In my project I created two scenes called the first ipcameraOK (vlc source video) the second ipcamerakO (when the connection with the ipcamera is lost).
I used the advanced Scene switcher plugin using the write To File / Read From File and I have enabled switching of scene based on file input.
I created a batch file dos that checks the connection status:

:MyLoop
ping -n 1 10.121.71.7 | find "TTL=" >nul
if errorlevel 1 (
echo ipcameraKO>"C:\Temp\Scena.txt"
) else (
echo IpcameraOK>"C:\Temp\Scena.txt"
)
TIMEOUT /T 5
cls
GOTO MyLoop

In this way, when the connection returns to active, the ipcameraOk scene starts again.
 

Mars1977

New Member
Is Scena.txt empty?

Having the same problem, sometimes, the RTSP is good for hours, but once it stops (whatever reason), it won't reconnect. The IP camera stream can be reconnected by simply clicking Hide/Unhide stream, but I want this to be automatic.

Thanks
 

seano1

New Member
I wish there was a script within OBS that could restart the stream every 1 hour. At the moment the only way i am able to keep the stream active automatically is to run an app that closes/re-opens OBS every 2 hours . using the --startstreaming instruction upon startup. The down side is the the stream is interrupted every 2 hours but the plus side is that i don't need to manually check throughout the day. If every the camera freezes i can be sure that it'll come back online automatically after a restart.

If anyone has a better process, i'm all ears.
 
Hello,
Here is my new vbscript to test and reconnect my ipcamera (vcl media source object in obs studio).
For the correct operation you must perform the following steps:

1) define the following OBS settings --> hotkeys:

Show Media Souce: CTRL+ALT+SHIFT+S
Hide Media Source: CTRL+ALT+SHIFT+H

2) define the new registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

KeepAliveTime DWORD 120000

For more info see:

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd349797(v=ws.10)#BKMK_2

3) Copy the attached vbscript (rename porta.txt porta.vbs) in some directory of your computer. First set the your Ip and port
4) Reboot the system
5) Execute then the vbscript: cscript //E:vbscript c:\........\porta.vbs


bye
 

Attachments

  • porta.txt
    2.3 KB · Views: 225
Top