Saturday, August 21, 2010

making nice slideshows

For a long while MLT had the capability to easily make a slideshow from a folder of photos. This was demonstrated in demo/mlt_slideshow for years and is the basis of Kdenlive's Slideshow virtual clip. However, these slideshows always fell rather "flat" or dull. Over the past year, I have been working on that, and I think all of the pieces are in place now for something much nicer. Here is an example video

See the new demo/mlt_slideshow2 to see how easy it was to create that (requires a very recent change to the luma filter that will appear in the next release - v0.5.8):
melt \
photos/.all.jpg ttl=75 \
-attach crop center=1 \
-attach affine  transition.cycle=225 transition.geometry="0=0,0:100%x100%;74=-100,-100:120%x120%;75=-60,-60:110%x110%;149=0:0:110%x110%;150=0,-60:110%x110%;224=-60,0:110%x110%" \
-filter luma cycle=75 duration=25 \
-track demo/music1.ogg \
-transition mix

That rather complex looking transition.geometry string is just something I whipped together to add some variety to the animated pan and zooms. A front end tool could contain a collection of these strings to let the author choose a style. Also, notice the addition of automatic center cropping to remove black bars and fill the output frame with the photo image regardless its resolution and aspect ratio.