4

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! :(

1 Answers1

4

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.

evilsoup
  • 14,056