Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Hacking perfectly square AI videos with Veo 3.1 and NanoBanana 2

DEV Community·Paige Bailey·20 days ago
#rAEV9vW5
#python#ai#videogen#black#bars#ffmpeg
Reading 0:00
15s threshold

If you’ve been playing around with AI video generation lately, you already know the struggle: the tech is insanely cool, but sometimes getting it to output exactly the format you want feels like trying to center a <div> in 2014. Recently, I needed to generate a perfectly looping, high-quality square (1:1) video with audio using Google's new video models. The problem? Native aspect ratio support can sometimes be finicky depending on the model tier, and cropping a generated 16:9 or 9:16 video often ruins the framing or hallucinates weird artifacts at the edges. So, I had to let it cook. I came up with a slightly hacky but reliable workaround using NanoBanana 2 , Veo 3.1 Lite , and our old reliable friend, FFmpeg . Here is the ultimate pipeline to get flawless square AI videos: TL;DR Start with a square image concept. Ask NanoBanana 2 to convert it to a 9:16 aspect ratio by literally just padding the top and bottom with black bars.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More