1

I want to create a video from still images. My images are:

  • 1.jpg
  • 2.jpg
  • 3.jpg
  • 4.jpg
  • 5.jpg
  • 6.jpg
  • 7.jpg
  • 8.jpg
  • 9.jpg

Each of them I want to show for a specific duration, between 1-10 seconds:

  • 1.jpg: 2 seconds
  • 2.jpg: 6 seconds
  • 3.jpg: 10 seconds
  • 4.jpg: 1 second

etc.

Between the images I want to gradually fade out the old image and fade in the new image.

I have a feeling this can all be done with convert and ffmpeg. However, the problem is with having the different duration between each image. This page helps a lot, but I can't figure out how to time things between images. Any ideas?

user
  • 915
  • 7
  • 27
  • 38
  • Sounds like a solution to your Q: http://stackoverflow.com/questions/14213550/how-to-create-video-with-images-and-different-time-interval-using-ffmpeg – slm Oct 05 '14 at 17:34

1 Answers1

1

If all of the .jpg files combined can be faithfully rendered in 256 colours out of 16mln colour colour space, then you can convert them into frames of an animated gif, which allows you to specify delays per frame in 100th of seconds.

You can then use convert (from the imagemagick package) to do the conversion:

convert -delay 200 1.jpg -delay 600 2.jpg -delay 1000 3.jpg -delay 100 4.jpg \
    .....  result.gif

(replace the dots with additional "-delay N.jpg" pairs).

Anthon
  • 78,313
  • 42
  • 165
  • 222
  • Thanks Anthon but I need the quality and colors that GIF can't offer! – user Oct 07 '14 at 13:50
  • It was worth a try, if there is little constraint on the size you can try [MJPEG](https://en.wikipedia.org/wiki/Motion_JPEG), [APNG](https://en.wikipedia.org/wiki/APNG) or else a real video format (MPEG, AVI). The Animated stills formats usually have some display time control, video just has N frames per second – Anthon Oct 07 '14 at 15:36