Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The correct method of adding a background image with ffmpeg is using the "overlay" filter.

The command to add a background image can be written as follows:

ffmpeg -i input.mp4 -i bg.jpg -filter_complex "overlay=0:0" output.mp4

Explanation: - "input.mp4" is the input video file. - "bg.jpg" is the background image file. - "overlay=0:0" applies the "overlay" filter to place the background image at the top-left corner of the video. The coordinates can be adjusted based on the desired position. - "output.mp4" is the output video file.

Note: The resolution of the background image should match the resolution of the input video file. If not, the image can be resized using the "scale" filter.