About this tool
Work out exact pillarbox or letterbox bar sizes, scaled video dimensions and the ffmpeg pad filter for any ratio inside any frame.
Pillarbox Padding Calculator works out how thick the black bars are when content of one aspect ratio is fitted inside a frame of another without cropping. It applies the standard contain fit — if the content is wider than the frame it is limited by width and you get letterbox bars top and bottom, if it is narrower it is limited by height and you get pillarbox bars at the sides — then reports the scaled size, even-pixel encoder dimensions and the matching ffmpeg pad filter. Built for editors, motion designers and anyone re-framing a master for a different delivery spec.
Open Pillarbox Padding Calculator on AltFTool — it loads instantly in your browser.
Upload or drag in the file you want to work with.
Adjust the settings and preview the result.
Download the finished file to your device.
Bar thickness, offsets and scaled dimensions come from the ratio maths, not eyeballed guides.
Dimensions are floored to even pixels so 4:2:0 codecs like H.264 and HEVC accept them.
The scale plus pad filter string is generated for the exact frame and offsets you entered.
Pillarbox puts bars on the left and right; letterbox puts them on the top and bottom. You get pillarbox when the content is narrower than the frame (for example 4:3 in a 16:9 frame) and letterbox when the content is wider (16:9 in a 9:16 vertical frame).
Scale the content to the frame width, then split the leftover height in two. For a 1080×1920 frame the 16:9 content becomes 1080×607.5, leaving 1920 − 607.5 = 1312.5 px of bar, or 656.25 px top and bottom — about 68% of the frame area.
Most delivery codecs use 4:2:0 chroma subsampling, which halves colour resolution horizontally and vertically, so encoded width and height must both be divisible by 2. Odd values make encoders like x264 error out or silently resize.
Use a scale then pad chain, for example -vf "scale=1080:606:flags=lanczos,pad=1080:1920:0:656:color=black". The scale values are the fitted content size, the pad values are the output frame followed by the x and y offset of the content inside it.
Add the Pillarbox Padding Calculatorwidget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/video-aspect-pillarbox-calculator"
title="Pillarbox Padding Calculator — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/video-aspect-pillarbox-calculator?utm_source=embed&utm_medium=widget">AltFTool — free online tools</a></p>