[FFmpeg-user] Slide show with transition

Michael Koch astroelectronic at t-online.de
Wed Nov 18 11:17:54 EET 2020

Am 18.11.2020 um 09:50 schrieb RAPPAZ Francois via ffmpeg-user:
>>> I have 15 JPEG file to be used for a slide (duration: 135 sec): Each image is display 9 seconds and without transition the mkv file is ok.
>>> I tried this for a transition 1 second long
>>> ffmpeg -y -framerate 1/9 -i %%02d.JPG -i SligoAir_WhiteBlanket.mp3 ^
>>> -vf
>>> zoompan=d=9:fps=1,framerate=fps=15:interp_start=0:interp_end=255:scene
>>> =100 ^ -r 15 -vsync vfr -pix_fmt yuv420p output.mkv
>>> The transition is ok for the first 3 image then the slide jump to image at position 10 and that picture remains blocked...
>>> What am I doing wrong ?
>> this works for me:
>> remĀ  make 15 test images
>> ffmpeg -f lavfi -i testsrc2=size=vga:duration=15:rate=1 -y test%%2d.jpg
>> remĀ  make slideshow, each image is shown 9 sec + 1 sec crossfade
>> ffmpeg -i test%%02d.jpg -vf
>> zoompan=d=10:fps=1,framerate=fps=25:interp_start=0:interp_end=255:scene=100
>> out.mp4
>> Michael
> My images files are 01.JPG, 02.JPG ... 10.JPG upto 15.JPG
> I wonder if " -i %%02d.JPG " is realy working or is correct. I still have a jump to 10.JPG after 03.JPG
> You can access my files here if you have the time
> https://drive.switch.ch/index.php/s/DbAVwtai3mOT43j

The problem is that your images 3 and 4 have different size. As far as I 
know, FFmpeg can't combine images with different sizes to a slideshow 
(please correct me if I'm wrong). By the way, all images must also have 
the same pixel format. I did't check that in your images. For example, 
if one image has yuv420 and another has yuv422, that won't work.

Possible workaround: Use batch processing in IrfanView to bring all 
images to the same size.


More information about the ffmpeg-user mailing list