we need to preview videos with overlayed so-called "safe areas" according to this EBU document: SAFE AREAS FOR 16:9 TELEVISION PRODUCTION.

Here's the scheme for 1080p resolution: enter image description here

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?

  • Make a large PNG with transparency, and use that. Use the scale2ref filter to adapt to the input.
    – Gyan
    Jun 16, 2023 at 11:52

1 Answer 1


Here we go, (driven) ChatGPT did it:

ffplay -vf "drawgrid=x=(iw/2):(ih/2):t=3:[email protected], 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.