How do i put the image behind video by using FFmpeg?
Use the overlay filter

This will overlay the video on top of the image:

ffmpeg -loop 1 -i image.png -i video.mp4 -filter_complex "overlay=(W-w)/2:shortest=1" output.mp4


If you need to resize the video then add the scale filter:

ffmpeg -loop 1 -i image.png -i video.mp4 -filter_complex "[1:v]scale=400:-1[fg];[0:v][fg]overlay=(W-w)/2:(H-h)/2:shortest=1" output.mp4


You can use pad filter instead of an image

If you just want to add black padding you don't need an image and can use the pad filter.

ffmpeg -i video.mp4 -filter_complex "pad=1280:0:(ow-iw)/2" output.mp4


Using the player to do it instead

You could add the padding upon playback so you don't even need to re-encode:

ffplay -vf "pad=1280:0:(ow-iw)/2" input.mp4