by mrdonbrown · 4y ago · 0 comments
ffmpeg -framerate 1/5 -pattern_type glob -i '\*.jpg' -pix_fmt yuv420p -filter_complex xfade=transition=fade:duration=2:offset=2 out.mp4
(1 jpg image per 5 seconds with a 2 seconds crossfade in between)[0] https://trac.ffmpeg.org/wiki/Slideshow
[1] https://ffmpeg.org/ffmpeg-filters.html#xfade (only available in >4.3)
Honestly, I'd love a podcast called "Quinecast" where each episode consists of hosts talking in detail about the ffmpeg flags that were used to create the podcast.
If you want to create a slideshow for 300 folders of images, ffmpeg is really your best friend. For one, maybe use a gui editor.
Zoom in up to 1.5x and pan always at center of picture (not tested):
import ffmpeg
(
ffmpeg
.input(
'\*.jpg',
pattern_type='glob',
framerate='1/5'
)
.zoompan(
z='min(zoom+0.0015,1.5)',
d=700,
x='in_w/2-(in_w/zoom/2)',
y='in_h/2-(in_h/zoom/2)'
)
.output('output.mp4', pix_fmt='yuv420p')
.run()
)
stitching [0], [1], and [2][0]https://github.com/kkroening/ffmpeg-python#quickstart
[1]https://kkroening.github.io/ffmpeg-python/#ffmpeg.zoompan
[2]https://ffmpeg.org/ffmpeg-filters.html#Examples-133
EDIT: added options for slideshow style