1

Users of my app upload videos to my server and I process them to create different qualities, thumbnails and gifs etc. Which are then useful for mobile and web apps. It takes almost 15-20 minutes for each video to be processed. I am using ffmpeg. How can I reduce my processing time ?

Ali Raza
  • 374
  • 2
  • 6
  • 21

1 Answers1

0

I can't comment so I ask here.

15-20 is to make thumbnail/gif from a video? If so, that's awfully a lot.

If you want HQ lossless then consider using x264 encoder with lossless_ultrafast preset to make videos.

ffmpeg -f x11grab -r 25 -s 1080x720 -i :0.0 -vcodec libx264 -vpre ultrafast yourfile.mkv

If possible, use GPU to convert.

I might be wrong, but FFmpeg by default uses 1 thread. You could put multiple instances running to solve it.

Rimski
  • 27
  • 3
  • 15-20 minutes to make gif, Thumbnail, 240p video, 360p, 480p and 720p video from a 1080p input video. – Ali Raza Feb 17 '20 at 10:48
  • If its 10 min video, then it sounds reasonable time. To increase converting time, use multi-threading for CPU or utilize GPU – Rimski Feb 17 '20 at 12:36