<p>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 <code>-loop 1 -i './01.jpg' -loop 1 -i './02.jpg'</code> use <code>filter_complex</code> and something like <code>setpts=PTS-STARTPTS,split=2[stream1out1][stream1out2];[stream2blurred][stream2raw]</code> step by step.<br />
This is useful <a href="https://github.com/tanersener/ffmpeg-video-slideshow-scripts" rel="nofollow noreferrer">github link</a> 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.<br />
So looks like initial command not so bad for using as is.</p>

CC BY-SA 4.0
2023-10-15T09:15:30.497Z
2023-10-15T09:19:27.213Z
2023-10-15T09:19:27.213Z
DJArty
<p>Have an command to make slideshow mp4 from *.jpg files:</p>
<p><code>ffmpeg -r 1/3 -f concat -safe 0 -i &lt;(ls -v *.jpg | sed &quot;s|^|file '$PWD/|&quot;) -vf &quot;scale='min(1920,iw)':min'(1080,ih)':force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2&quot; -c:v libx264 -pix_fmt yuv420p -r 60 -preset slow -crf 14 slideshow.mp4</code></p>
<p>Need good effects from one jpg to another like morphing or just fade in fade out, not just &quot;one picture 3 sec, next picture 3 sec, etc.&quot;. Need exactly mp4 video file as result to make possibility to view this on other devices: mediaplayer, tv, smartphone etc.</p>

<ffmpeg>
Slideshow mp4 from jpg files with ffmpeg
DJArty
# Slideshow mp4 from jpg files with ffmpeg

(Asked by: username_0 on 2023-10-14)

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.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_0 on 2023-10-15. Score: 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](https://github.com/tanersener/ffmpeg-video-slideshow-scripts) 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.


---

