Nodes/DJZ-Nodes/Black Bars V2
ComfyUI Node

Black Bars V2

Letterbox or pillarbox your video to a real cinematic ratio

By MushroomFleet·Created 2 years ago·Updated 5 months ago· 78
Black Bars V2
  • images
  • IMAGE
mode
target_ratio
safe_areafalse
show_guidesfalse

Nothing screams "I'm about to watch a movie" like black bars, and BlackBarsV2 is the node that puts them on. It takes your image or frame batch and reformats it to a target aspect ratio - either by adding letterbox/pillarbox bars or by center-cropping. If you've ever needed a 16:9 clip to feel like an anamorphic film (2.39:1) or a square image to pass as 4:3 broadcast, this is the tool. It's one of the most genuinely useful "finishing" nodes in the DJZ-Nodes pack.

How it works

The node looks at your source resolution, compares it to the target ratio, and does the math in one of three modes:

  • letterbox - adds bars top and bottom. The right choice when your image is wider than the target (16:9 source → 2.39:1 bars).
  • pillarbox - adds bars left and right, for when your source is narrower than the target (or you're going vertical).
  • center_crop - no bars at all; it crops the frame down to the target ratio instead. Loses image area but keeps the full frame height.

The target_ratio dropdown has the ratios you actually see in the wild: auto, 2.39:1 (Anamorphic), 2.35:1 (CinemaScope), 1.85:1 (Theatrical), 16:9 (HD), 4:3 (Classic), 1:1 (Square), 9:16 (Vertical). In auto mode it detects your source ratio from a lookup table of common resolutions (1920×1080 → 16:9, 1080×1920 → 9:16, etc.) and then, if your input already matches, it returns the frame untouched rather than adding needless bars.

Two extras worth knowing: safe_area and show_guides. Safe-area marks the standard broadcast safe margins, and show-guides overlays guide lines - both are framing helpers for composition work, not final-output features, so turn them off before rendering.

What people actually use it for

  • Making an AI-generated clip feel cinematic by formatting it to 2.39:1 before or after processing.
  • Standardizing a batch of mixed-aspect images into one deliverable ratio for a video project.
  • Going vertical (9:16) for social from a 16:9 source with pillarbox bars.

Installing

It's part of DJZ-Nodes (MushroomFleet / Drift Johnson), so you install the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt

Or search "DJZ-Nodes" in ComfyUI Manager. The node is pure PyTorch, no special deps.

Gotchas

The main trap is expecting this node to upscale. It doesn't - it just adds bars or crops, so the active image area stays at source resolution. A 1280×720 source letterboxed to 2.39:1 gives you a 1280×720 file with a small 1280×~535 active area. If you want a big cinematic deliverable, upscale first, then bar it. Also note center_crop discards the sides permanently, so don't use it on footage with important action at the edges.

Categoryimage/format

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
modeCOMBO3 options: letterbox, pillarbox, center_crop
target_ratioCOMBO8 options: auto, 2.39:1 (Anamorphic), 2.35:1 (CinemaScope), 1.85:1 (Theatrical), 16:9 (HD), 4:3 (Classic), +2
safe_areaBOOLEANfalse
show_guidesBOOLEANfalse

Outputs (1)

NameTypeDescription
IMAGEIMAGE