Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

convert command can make the mpeg video from the several pictures.

For example:

convert -delay 300 *.png test.mpg

Well, is it possible to add Fade-out and Fade-in effects into the mpeg video by using convert ?

If it is possible, how can I do it?

share|improve this question
    
Haven't got the time to turn this into a full answer, but I'm fairly certain that you can overlay a colored rectangle over the image, and adjust its opacity. That would give you the individual frames. Combining all of these into a single image will probably require some shell scripting, and might even need files for the intermediate images. –  MvG Jun 26 '12 at 20:05
add comment

1 Answer 1

up vote 1 down vote accepted

I'd personally stick to video tools for generating video. Imagemagick is pretty awesome but it's no ffmpeg. ffmpeg (or avconv as it's now known) can handle both frame-stitching and fade options in one go:

ffmpeg -r 24 -b 500000 -i frame%05d.png -vf fade=out:155:45 output.mp4

If you're not familiar with ffmpeg, here's a quick translation of that command:

  • 24fps
  • ~500kbps bitrate
  • Uses all images called frame{00000..99999}.png
  • starts fading out at at frame 155 with a fade duration of 45 frames
  • outputs to output.mp4

ffmpeg also gives you a ton of options about handling audio, codecs, containers, etc that Imagemagick wont, but I'm leaving that well alone. Have a play.

Edit: I was originally making this up on the spot but I can confirm that this works just as expected/described.

share|improve this answer
    
It seems that it is difficult only with convert command. But, I didn't know that it was possible by using ffmpeg. Thank you for the information. –  vine_user Jun 27 '12 at 14:03
add comment

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.