Chroma key and a few images for background I am making a movie using chroma key effect.
The foreground is a video taken in front of a green panel, filmed with 24 fps. Assume this video have 1000 frames.

The background is a sequence of 5 images. 

generation with VSE:
I wonder if it is useful the have the following reasoning: since I need
only five images for my background I don't need to generate a background movie consisting of 1000 frames and where a lot of frames will be repeated.

So I generate the background movie with 1 fps (it's not the best optimization and the size of the background movie is much smaller). However since I want to "mix" these movies using chroma effect, it appears I need to have the same fps for both movies ?

generation with the compositor:
A sequence of image can be provided as an input in the compositor. However in this sequence of images, it appears that one image corresponds to  one frame so the problem is still there : I can't choose how long one image should last but I need to repeat a lot of times each images.

Is there a way to avoid repetitions of the background images ?
You can use Maths nodes to set up logic that allows you to select an image based on an input and this can be used instead of the image sequence or video. For example, consider the following nodes :



The images are set in each of the Image nodes highlighted. To corresponding Greater Than nodes should each have incremental values and these will control the Mix such that subsequent images are selected as the input Value is increased. ie, Value less than or equal to 1 selects the first image, less than or equal to 2 selects the second image, 3 the third image, etc. Continue the chain for as many images as you require.

All that is now required is to keyframe the input Value so that it selects the relevant image for the frame in your animation.