I use ffmpeg to generate a ton of jpeg images. However, these jpegs aren't optimized by ffmpeg. On average, the images losslessly compress another 10-20% when I run them through jpegtran.

I don't want to generate all these images, write each to disk and then run them through jpegtran afterword as it would be inefficient. I would rather pipe them using the image2pipe format in ffmpeg.

Let's say I wanted to take 1 frame per second and convert each to a jpeg. Ideally, I would like to produce a command like:

ffmpeg -i video.mpg -q 10 -r 1 -f image2pipe - | [something] | jpegtran -copy none -optimize

Obviously this won't work by itself (for many reasons) but how would I go about doing something like this?

  • What is [something else] representing? What is your final goal with these files? – llogan Jun 13 '13 at 21:00
  • The final goal is to have optimized jpeg images, perhaps the [something else] goes better in the middle. – Marty Jun 13 '13 at 23:44

Your Answer

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

Browse other questions tagged or ask your own question.