4

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:

  1. -vf fps=fps=1
  2. -vf "'select=eq(pict_type,I)'"
  3. using 1/5 or 1/10 as FPS

But these had no influence on CPU-usage, only picture quality is worse with (2) against original command (-r 1).

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.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.