0

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." OpenAI or ChatGPT little bit dummy for this problem, so need human knowledge and intellect :)

4
  • A simple alternative is to use shotwell, which is installed by default in Ubuntu Desktop. You can choose between several transition styles, and need not create a video clip (which saves a lot of drive space.
    – sudodus
    Commented Oct 13, 2023 at 20:02
  • But I prefer an even simpler alternative, but without any fancy transitions, feh. I have two aliases, alias feha='feh -r -F -V -d -Z' and alias fehs='feh -r -F -V -d -Z -z -D 5' where fehs is a slideshow with random order of pictures. Modify according to man feh
    – sudodus
    Commented Oct 13, 2023 at 20:40
  • Thank you @sudodus but I need exactly mp4 file to make possibility view slideshow not only from Ubuntu but from mediaplayer, tv, smartphone etc.
    – DJArty
    Commented Oct 14, 2023 at 8:19
  • I have used Openshot to merge video clips and also show pictures. There are many nice transitions between clips and pictures available. I have only used it via a GUI. I don't know if / how you can run it in batch mode. - I have used ffmpeg several years ago, but never fiddled with fancy transitions. - Let us hope that an experienced ffmpeg user will see your question and help you.
    – sudodus
    Commented Oct 14, 2023 at 8:42

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .