Add two images before a mp4 and one in the end with ffmpeg
Make videos from images:

ffmpeg -loop 1 -framerate 24 -t 5 -i image0.png -loop 1 -framerate 24 -t 5 -i image1.jpg -loop 1 -framerate 24 -t 5 -i image2.jpg -f lavfi -i anullsrc=cl=stereo:r=44100 -filter_complex "[0]fade=t=in:duration=1,format=yuv420p[v0];[1]format=yuv420p[v1];[2]format=yuv420p[v2]" -map "[v0]" -map 3 -shortest pre1.mp4 -map "[v1]" -map 3 -shortest pre2.mp4 -map "[v2]" -map 3 -shortest post.mp4


Note that the frame rate, width, height, aspect ratio, pixel format, H.264 profile, timebase, audio channel layout, audio sample rate, stream types, and number of streams of these videos match that of the main video.

Make input.txt:

file 'pre1.mp4'
file 'pre2.mp4'
file 'main.mp4'
file 'post.mp4'


Concatenate with concat demuxer:

ffmpeg -f concat -i input.txt -c copy -movflags +faststart output.mp4