File recording 100+ streams won't stop at designated time
Posted: 13 Mar 2014 23:04
I'm running VLC ver. 2.1.3 on Win7 quad-core box. The snipped Windows batch script below creates a .conf file then launches VLC reference the created conf file. Doing a few streams is fine. In the actual script the echo section repeats 100+ times. All is well except the streams saving to file don't stop at the designated stop time. Should be 5 seconds short of an hour. Takes an extra 2 to 5 minutes before all video streams stop recording. I'm trying to get this down to under a minute so I can killtask vlc and restart another hour session with the Win scheduler. If killtask is issued too early all the recorded files get corrrupted and won't play.
Am I missing something in the script?
HELP ! ! !
--------------------------------------------------------------
setlocal enableextensions enabledelayedexpansion
::
set year=%date:~12,2%
set month=%date:~4,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~7,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set hour=%time:~0,2%
if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
set min=%time:~3,2%
if "%min:~0,1%" == " " set min=0%min:~1,1%
set filename=%month%.%day%.%year%_%hour%.%min%
::
set year=%date:~10,4%
set month=%date:~4,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~7,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set begintime=%year%/%month%/%day%-%hour%:%min%:05
::
set currenttime=%time%
for /F "tokens=1 delims=:" %%h in ('echo %currenttime%') do (set /a hr=%%h)
set /a hr=%hr%+1
if %hr% gtr 24 set hour=00
set endtime=%year%/%month%/%day%-%hr%:%min%:00
::
(
echo new Cam1 broadcast enabled
echo setup Cam1 input rtsp://11.41.123.2/video
echo setup Cam1 output #transcode{acodec=none}:std{access=file{no-overwrite},mux=mp4,dst='C:\<path>\%filename%.mp4'}
echo new Cam1_sched1 schedule enabled
echo setup Cam1_sched1 date %begintime%
echo setup Cam1_sched1 append control Cam1 play
echo new Cam1_sched2 schedule enabled
echo setup Cam1_sched2 date %endtime%
echo setup Cam1_sched2 append control Cam1 stop
) >Camera.conf
::
endlocal
start vlc -I telnet --extraintf --qt-minimized --vlm-conf Camera.conf
EXIT
Am I missing something in the script?
HELP ! ! !
--------------------------------------------------------------
setlocal enableextensions enabledelayedexpansion
::
set year=%date:~12,2%
set month=%date:~4,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~7,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set hour=%time:~0,2%
if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
set min=%time:~3,2%
if "%min:~0,1%" == " " set min=0%min:~1,1%
set filename=%month%.%day%.%year%_%hour%.%min%
::
set year=%date:~10,4%
set month=%date:~4,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~7,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set begintime=%year%/%month%/%day%-%hour%:%min%:05
::
set currenttime=%time%
for /F "tokens=1 delims=:" %%h in ('echo %currenttime%') do (set /a hr=%%h)
set /a hr=%hr%+1
if %hr% gtr 24 set hour=00
set endtime=%year%/%month%/%day%-%hr%:%min%:00
::
(
echo new Cam1 broadcast enabled
echo setup Cam1 input rtsp://11.41.123.2/video
echo setup Cam1 output #transcode{acodec=none}:std{access=file{no-overwrite},mux=mp4,dst='C:\<path>\%filename%.mp4'}
echo new Cam1_sched1 schedule enabled
echo setup Cam1_sched1 date %begintime%
echo setup Cam1_sched1 append control Cam1 play
echo new Cam1_sched2 schedule enabled
echo setup Cam1_sched2 date %endtime%
echo setup Cam1_sched2 append control Cam1 stop
) >Camera.conf
::
endlocal
start vlc -I telnet --extraintf --qt-minimized --vlm-conf Camera.conf
EXIT