I just stuck in creating batch file for recording stream from CCTV. Previously this works on Ubuntu server in code like this:
cvlc -d --sout "#transcode{vcodec=FLV1,vb=512,fps=3,acodec=none,sfilter=marq{marquee='АБК %d.%m.%Y %H.%M.%S',opacity=200,size=20}}:std{access=file,mux=ffmpeg{mux=flv},dst=/storage/surveillance/$date/${name[$i]}/$curdate.flv}" --ttl=127 "http://cameralogin@camerapassword@cam_ip/cgi-bin/cmd/encoder?&${analog[$i]}&GET_STREAM" --http-reconnect --http-continuous --sout-mux-caching=1500 --udp-caching=6000 --tcp-caching=6000 I got HTTP stream from camera in MJPG, which I can open from cmd using this
vlc.exe "http://cameralogin@camerapassword@cam_ip/cgi-bin/cmd/encoder?&$CHANNEL=1&GET_STREAM" But I stuck when I trying to save it to file adding this to previous command:
--sout "#transcode{vcodec=FLV1,vb=512,fps=3,acodec=none,sfilter=marq{marquee='АБК %date% %time%',opacity=200,size=20}}:std{access=file,mux=ffmpeg{mux=flv},dst=%archive%\%name%\%date%\%time%.flv}" VLC is opened, but no video output and file in path. Disc F is local HDD, login and password is right to cam. Batch is opened from local admin.
Full file looks like this:
:: Set encoding for cyrillyc symvols @chcp 866 :: Some vars for easy edit in future :: Choosing cam :: set analog=CHANNEL=1 set analog=CHANNEL=2 :: set analog=CHANNEL=3 :: set analog=CHANNEL=4 :: Choose folder to save :: set name="2 этаж" set name="1 этаж" :: set name="Главный_вход" :: set name="1 этаж 2" :: Path to archive set archive="F:\Archive\Охрана" :: Move to vlc.exe folder cd "c:\Program Files (x86)\VideoLAN\VLC" :: Record Video vlc.exe --sout "#transcode{vcodec=FLV1,vb=512,fps=3,acodec=none,sfilter=marq{marquee='АБК %date% %time%',opacity=200,size=20}}:std{access=file,mux=ffmpeg{mux=flv},dst=%archive%\%name%\%date%\%time%.flv}" --ttl=127 "http://cameralogin@camerapassword@cam_ip/cgi-bin/cmd/encoder?&$%analog%&GET_STREAM" --http-reconnect --http-continuous --sout-mux-caching=1500 --udp-caching=6000 --tcp-caching=6000