Have an command to make slideshow mp4 from *.jpg files:

ffmpeg -r 1/3 -f concat -safe 0 -i <(ls -v *.jpg | sed "s|^|file '$PWD/|") -vf "scale='min(1920,iw)':min'(1080,ih)':force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" -c:v libx264 -pix_fmt yuv420p -r 60 -preset slow -crf 14 slideshow.mp4

Need good effects from one jpg to another like morphing or just fade in fade out, not just "one picture 3 sec, next picture 3 sec, etc.". Need exactly mp4 video file as result to make possibility to view this on other devices: mediaplayer, tv, smartphone etc.

1 Answer 1


I have done some research around this problem. Looks like it’s not easy to construct a one line command. Need a script with several steps describing the effects between each individual picture. Something with -loop 1 -i './01.jpg' -loop 1 -i './02.jpg' use filter_complex and something like setpts=PTS-STARTPTS,split=2[stream1out1][stream1out2];[stream2blurred][stream2raw] step by step.
This is useful github link with slideshow-scripts, e.g. blurred background, fade in/out, zoom in/out. But this scripts eat many memory, slow generation time, and big mp4 final size.
So looks like initial command not so bad for using as is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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