After testing many possibilities, I have a perfect command line for creating thumbnails from a live stream:
ffmpeg -i rtmp://srvIp/h264.stream -r 1 -an -updatefirst 1 -y thumbnail.jpg
It refreshes a JPG every second and the HTTP web-server uses JPG without problems, showing it to web-clients.
Only problem is: every command uses 5 to 10% of CPU . If I want thumbnails of 20 channels, the CPU has no power for it. FFmpeg probably actively decodes all frames.
Is there a way to optimise this command and somehow tell FFmpeg to skip all frames between the needed ones. I tried this filters:
But these had no influence on CPU-usage, only picture quality is worse with (2) against original command (
I am ok with one thumbnail per second (or extracting keyframes only), and one thumbnail per 10 seconds is also ok, but I think the real problem is probably the H.264 decoding.