Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
What is [something else] representing? What is your final goal with these files? – LordNeckbeard 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

You must log in to answer this question.

Browse other questions tagged .