This is an old topic so you probably already figured this out. But in case anyone else is interested here is the command I’m using to generate one thumbnail image.
ffmpeg -probesize 4096 -analyzeduration 50000 -threads 1 -i <INSERT_STREAM_URL_HERE> -vf fps=fps=1 -frames 1 -threads 1 -y -s 320×240 -f mjpeg -pix_fmt yuvj444p <OUTPUTFILE>.jpg
This will save a single jpeg from a stream. If you see a frame that’s all garbage then it is because you happened to save the image before a keyframe arrived. I haven’t figured out how to get ffmpeg to wait for a keyframe before saving. Luckily, this doesn’t happen that often. I’ve only ever tried RTMP streams but I believe RTSP will work just fine. The arguments -probesize and -analyzeduration aren’t completely necessary but I’ve found that they do decrease the latency of running the command. The -threads argument isn’t necessary either but I figured why waste more than 1 thread on such a simple task. Of course -s 320×240 can be adjusted to whatever size you need.
Hope this helps someone in the future.
PS: I have been able to successfully generate and save thumbnails every second from a stream via python as well if anyone else is interested in doing something like that.