shorts-safezone
See what YouTube Shorts, TikTok and Instagram Reels cover on a 9:16 video: the like and comment buttons, the channel name, the caption. The zones are measured from each platform's own templates, and every number says where it came from.
A made-up frame. The title at the top and the caption near the bottom are both covered on every platform. TikTok's zone has a step where its buttons sit on the right.
Install
pip install shorts-safezone
Reading a video frame needs ffmpeg on your PATH. Images work without it.
Check a video or an image
shorts-safezone check my_short.mp4 --at 3.5
Writes my_short.safezone.png: the frame at 3.5 s, once per platform, with the covered area in red.
shorts-safezone check thumbnail.png --platform youtube,tiktok -o check.png
Check a box
Is a caption at x 150, y 1250, 780 x 90 px safe on a 1080 x 1920 video?
$ shorts-safezone box 150 1250 780 90
YouTube Shorts covered at the bottom edge
TikTok covered at the right and bottom edges
Instagram Reels covered at the bottom edge
On TikTok the caption also runs under the like and comment buttons on the right.
It exits with 1 when the box is covered anywhere, so it can guard a render script. Add --json for machine-readable output and --size 720x1280 for other 9:16 sizes.
From Python:
from shorts_safezone import Box, check_box
check_box(Box.from_xywh(150, 1250, 780, 90))
# {'youtube': ['bottom'], 'tiktok': ['right', 'bottom'], 'reels': ['bottom']}
The zones
Clear area on a 1080 x 1920 video (shorts-safezone zones prints this with sources):
| Platform | Clear area | Source | How it was measured |
|---|---|---|---|
| YouTube Shorts | y 288-1248, x 48-888 | Google's vertical overlay, from Universal Video Ad Safe Zones | Transparent area of the official overlay, pixel by pixel. Our mask matches it on every pixel. |
| TikTok | y 240-840, x 120-960, then y 840-1260, x 120-780 | "In-Feed-Standard Version LTR" template | Clear area of the official template, pixel by pixel. Our mask matches every zone-coloured pixel. |
| Instagram Reels | y 269-1248, x 65-1015 (top 14%, bottom 35%, sides 6%) | Meta's Reels ad guide | Percentages stated on the page. Meta publishes no template. |
Checked on 2026-11-24.
Things to know:
- All three platforms publish these zones for ads. Organic videos get the same player buttons and captions, so the zones are a good guide, but no platform promises them for organic posts.
- TikTok says its zone gets smaller with a longer caption or ad add-ons. This tool uses the standard template.
- Phones differ. Google notes that some devices may still cut off elements.
- The official images are not bundled. Only the measured numbers and links are.
If a platform changes its zone, please open an issue with the new source.
Development
python -m venv .venv
.venv/Scripts/pip install -e ".[test]" # or .venv/bin/pip on macOS and Linux
.venv/Scripts/python -m pytest
License
MIT
Metadata
Release files for shorts-safezone 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shorts_safezone-0.1.1.tar.gz | 85.0 kB | With provenance | Details for shorts_safezone-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shorts_safezone-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for shorts_safezone-0.1.1-py3-none-any.whl |
Total release size: 95.0 kB
Release files / shorts_safezone-0.1.1.tar.gz
| Download URL | shorts_safezone-0.1.1.tar.gz |
|---|---|
| Size | 85.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48d0759551d4d476f8083ee948631bab60b8240eca37a4477252517b2a034986
|
|
BLAKE2b-256 checksum How to use checksums |
5a78937cdbc79f7431848368f1cb9bb472199759b2e140ce2b64b305a03b668d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / shorts_safezone-0.1.1-py3-none-any.whl
| Download URL | shorts_safezone-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10b6034680c5272738a2dd545e4062f2480cf070f183564e2b8a54d54bb606f4
|
|
BLAKE2b-256 checksum How to use checksums |
5d89fbce7693bb8f2f42c278a6d2d88791ef57848cca5fb51f7664bf9b924edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for shorts-safezone 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for shorts_safezone-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.