<p>You can use the drawbox filter to umm. draw a box on top of the video.</p>

<p>Basic syntax is </p>

<pre><code>ffmpeg -i in.mp4 -vf "drawbox=X:Y:M-X:N-Y:c=black:t=fill" -c:a copy out.mp4
</code></pre>

<p>where X, Y are replaced with top-left co-ordinates of box. <code>M-X</code> and <code>N-Y</code> are width and height of the box. The value <code>fill</code> for thickness will make a solid box. This value was very recently changed, so if you have an older version of ffmpeg, use <code>max</code> instead.</p>

CC BY-SA 3.0
2017-12-06T04:24:04.390Z
Thanks! Can I simply replace fill with max or does max have a different syntax, sorry I'm very new to this.
JSzy
CC BY-SA 3.0
2017-12-06T06:06:03.150Z
Yes, simply replace fill with max.
Gyan
CC BY-SA 3.0
2017-12-05T16:37:03.197Z
2017-12-05T16:37:03.197Z
Gyan
<p>I want to remove a portion of the video between say coordinates (x,y) and (m,n), where (x,y) are the upper left coordinates while (m,n) are the lower right ones. Is there a ffmpeg command I could use?</p>

CC BY-SA 3.0
2017-12-05T09:37:04.037Z
Do you want to overlay an opaque box on top?
Gyan
CC BY-SA 3.0
2017-12-05T16:24:46.617Z
Basically yeah!
JSzy
<video><ffmpeg>
How to remove a rectangular region at the centre
JSzy
# How to remove a rectangular region at the centre

(Asked by: username_0 on 2017-12-05)

I want to remove a portion of the video between say coordinates (x,y) and (m,n), where (x,y) are the upper left coordinates while (m,n) are the lower right ones. Is there a ffmpeg command I could use?

**Tags:** video, ffmpeg

> **Comments:**
> **username_1**: Do you want to overlay an opaque box on top?  
> **username_0**: Basically yeah!  

---

## 1 answers

### Answer by username_1 on 2017-12-05. Score: 0 | Accepted answer

You can use the drawbox filter to umm. draw a box on top of the video.
Basic syntax is 
ffmpeg -i in.mp4 -vf "drawbox=X:Y:M-X:N-Y:c=black:t=fill" -c:a copy out.mp4

where X, Y are replaced with top-left co-ordinates of box. M-X and N-Y are width and height of the box. The value fill for thickness will make a solid box. This value was very recently changed, so if you have an older version of ffmpeg, use max instead.

> **Comments:**
> **username_0**: Thanks! Can I simply replace fill with max or does max have a different syntax, sorry I'm very new to this.  
> **username_1**: Yes, simply replace fill with max.  

---

