RTSPtoWebRTC icon indicating copy to clipboard operation
RTSPtoWebRTC copied to clipboard

Get frame of rtsp

Open nqthinh493 opened this issue 2 years ago • 1 comments

I want to get frames from RTSP URLs to apply the AI model, can anyone help me?

nqthinh493 avatar Oct 09 '23 10:10 nqthinh493

can be achieved with ffmpeg library something like this:

ffmpeg -loglevel error -timeout 10000000 -rtsp_transport tcp -i {RTSP_URL} -vf fps=1/{FREQUENCY} -strftime 1 {FRAMES_DIRECTORY_PATH}/%Y-%m-%d_%H-%M-%S_image.png

this will save frames to directory with frequency you will set you can check ffmpeg docs and pipe data to some handler if you do not want to save images

maxim729467 avatar Oct 18 '23 18:10 maxim729467