delogo, removelogo¶
Watch on youtube.com- doc
https://ffmpeg.org/ffmpeg-filters.html#delogo, https://ffmpeg.org/ffmpeg-filters.html#removelogo
The original purpose of “delogo” is to suppress a TV station logo. However, this is essentially a “blurring”. Particularly since it is possible to designate the area directly, even if only “blur” is the purpose for you, it is easy to use in some cases. (You can not control “how much blur” like other professional blur filters like “avgblur”, so use those if you want to do so.)
The original territory of “delogo” is to suppress the logo (so called ‘watermark’). It’s easy to use “delogo”. Just tell the target rectangle to “delogo”:
00:00:24#! /bin/sh
ifn="Pexels_857194_with_ridiculoous_logo.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]delogo=x=30:y=30:w=600:h=100[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"
Using “delogo” for large rectangle opponents is probably not what you want, since the interpolation scheme is different between “delogo” and “true” blur filters. In other words, as long as the target rectangle is small enough, you can use “delogo” as a blur filter alternative, like this example:
00:00:45#! /bin/sh
ifn="Pexels_2903.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"
#
# for debugging (show=1) (uploaded video was made by this)
#
##ffmpeg -y -i "${ifn}" -filter_complex "
##[0:v]delogo=x=1220:y=560:w=100:h=160:show=1[v]
##" -map '[v]' -an "${pref}_${ifnb}.mp4"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]delogo=x=1220:y=560:w=100:h=160[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"
#! /bin/sh
ifn="Pexels_5086.mp4"
ifnb="`basename \"${ifn}\" .mp4`"
pref="`basename $0 .sh`"
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]delogo=x=973:y=425:w=40:h=40,fps=25[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"
I will introduce not only “delogo” but also “removelogo” of the same purpose. (However, although it is impossible to use “removelogo” as a blurring purpose.) To use “removelogo”, an image file corresponding to the logo you want to suppress is necessary. Just tell the filename of logo to “removelogo”:
00:01:34#! /bin/sh
pref="`basename $0 .sh`"
ifn="Pexels_857194_with_ridiculoous_logo.mp4" # target video (1920x1080)
#
# "ridiculous_logo.png": logo image (1920x1080)
#
ffmpeg -y -i "${ifn}" -filter_complex "
[0:v]removelogo=f='ridiculous_logo.png'[v]
" -map '[v]' -an "${pref}_${ifnb}.mp4"