3 ms·
Like this? Zoom in up to 1.5x and pan always at center of picture (not tested): import ffmpeg ( ffmpeg .input( '\*.jpg', pattern_
by Diris 4y ago
Like this?
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 https://github.com/kkroening/ffmpeg-python#quickstart
[1]https://kkroening.github.io/ffmpeg-python/#ffmpeg.zoompan https://kkroening.github.io/ffmpeg-python/#ffmpeg.zoompan
[2]https://ffmpeg.org/ffmpeg-filters.html#Examples-133 https://ffmpeg.org/ffmpeg-filters.html#Examples-133
EDIT: added options for slideshow style