I have a 5s fps25 mp4 video and I use the following command to extract jpg images from the video

ffmpeg -i input.mp4 -r 1 -q:v 1 output_%01d.jpg

The images are extracted successfully, but jpg files quality isn't good enough.

How can I extract better quality images?

  • try using value 2 instead of 1 in -qscale:v – Rico Jan 28 '16 at 11:59


ffmpeg -i input.mp4 -r 1 -q:v 1 -qmin 1 -qmax 1 output_%01d.jpg

If not good enough, use

ffmpeg -i input.mp4 -r 1 output_%01d.bmp 

and use another JPEG encoder.

  • i get error-"qmin and or qmax are invalid, they must be 0 < min <= max" using first command..i tried setting-"-qmin","0", "-qmax","1" but still same error.. – Android Developer Dec 8 '18 at 10:27
  • See updated cmd. – Gyan Dec 8 '18 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.