Please can someone help me with my battle here.
I am trying to capture multiple RSTP streams from IP cameras at the same time, but with some of the cameras having a start tim delay by creating an offset. I can capture simultaneously without issue, but when I add an offset to any camera, all cameras listed afterwards are stuck with the same offset as that one above even when it is set to zero.
Below is the commands in my batch file run in windows.
_________________________________
@echo off
echo ========================================
echo RTSP Stream Capture Script
echo ========================================
echo.
echo Make sure FFmpeg is installed and in your PATH
echo.
echo Capturing 3 stream(s)...
echo.
TIMEOUT /T 0 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 10 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM1.mp4
TIMEOUT /T 3 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 5 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM2.mp4
TIMEOUT /T 0 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 5 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM3.mp4
echo.
echo All recordings completed!
echo.
pause
_______________________________
The TIMEOUT is the delay in seconds to start capturing from runtime of batch file. So in the example above, CAM1 and CAM3 should record immediately at run time, with CAM2 having a delay of 3 seconds before starting to record. However, CAM3 only starts at the same time as CAM2. If I add a delay to CAM3, the timing starts only after CAM2 starts recording instead of being based on the run time of the batch file.
Any ideas on how to fix this?
Thank you in advance!
I am trying to capture multiple RSTP streams from IP cameras at the same time, but with some of the cameras having a start tim delay by creating an offset. I can capture simultaneously without issue, but when I add an offset to any camera, all cameras listed afterwards are stuck with the same offset as that one above even when it is set to zero.
Below is the commands in my batch file run in windows.
_________________________________
@echo off
echo ========================================
echo RTSP Stream Capture Script
echo ========================================
echo.
echo Make sure FFmpeg is installed and in your PATH
echo.
echo Capturing 3 stream(s)...
echo.
TIMEOUT /T 0 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 10 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM1.mp4
TIMEOUT /T 3 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 5 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM2.mp4
TIMEOUT /T 0 /NOBREAK
START ffmpeg -i "rtsp:/admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0" -t 5 -c copy -c:v copy -an C:\CameraRecord\Zone_Acc_R2_33_John_Smith_CAM3.mp4
echo.
echo All recordings completed!
echo.
pause
_______________________________
The TIMEOUT is the delay in seconds to start capturing from runtime of batch file. So in the example above, CAM1 and CAM3 should record immediately at run time, with CAM2 having a delay of 3 seconds before starting to record. However, CAM3 only starts at the same time as CAM2. If I add a delay to CAM3, the timing starts only after CAM2 starts recording instead of being based on the run time of the batch file.
Any ideas on how to fix this?
Thank you in advance!