Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :begin
- @ECHO OFF
- ECHO.
- SETLOCAL ENABLEDELAYEDEXPANSION
- :: Use WMIC to retrieve date and time
- FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
- IF NOT "%%~F"=="" (
- SET /A SortDate = 10000 * %%F + 100 * %%D + %%A
- SET /A SortTime = 10000 * %%B + 100 * %%C + %%E
- SET SortTime=0000000!SortTime!
- SET SortTime=!SortTime:~-6!
- )
- )
- :: Display the results:
- set now=%SortDate%_%SortTime%
- set now=%now%
- echo %now%
- :: Proceed with RTSP capture
- mkdir F:\TIMELAPSE\
- "C:\libav-i686-w64-mingw32-11.7\usr\bin\avconv.exe" -rtsp_transport tcp -i rtsp://192.168.1.10:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream -f image2 -vframes 1 -pix_fmt yuvj420p F:\TIMELAPSE\%now%.jpeg
- timeout 5
- ENDLOCAL
- goto begin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement