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

This may have already been answered.. but I'm struggling to search for it!

I have a set of images, of varying dimensions that I've created a 'fade affect' with, using imagemagicks convert command.

convert *.jpg -delay 20 -morph 20 %06d.transition.jpg

this generates about 50 images of varying dimensions.

I then use avconv to generate a video..

avconv -r 10 -i %06d.transition.jpg -vcodec libx264 yourmovie.mp4

The problem is, avconv will set the video size as the dimensions of the first image. So if the first image is large, and the second is small, the second will be stretched.

ideally, i want to 'letter box' (i think thats the term?) smaller images so that they're surrounded by a black nothing-ness, maintaining their ratio.

i've tried the -s, but this just stretches ALL the images.

Please help! :(

share|improve this question
up vote 2 down vote accepted

I'm pretty sure that ffmpeg/avconv can't do what you want. However, since you're using imagemagick anyway, just pad the images with -extent like so:

convert *.jpg -delay 20 -morph 20 \
-background black -gravity center -extent 1024x576 %06d.transition.jpg

Obviously, change the resolution to the resolution you want. Then you can just feed the images into ffmpeg/avconv, as in your question.

share|improve this answer
this worked perfectly. thanks for the advice! – BIGMOOSE Feb 22 '13 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .