Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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