Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.