The most videos recorded from tv programs contain a company logo, usually in the top right or top left corner. FFmpeg contains special filter to remove logos and while the final effect is not always perfect, in many cases is acceptable.
Video filter: delogo
- Description : Hides a TV station logo by a simple interpolation of the surrounding pixels. User sets a rectangle covering the logo and it usually disappears (but in certain case the logo is more visible). The filter accepts parameters as a string of the form “x:y:w:h:band” , or as a list of key=value pairs, seperated by “:”.
- Description of filter parameters:
- x, y : coordinates of the top-left corner of the logo
- w, h : width and height of the logo
- show : parameter for locating, default value is 0, if set to 1, a green rectangle shows on the screen as an aid to find the correct x, y, w and h parameters
For example to remove a logo from the top-right corner of 854×480 pixels sized video illustrated on images below at first we estimate the logo position with a show option that will display a green rectangle:
ffmpeg -i videologo.mp4 -vf delogo=x=770:y=2:w=79:h=58:show=1 nologo.mp4
Now we can precisely specify the position and the logo presence is almost invisible:
ffmpeg -i video-logo.mp4 -vf delogo=x=770:y=2:w=79:h=58 nologo.mp4