[FFmpeg-user] static background removal from videos

Zenny garbytrash at gmail.com
Mon Oct 13 16:48:17 CEST 2014


Hi:

I have been trying to remove the static background (both mp4 and png
backgrounds alternatingly) from the video, but without success.

I used in a single line:

% ffmpeg -report -y -i "FORGROUND.mp4/png" -i "BACKGROUND.mp4"
-filter_complex
"[1:v]format=yuva444p,lut=c3=128[video2withAlpha],[0:v][video2withAlpha]blend=all_mode=difference[out]"
-map "[out]" "OUTPUT.mp4"

where:

1. BACKGROUND.mp4/png is the video/static picture without any moving
objects respectively.
2. FOREGROUND.mp4 is the moving object in front of the BACKGROUND as in 1 above
3. OUTPUT.mp4 is the result file.

Appreciate any input from expert ffmpegers here to make this happen. Thanks!


More information about the ffmpeg-user mailing list