You can use the
-framerate option of
ffmpeg to control this. It's possible to use a fractional value for this setting. Using
-framerate 1/5 will show all frames for 5 seconds,
-framerate 1/4 will show them for 4 seconds.
I you require varying duration for each frame, it is necessary to alter the overall framerate, and duplicate these frames. You could set the framerate to 1, which would be 1 second increments, then have a number of copies of each frame which matches the desired duration in seconds. It may be possible to use soft-links rather than full copies of files to avoid using excessive disk space.