[FFmpeg-user] Using ffmpeg to blur moving objects

Boris T boris.t.richard at gmail.com
Mon Oct 31 03:55:26 EET 2016


I'm using ffmpeg to blur moving objects in videos with a command similar to
this one:

ffmpeg -i "input.mp4" -filter_complex_script "myscript.txt" -map
"[step0_overlay]" -f MP4 -c:v libx264 -x264opts
keyint=15:min-keyint=15:scenecut=-1  -movflags faststart -y "output.mp4"

myscript.txt contents:


This does the job fine, but since I'm blurring moving objects, I end up
with multiple crop and overlay filters enabled for fractions of seconds.
For a 2-minute video with a constantly moving object I can end up with 2000
of these crop-overlay steps, and the more overlay steps I have, the slower
the processing gets (less than a frame per second) Is there a better,
faster approach to this problem?

I've tried using sendcmd to modify and move the blurred overlay on the fly
(and presumably avoid having to keep multiple overlays in the filter graph)
however I ended up with a blurred box inside the original blurred box.

Any input on this problem would be greatly appreciated!


More information about the ffmpeg-user mailing list