<p>FFmpeg has a <a href="http://ffmpeg.org/ffmpeg-filters.html#fillborders" rel="nofollow noreferrer">fillborders</a> filter that can be used here.</p>
<p>Assuming a 1440x1080 content area inside a 1920x1080 frame, use</p>
<pre><code>ffmpeg -i in -vf fillborders=left=241:right=241:mode=smear -c:a copy out
</code></pre>

CC BY-SA 4.0
2020-11-13T20:33:34.157Z
Works perfectly, thank you.
Ubiquitous
CC BY-SA 4.0
2020-11-13T20:04:01.813Z
2020-11-13T20:04:01.813Z
Gyan
<p>I have a video file that is a screen recording of some slides. The slides had a 4:3 aspect ratio (1440x1080), but the video file is 16:9 (1920x1080), meaning there are black bars to the left and right. I would like to take a narrow column of pixels from the leftmost edge of the slide (say, the 241st column of pixels) and stretch them to cover the left black bar (and do the same on the right side to cover the right black bar). Is this something that can be done entirely on the command line by ffmpeg?</p>
<p>Schematically, what I'd like to do is turn this video frame:
<a href="https://i.sstatic.net/ps65s.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ps65s.jpg" alt="enter image description here" /></a></p>
<p>Into this one:
<a href="https://i.sstatic.net/JZPBd.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JZPBd.jpg" alt="enter image description here" /></a></p>

<ffmpeg><aspect>
ffmpeg stretch edge pixels to cover black bars
Ubiquitous
# ffmpeg stretch edge pixels to cover black bars

(Asked by: username_0 on 2020-11-13)

I have a video file that is a screen recording of some slides. The slides had a 4:3 aspect ratio (1440x1080), but the video file is 16:9 (1920x1080), meaning there are black bars to the left and right. I would like to take a narrow column of pixels from the leftmost edge of the slide (say, the 241st column of pixels) and stretch them to cover the left black bar (and do the same on the right side to cover the right black bar). Is this something that can be done entirely on the command line by ffmpeg?

Schematically, what I'd like to do is turn this video frame:
[![enter image description here](https://i.sstatic.net/ps65s.jpg)](https://i.sstatic.net/ps65s.jpg)

Into this one:
[![enter image description here](https://i.sstatic.net/JZPBd.jpg)](https://i.sstatic.net/JZPBd.jpg)

**Tags:** ffmpeg, aspect


---

## 1 answers

### Answer by username_1 on 2020-11-13. Score: 1 | Accepted answer

FFmpeg has a fillborders filter that can be used here.
Assuming a 1440x1080 content area inside a 1920x1080 frame, use
ffmpeg -i in -vf fillborders=left=241:right=241:mode=smear -c:a copy out

> **Comments:**
> **username_0**: Works perfectly, thank you.  

---

