Рет қаралды 12,232
This video shows how to use vlc to get video from a camera, and re-stream it as multicast. Also, using ffmpeg we can save the video to file in timed segments.
vlc command:
su - pi -c "/usr/bin/cvlc --rtsp-tcp rtsp://user:password@192.168.0.11:554/ch01/0 --sout '#transcode{acodec=mp4a,ab=32,channels=1,samplerate=8000,scodec=none
}:rtp{dst=239.1.1.81,port=20000,mux=ts,sap,name=frontdoor,ttl=10}' --play-and-exit"
ffmpeg command:
ffmpeg -nostdin -i rtp://239.1.1.81:20000 -map 0 -c:a copy -c:v copy -y -f segment -segment_time 60 -reset_timestamps 1 -strftime 1 ./today/%Y%m%d
_%H%M%S_frontdoor.mp4 -loglevel quiet