<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Tomas Reels]]></title><description><![CDATA[Tomas Reels]]></description><link>https://tomasreels.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 20:16:50 GMT</lastBuildDate><atom:link href="https://tomasreels.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A build-time gate for short generated clips: prompt catalogs, aspect ratios, and a QA checklist]]></title><description><![CDATA[How I keep header loops out of a static site unless duration, size, and the prompt version all check out]]></description><link>https://tomasreels.hashnode.dev/a-build-time-gate-for-short-generated-clips-prompt-catalogs-aspect-ratios-and-a-qa-checklist</link><guid isPermaLink="true">https://tomasreels.hashnode.dev/a-build-time-gate-for-short-generated-clips-prompt-catalogs-aspect-ratios-and-a-qa-checklist</guid><category><![CDATA[static site]]></category><category><![CDATA[ai video]]></category><category><![CDATA[developer experience]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[FFmpeg]]></category><dc:creator><![CDATA[Tomas Ferreira]]></dc:creator><pubDate>Sat, 28 Nov 2026 14:57:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ae0a278c714913eb4ca1cda/a301a6bf-85e3-4d5c-a9c8-89d16821b6fc.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I maintain a small documentation site for an internal tools team. The pages are ordinary Markdown, built with a static generator, and until this year the headers were stills. Then we started adding short, silent loops to a few "how this tool feels" pages: five or six seconds, no people, always made from a still we already had the rights to.</p>
<p>The clips were easy to generate and easy to commit badly. Someone would drop a 40 MB file into <code>static/clips/</code>, or a 9:16 export into a page that only has a wide header, or a new render that no longer matched the prompt sitting in a Slack thread. The site built fine. The pages just looked wrong, or they were heavy enough to notice on a poor connection.</p>
<p>This post is the procedure I use now. It is not a review, and it is not a claim that any one generator will give you a perfect loop. It is a way of treating a generated clip as an artefact in the repo: versioned, checked, and rejected by the build if it fails a few boring tests.</p>
<h2>What I generate, and what I do not</h2>
<p>The clips on this site are headers, not demos of product behaviour. If a page explains a deploy button, the clip is atmosphere for the empty bench or the empty terminal window in the still, not a reconstruction of a deploy. I write that in the caption. I also refuse any source still with a face, a badge, or readable customer data.</p>
<p>I have used <a href="https://seedance3.si/">seedance 3</a> for the actual generation, because it will start from a still and produce short versions I can compare. The rest of this pipeline does not care which tool you use, as long as you can export a file and write down the prompt that produced it.</p>
<h2>A prompt catalog, not a chat history</h2>
<p>Prompts used to live in screenshots. That is how we lost the only version that had kept the keyboard still. They now live in the repo, next to the clip, as YAML. One file per clip, named after the page, with a version field I bump when the wording changes.</p>
<pre><code class="language-yaml"># clips/tool-bench.prompt.yml
id: tool-bench
version: 3
source_still: stills/tool-bench.jpg
tool: seedance-3
prompt: &gt;
  Slow change of light on an empty workbench,
  the keyboard and notebook stay still, camera fixed.
negative:
  - people
  - readable screen text
  - moving hardware
aspect: "16:9"
target:
  width: 1280
  height: 720
  duration_s: [5, 7]
  max_bytes: 3500000
  audio: false
notes: &gt;
  v3 adds "the keyboard and notebook stay still"
  after v2 drifted the keys.
</code></pre>
<p>The point of <code>version</code> is not ceremony. When a loop comes back too busy, I change one phrase, bump the version, and keep the old file in git so I can see what I actually sent. I do not overwrite <code>tool-bench.v2.mp4</code> with v3. The page points at a stable filename, and I replace that file only after the gate has passed.</p>
<h2>Aspect ratios, on purpose</h2>
<p>We wasted a week mixing 16:9 headers with 9:16 exports that the CSS then cropped into a strange middle slice. The catalog now names the aspect the page was designed for, and the gate checks the actual width and height, not the filename.</p>
<p>A practical set for this site:</p>
<ul>
<li><code>16:9</code> at 1280×720 for documentation headers</li>
<li><code>1:1</code> at 1080×1080 for the occasional changelog card</li>
<li><code>9:16</code> only if a page is explicitly a phone-first walkthrough</li>
</ul>
<p>If a generator gives me 1920×1080 and the header is 1280 wide, I scale it down in the pipeline rather than shipping the larger file. I do not crop 9:16 into 16:9 and pretend it was composed that way.</p>
<h2>File size and the upscale step</h2>
<p>A six-second loop does not need to be a hero download. I cap most headers at about 3.5 MB. If a first export is soft at full size, I treat sharpening as a separate step, not as something I expect from the first file. The site has a separate <a href="https://seedance3.si/video-upscale">video upscale</a> page for that kind of pass; I only use it on a short test, and I keep both the pre- and post-upscale files so I can see whether the gate still passes on duration and size.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ae0a278c714913eb4ca1cda/ad57a927-ee8d-42eb-b58a-89c166e7fec5.jpg" alt="" style="display:block;margin:0 auto" />

<p>If the upscaled file jumps over the byte cap, I re-encode before it lands in <code>static/</code>. A sharp 8 MB header is not a gift to anyone opening the docs on a phone.</p>
<h2>The build-time gate</h2>
<p>The check runs in the same job as the site build. It needs <code>ffprobe</code> on the path. A shortened version of the script looks like this:</p>
<pre><code class="language-js">// scripts/check-clips.mjs
import { readFileSync } from "node:fs";
import { execFileSync } from "node:child_process";
import { load } from "js-yaml";

const catalog = load(readFileSync("clips/tool-bench.prompt.yml", "utf8"));
const file = "static/clips/tool-bench.mp4";

const raw = execFileSync("ffprobe", [
  "-v", "error",
  "-show_entries", "format=duration,size:stream=width,height,codec_type",
  "-of", "json",
  file,
], { encoding: "utf8" });

const info = JSON.parse(raw);
const video = info.streams.find((s) =&gt; s.codec_type === "video");
const duration = Number(info.format.duration);
const bytes = Number(info.format.size);
const [minS, maxS] = catalog.target.duration_s;

const problems = [];
if (video.width !== catalog.target.width || video.height !== catalog.target.height) {
  problems.push(`resolution ${video.width}x${video.height}`);
}
if (duration &lt; minS || duration &gt; maxS) {
  problems.push(`duration ${duration.toFixed(2)}s`);
}
if (bytes &gt; catalog.target.max_bytes) {
  problems.push(`size ${bytes} bytes`);
}
if (info.streams.some((s) =&gt; s.codec_type === "audio") &amp;&amp; catalog.target.audio === false) {
  problems.push("unexpected audio track");
}

if (problems.length) {
  console.error(`check-clips failed for ${file}: ${problems.join(", ")}`);
  process.exit(1);
}
</code></pre>
<p>I also keep a tiny Markdown caption file beside the clip (<code>tool-bench.caption.md</code>) so the page include cannot drift from the wording I approved: it states that the motion is generated from a still, and that the still is the record.</p>
<p>If you prefer Make or a pre-commit hook, the same <code>ffprobe</code> queries will do. The important part is that a failed check fails the build, rather than becoming a comment in a pull request that we all intend to look at later.</p>
<h2>A QA list I run by eye, once the numbers pass</h2>
<p>Automation will not catch a keyboard that creeps half a pixel. After the gate is green, I still do this, on a phone and on a laptop:</p>
<ol>
<li>Watch the loop at least ten times and look for a jump at the seam.</li>
<li>Confirm that the objects I named as still are still.</li>
<li>Confirm that no new text appeared on a screen or a label.</li>
<li>Compare the clip next to the source still, at full size, not in a thumbnail.</li>
<li>Check the caption is on the page, not only in the repo.</li>
<li>If I used an upscale pass, compare the two files and keep the one that is actually clearer, not only larger.</li>
</ol>
<p>If step 2 fails, I do not "fix it in CSS." I go back to the prompt, bump the version, and generate again.</p>
<h2>What I will not automate</h2>
<p>I will not hook a generator into the build so that a pull request creates new footage by itself. The still, the prompt, and the decision to publish are human steps. The pipeline only refuses files that do not match the contract we already wrote down.</p>
<p>I also will not use a clip as evidence that a UI looks a certain way, or that a run completed. For that, a screenshot and a sentence are enough.</p>
<h2>A short close</h2>
<p>The unglamorous work (a YAML file, a file-size cap, a failed build) is what stopped us from shipping the wrong aspect ratio for a third time. The generator is only the source of the first file. The catalog and the gate are what I trust when I am not looking at the page.</p>
]]></content:encoded></item><item><title><![CDATA[How I Turned Static Product Photos into Short Videos (A Developer's Workflow)]]></title><description><![CDATA[I build small storefronts for friends on weekends. The code is never the hard part. The hard part is that every client sends me the same thing: a folder of…]]></description><link>https://tomasreels.hashnode.dev/how-i-turned-static-product-photos-into-short-videos-a-developer-s-workflow</link><guid isPermaLink="true">https://tomasreels.hashnode.dev/how-i-turned-static-product-photos-into-short-videos-a-developer-s-workflow</guid><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Tomas Ferreira]]></dc:creator><pubDate>Tue, 27 Oct 2026 13:16:22 GMT</pubDate><content:encoded><![CDATA[<p>I build small storefronts for friends on weekends. The code is never the hard part. The hard part is that every client sends me the same thing: a folder of flat product JPEGs and the question, "Can the homepage have a video?" I don't own a gimbal, and I don't want to learn motion graphics. So I treated the problem like any other integration task: find the input format, find the output format, and write down the steps between them.</p>
<h2>The constraint: I only had stills</h2>
<p>My inputs were plain product shots on white or light backgrounds. My required output was a short looping clip for a hero section, plus a vertical version for social. I wanted a browser tool, nothing to install, and a process I could repeat for the next client without thinking.</p>
<p>I ended up using <a href="https://seedance3.si/">https://seedance3.si/</a>, which supports image-to-video: you upload a still as the starting frame and describe the motion in text. That framing made sense to me as a developer. The image is the fixed state; the prompt is the transition.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ae0a278c714913eb4ca1cda/8fe7d8a7-ef29-466d-8454-cbe268d376f7.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Screenshot of the use-case section, listing text to video, image to video and video with sound.</em></p>
<h2>Treating the prompt like a function signature</h2>
<p>My first prompts were vague ("make it look premium") and the results were vague too. What helped was writing prompts like I write function arguments, one parameter at a time:</p>
<ul>
<li><strong>camera:</strong> slow push-in, or a gentle orbit</li>
<li><strong>subject behaviour:</strong> the product stays still; light moves across it</li>
<li><strong>environment:</strong> soft shadow, no new objects</li>
<li><strong>duration intent:</strong> one action only</li>
</ul>
<p>Keeping the product static and moving the camera or light gave me the cleanest drafts. When I asked for the product itself to move, small details like logos sometimes drifted, so I stopped doing that.</p>
<h2>Building a tiny pipeline around it</h2>
<p>Here is the loop I settled on:</p>
<ol>
<li>Crop and clean the source photo first. A tidy input matters more than a clever prompt.</li>
<li>Generate a wide version for the hero and a tall version for social, since both formats are offered.</li>
<li>Preview, discard anything with warped labels, download the keepers.</li>
<li>Run the chosen clip through an upscaler before it goes on the site.</li>
<li>Compress with ffmpeg and serve it as a muted, looping <code>&lt;video&gt;</code> element with a poster image.</li>
</ol>
<p>For step 4 I used the <a href="https://seedance3.si/video-upscale">seedance 3 video tool for upscaling</a>, which has its own page where you upload a clip and pick a target resolution. That saved me from shipping a soft-looking video on a large desktop screen.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6ae0a278c714913eb4ca1cda/04bafde1-6710-4d95-a6e3-9bacda79747c.jpg" alt="" style="display:block;margin:0 auto" />

<p><em>Screenshot of the Video Upscaler page, where you upload a clip and choose an output resolution.</em></p>
<h2>What I'd tell another developer</h2>
<p>Don't expect a generator to replace a product shoot. Expect it to replace the empty hero section you'd otherwise ship. Check every frame for product accuracy before a client sees it, because a hallucinated button on a real product is a support ticket waiting to happen. And read the plan and licensing terms yourself before using clips commercially.</p>
<p>If you have a folder of stills and a homepage that feels too static, <a href="https://seedance3.si/">Seedance 3.0</a> is a reasonable place to start experimenting. Treat it like any dependency: test the inputs, constrain the outputs, and keep a human in review.</p>
]]></content:encoded></item></channel></rss>