<p>Here we go, (driven) ChatGPT did it:</p>
<pre><code>ffplay -vf &quot;drawgrid=x=(iw/2):(ih/2):t=3:color=yellow@0.5, drawbox=x=(iw-iw*0.95)/2:y=(ih-ih*0.95)/2:w=iw*0.95:h=ih*0.95:color=red@1, drawbox=x=(iw-iw*0.965)/2:y=(ih-ih*0.965)/2:w=iw*0.965:h=ih*0.965:color=green@1&quot; filename.ext
</code></pre>

CC BY-SA 4.0
2023-06-16T15:17:15.577Z
2023-06-16T18:02:17.377Z
2023-06-16T18:02:17.377Z
FORART npo
<p>we need to preview videos with overlayed so-called &quot;safe areas&quot; according to this EBU document: <a href="https://tech.ebu.ch/docs/r/r095.pdf" rel="nofollow noreferrer">SAFE AREAS FOR 16:9 TELEVISION PRODUCTION</a>.</p>
<p>Here's the scheme for 1080p resolution:
<a href="https://i.sstatic.net/acMUH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/acMUH.png" alt="enter image description here" /></a></p>
<p>Those consist of three different &quot;zones&quot;, each with the same percentage size-to-the-edge of the video frame for any resolution:</p>
<ul>
<li><strong>Action Safe Area</strong> (GREEN box): 3.5%</li>
<li><strong>Graphics Safe Area</strong> (RED box): 5%</li>
<li><strong>4:3 Safe Area</strong> (GREY box): 16.25%</li>
</ul>
<p>It should be easily achieveable using the <em>drawbox</em> command, but how can be dynamically adapted to any video resolution?</p>

CC BY-SA 4.0
2023-06-16T11:52:24.077Z
Make a large PNG with transparency, and use that. Use the scale2ref filter to adapt to the input.
Gyan
<ffmpeg><video><preview><ffplay>
How to draw - scalable - "EBU safe areas" in ffplay
FORART npo
# How to draw - scalable - "EBU safe areas" in ffplay

(Asked by: username_0 on 2023-06-16)

we need to preview videos with overlayed so-called "safe areas" according to this EBU document: [SAFE AREAS FOR 16:9 TELEVISION PRODUCTION](https://tech.ebu.ch/docs/r/r095.pdf).

Here's the scheme for 1080p resolution:
[![enter image description here](https://i.sstatic.net/acMUH.png)](https://i.sstatic.net/acMUH.png)

Those consist of three different "zones", each with the same percentage size-to-the-edge of the video frame for any resolution:

* **Action Safe Area** (GREEN box): 3.5%
* **Graphics Safe Area** (RED box): 5%
* **4:3 Safe Area** (GREY box): 16.25%

It should be easily achieveable using the *drawbox* command, but how can be dynamically adapted to any video resolution?

**Tags:** ffmpeg, video, preview, ffplay

> **Comments:**
> **username_1**: Make a large PNG with transparency, and use that. Use the scale2ref filter to adapt to the input.  

---

## 1 answers

### Answer by username_0 on 2023-06-16. Score: 0 | Accepted answer

Here we go, (driven) ChatGPT did it:
ffplay -vf "drawgrid=x=(iw/2):(ih/2):t=3:color=yellow@0.5, drawbox=x=(iw-iw*0.95)/2:y=(ih-ih*0.95)/2:w=iw*0.95:h=ih*0.95:color=red@1, drawbox=x=(iw-iw*0.965)/2:y=(ih-ih*0.965)/2:w=iw*0.965:h=ih*0.965:color=green@1" filename.ext


---

