RTSP Frame Grabbing creates smeared , pixeled and

2019-07-27 02:18发布

问题:

I am trying to capture a single frame per second from a RTSP stream with following command ffmpeg -i rtsp://XXX -q:v 1 -vf fps=fps=1 -strftime 1 ZZZZ\%H_%M_%S.jpg

But some of the frames are smeared ,pixeled and corrupted - this effect is drastically increases if rtsp resolution is increased (if the resolution is decreased for example to 720P most of the frames are OK)

I have to say that playing same rtsp stream in VLC or FFPLAY is flowless.

How I can fix it to grab better quality

Thanks in advance.

回答1:

Solution for that apparently is to force FFMPEG use TCP PROTOCOL following way

ffmpeg -rtsp_transport tcp -i rtsp://XXX -q:v 1 -vf fps=fps=1 -strftime 1 ZZZZ\%H_%M_%S.jpg

thanks a lot to this question and solution