<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jesus Lopez</title>
    <description>The latest articles on DEV Community by Jesus Lopez (@jesus_lopez_63e2183718359).</description>
    <link>https://dev.to/jesus_lopez_63e2183718359</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4091012%2Fc293adf3-3cc1-4584-97aa-fee9eee30bc5.png</url>
      <title>DEV Community: Jesus Lopez</title>
      <link>https://dev.to/jesus_lopez_63e2183718359</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jesus_lopez_63e2183718359"/>
    <language>en</language>
    <item>
      <title>Rendering Music Videos to MP4 Entirely in the Browser</title>
      <dc:creator>Jesus Lopez</dc:creator>
      <pubDate>Mon, 16 Nov 2026 10:16:45 +0000</pubDate>
      <link>https://dev.to/jesus_lopez_63e2183718359/rendering-music-videos-to-mp4-entirely-in-the-browser-5hfk</link>
      <guid>https://dev.to/jesus_lopez_63e2183718359/rendering-music-videos-to-mp4-entirely-in-the-browser-5hfk</guid>
      <description>&lt;p&gt;&lt;em&gt;No upload, no render queue: how a song and a cover become an H.264 file with WebCodecs, and the parts that broke first.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Musicians who want a visualizer for a new single usually have two things: an unreleased master they would rather not upload anywhere, and a deadline. That combination makes a good case for doing the whole job on the client. The browser can decode the audio, analyze it, draw every frame and encode an MP4 without a server ever seeing the file. This post walks through the pipeline behind an &lt;a href="https://ezvisualizer.com/" rel="noopener noreferrer"&gt;audio visualizer&lt;/a&gt; built that way, and the places where real browsers pushed back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyze The Audio Once, Offline
&lt;/h2&gt;

&lt;p&gt;The tempting approach is to wire an &lt;code&gt;AnalyserNode&lt;/code&gt; to the playing song and draw whatever it reports. That works for a live preview and fails for an export, because an export has to run faster or slower than real time and still produce the same frames every time.&lt;/p&gt;

&lt;p&gt;So the audio is decoded to PCM once, folded to mono, and turned into a feature track with no Web Audio involved. Each feature frame holds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;48 spectrum bands, log-spaced from 30 Hz up to about 11 kHz, from a Hann-windowed FFT&lt;/li&gt;
&lt;li&gt;loudness, plus separate bass and mid envelopes&lt;/li&gt;
&lt;li&gt;a kick envelope with a 0.16 s decay and a minimum gap of 0.11 s between kicks&lt;/li&gt;
&lt;li&gt;onsets and an overall BPM estimate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The track is sampled at 60 feature frames per second. A 30 fps render interpolates between them, and a 60 fps render reads them directly. Because the analysis is a pure function from samples to arrays, it runs in a worker, on the main thread in slices when a worker is not available, and under &lt;code&gt;node --test&lt;/code&gt; in CI. The same numbers drive a live &lt;a href="https://ezvisualizer.com/spectrum-analyzer" rel="noopener noreferrer"&gt;spectrum analyzer&lt;/a&gt; view and the exported video, so what you preview is what you get.&lt;/p&gt;

&lt;h2&gt;
  
  
  Draw Frames From A Clock You Own
&lt;/h2&gt;

&lt;p&gt;With the features precomputed, rendering frame &lt;code&gt;n&lt;/code&gt; means drawing the scene at time &lt;code&gt;n / fps&lt;/code&gt;. Nothing reads &lt;code&gt;performance.now()&lt;/code&gt; or waits for &lt;code&gt;requestAnimationFrame&lt;/code&gt;. That makes the export deterministic, and it lets a slow laptop take longer without dropping frames.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;frameCount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;drawScene&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;features&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;fps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// pure: same inputs, same pixels&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;VideoFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1e6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;fps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;keyFrame&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fps&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodeQueueSize&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'dequeue'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;once&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details matter more than they look. &lt;code&gt;frame.close()&lt;/code&gt; is not optional: forget it and memory climbs until the tab dies somewhere around minute three of a long song. And the &lt;code&gt;encodeQueueSize&lt;/code&gt; check is the only backpressure you get. Without it the loop happily queues hundreds of frames the encoder has not touched.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask Before You Offer 4K
&lt;/h2&gt;

&lt;p&gt;Hardware support for H.264 at 3840×2160 varies by machine, browser and power state. Rather than guess, the app asks the encoder before the 4K option is shown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;bitrate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;fps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1920&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1080&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;6_000_000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;supported&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nc"&gt;VideoEncoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isConfigSupported&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;codec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// an H.264 profile string, e.g. 'avc1.640033'&lt;/span&gt;
  &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;framerate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fps&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;bitrate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bitrate scales from 6 Mbps at 1080p30 by pixel rate, so 1080p60 asks for 12 Mbps and 4K30 for 24 Mbps. If the check fails for every candidate codec string, the option simply is not offered. That is a better experience than letting someone wait through a long render that dies at the first frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do Not Re-Encode The MP3
&lt;/h2&gt;

&lt;p&gt;The most common complaint about "convert MP3 to video" tools is that they decode the song and encode it again, a second lossy pass on audio that was already compressed. For a whole-song export there is no reason to. The MP3's packets can be copied into the MP4 untouched, the same idea as &lt;code&gt;ffmpeg -c:a copy&lt;/code&gt;. That is what the &lt;a href="https://ezvisualizer.com/mp3-to-mp4" rel="noopener noreferrer"&gt;mp3 to mp4&lt;/a&gt; path does.&lt;/p&gt;

&lt;p&gt;There is one catch. MP3 encoders add a short block of priming samples at the start, so the first audible sample is not at time zero. If you copy the packets and start the visuals at zero, the bars hit slightly before the kick. The fix is to read the encoder delay from the file and offset the visual timeline by that amount. When the source is WAV or FLAC, nothing can be copied, so the audio is encoded once to AAC from the lossless samples.&lt;/p&gt;

&lt;p&gt;The muxing itself is handled by a library (Mediabunny in this case) that takes encoded video chunks and audio packets and writes a standard MP4 container.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan For The Browser Taking The Encoder Back
&lt;/h2&gt;

&lt;p&gt;The failure that took longest to understand was an export that died halfway with a codec error on a machine that had exported fine a minute earlier. Browsers can reclaim a codec that looks idle or belongs to a tab in the background, and a long export that stalls between frames, for example while a heavy frame draws, can lose its encoder.&lt;/p&gt;

&lt;p&gt;Two changes made this rare instead of common. Exports are serialized with the Web Locks API, so two tabs never compete for the same hardware encoder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;locks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'visualizer-export'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;runExport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And when an export does fail with the specific reclaimed-codec error, it restarts once automatically instead of showing an error. If the second run completes, the person never sees that anything happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Adds Up To
&lt;/h2&gt;

&lt;p&gt;The result is a pipeline where the only network traffic is the page itself. A full song renders to a 1080p &lt;a href="https://ezvisualizer.com/youtube-visualizer" rel="noopener noreferrer"&gt;youtube visualizer&lt;/a&gt; export on an ordinary laptop, often faster than real time for simpler styles, and the master stays on the machine it started on. The parts that needed the most care were not the visuals. They were the boring edges: backpressure, closing frames, asking the encoder what it can do, keeping the original audio, and expecting the browser to change its mind halfway through.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>webcodecs</category>
      <category>audio</category>
    </item>
    <item>
      <title>Handling retries and credits in an asynchronous AI video generator</title>
      <dc:creator>Jesus Lopez</dc:creator>
      <pubDate>Tue, 27 Oct 2026 12:44:51 +0000</pubDate>
      <link>https://dev.to/jesus_lopez_63e2183718359/handling-retries-and-credits-in-an-asynchronous-ai-video-generator-nne</link>
      <guid>https://dev.to/jesus_lopez_63e2183718359/handling-retries-and-credits-in-an-asynchronous-ai-video-generator-nne</guid>
      <description>&lt;p&gt;An AI video generator can look simple from the outside: upload a photo, press a button, and wait for a video. The harder part is handling everything between those steps—duplicate clicks, slow provider responses, failed jobs, and credits that have already been charged.&lt;/p&gt;

&lt;p&gt;I encountered these problems while building &lt;a href="https://outstandingtinydeskai.video/" rel="noopener noreferrer"&gt;Outstanding Tiny Desk AI&lt;/a&gt;, a tool that turns a lead singer photo and an optional sax player photo into a short parody video. The &lt;a href="https://outstandingtinydeskai.video/examples" rel="noopener noreferrer"&gt;video examples&lt;/a&gt; show the intended result; here are the decisions behind the generation flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate before starting an expensive job
&lt;/h2&gt;

&lt;p&gt;The upload endpoint checks the actual image bytes, file type, size, and dimensions before sending a photo to the video provider. It also requires the user to confirm they have permission to use the photos.&lt;/p&gt;

&lt;p&gt;This catches unusable input before a paid job starts. Checking the filename or browser-supplied MIME type alone would not be enough. The &lt;a href="https://outstandingtinydeskai.video/how-to-make-outstanding-tiny-desk-ai-video" rel="noopener noreferrer"&gt;step-by-step guide&lt;/a&gt; also explains what makes a good input photo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Treat retries as normal
&lt;/h2&gt;

&lt;p&gt;A user might double-click, retry after a slow response, or open the same request in another tab. Charging for each request would be a bad outcome.&lt;/p&gt;

&lt;p&gt;The generation endpoint uses an idempotency key tied to the user. It also fingerprints the photos, options, and template version. If the same input already has a running job, the endpoint returns that job instead of starting and charging for another one. Reusing a key with different input is rejected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the task and credit movement together
&lt;/h2&gt;

&lt;p&gt;A video costs 10 credits. Creating its task and reserving those credits need to act as one operation, even when two requests arrive at nearly the same time. The implementation uses an atomic database batch so concurrent requests cannot spend the same credits twice.&lt;/p&gt;

&lt;p&gt;A failed job returns its credits, but a temporary network error is not necessarily a failed job. The provider may have accepted the request even if the response never reached our server. In that uncertain state, the task waits for a callback or reconciliation instead of immediately refunding and risking a free duplicate generation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show the state the user is actually in
&lt;/h2&gt;

&lt;p&gt;The interface distinguishes submitting, queued, generating, and saving from success or failure. Users can leave the page and find completed videos in My videos. Finished files are served through an authenticated download route.&lt;/p&gt;

&lt;p&gt;The product deliberately supports one fixed video format rather than a general-purpose prompt box. That keeps the user flow short, though it also means the shots and song are not customizable. The &lt;a href="https://outstandingtinydeskai.video/outstanding-tiny-desk-ai-template" rel="noopener noreferrer"&gt;template breakdown&lt;/a&gt; explains the fixed shot sequence.&lt;/p&gt;

&lt;p&gt;How do you handle a provider request when you cannot tell whether it was accepted? I'd be interested in other approaches to that failure state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqhdv7yhk4yy99a4kvg3s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqhdv7yhk4yy99a4kvg3s.jpg" alt=" " width="360" height="641"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Designing AI Camera Workflows Around a Single Reference Image</title>
      <dc:creator>Jesus Lopez</dc:creator>
      <pubDate>Mon, 05 Oct 2026 08:18:05 +0000</pubDate>
      <link>https://dev.to/jesus_lopez_63e2183718359/designing-ai-camera-workflows-around-a-single-reference-image-2glp</link>
      <guid>https://dev.to/jesus_lopez_63e2183718359/designing-ai-camera-workflows-around-a-single-reference-image-2glp</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9cfzl3wi3s998kaz5k2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9cfzl3wi3s998kaz5k2b.png" alt=" " width="799" height="420"&gt;&lt;/a&gt;&lt;br&gt;
A reference image gives a creative project a starting point, but it rarely answers every visual question. A product designer may need to see the same object from above. A character artist may need a side view. A filmmaker may want to test what happens when the camera pushes toward a still scene.&lt;/p&gt;

&lt;p&gt;These sound like variations of one task, but they produce different kinds of output. A new viewpoint is a still image. A camera path is a video. A turntable is a sequence of views. A scene template may combine multiple references into one performance. Keeping those workflows distinct makes it easier to choose the right tool and evaluate the result.&lt;/p&gt;

&lt;p&gt;I organized &lt;a href="https://3d-camera-control.com/" rel="noopener noreferrer"&gt;3D Camera Control&lt;/a&gt; around those differences. Here is how I think about the main workflows, what each can help with, and where AI-generated results need a closer look.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Exploring a new viewpoint
&lt;/h2&gt;

&lt;p&gt;For a still image, the first decision is usually where the viewer should be. Rotation changes which side of a subject is visible. Elevation moves the viewpoint above or below it. Distance changes the framing.&lt;/p&gt;

&lt;p&gt;A useful experiment changes one of these at a time. If a front view is your starting point, try a side angle at roughly the same distance. Then return to the original rotation and raise the camera. This gives you a clearer sense of which decision made a composition more useful.&lt;/p&gt;

&lt;p&gt;Different subjects call for different checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;a href="https://3d-camera-control.com/face-angle-changer" rel="noopener noreferrer"&gt;face angle change&lt;/a&gt; can help explore a three-quarter or profile portrait. Compare facial features with the source image rather than judging the new composition alone.&lt;/li&gt;
&lt;li&gt;An &lt;a href="https://3d-camera-control.com/ai-pose-changer" rel="noopener noreferrer"&gt;AI pose change&lt;/a&gt; explores body position. The question is whether the new stance works while the person, outfit, and setting remain recognizable.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://3d-camera-control.com/zoom-in-image" rel="noopener noreferrer"&gt;zoomed-in image&lt;/a&gt; can focus attention on a detail, while a &lt;a href="https://3d-camera-control.com/zoom-out-image" rel="noopener noreferrer"&gt;zoomed-out image&lt;/a&gt; explores a wider frame and the surrounding scene.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When one view is not enough, the output can become a small set. A &lt;a href="https://3d-camera-control.com/character-turnaround" rel="noopener noreferrer"&gt;character turnaround&lt;/a&gt; provides front, side, or back references for discussing a design. &lt;a href="https://3d-camera-control.com/product-multiple-views" rel="noopener noreferrer"&gt;Multiple product views&lt;/a&gt; help compare angles for a concept board or a planned photo shoot. A &lt;a href="https://3d-camera-control.com/3d-image-spinner" rel="noopener noreferrer"&gt;3D image spinner&lt;/a&gt; lets viewers inspect a sequence of 2D frames around a subject.&lt;/p&gt;

&lt;p&gt;The word “3D” can be misleading here. These generated views are images, not a measured 3D model. If the source does not show the back of an object, AI has to infer it. That makes the results valuable for exploration, but important geometry, labels, and identity details still need human review.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Moving the camera through time
&lt;/h2&gt;

&lt;p&gt;A video adds another decision: how does the viewpoint travel between the opening and closing frames? A push-in, an orbit, and a fast pan can all start from the same image but create very different effects.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://3d-camera-control.com/camera-control-for-video" rel="noopener noreferrer"&gt;camera control for video&lt;/a&gt; workflow focuses on planning a camera path with keyframes. The &lt;a href="https://3d-camera-control.com/ai-camera-movement" rel="noopener noreferrer"&gt;AI camera movement&lt;/a&gt; workflow provides movement references such as dolly, pan, orbit, and aerial motion that can be refined before generation.&lt;/p&gt;

&lt;p&gt;Some movements are easier to evaluate as focused examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;a href="https://3d-camera-control.com/dolly-in" rel="noopener noreferrer"&gt;dolly-in shot&lt;/a&gt; moves attention toward the subject.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://3d-camera-control.com/whip-pan" rel="noopener noreferrer"&gt;whip pan&lt;/a&gt; explores a rapid change in direction.&lt;/li&gt;
&lt;li&gt;An &lt;a href="https://3d-camera-control.com/ai-drone-shot" rel="noopener noreferrer"&gt;AI drone shot&lt;/a&gt; explores an elevated or aerial camera path.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://3d-camera-control.com/face-zoom-filter" rel="noopener noreferrer"&gt;face zoom&lt;/a&gt; or &lt;a href="https://3d-camera-control.com/eye-zoom" rel="noopener noreferrer"&gt;eye zoom&lt;/a&gt; tests a more specific framing effect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For moving shots, I look beyond whether an individual frame is attractive. Does the subject remain recognizable throughout the clip? Does the motion communicate the intended change in attention? Does the background behave plausibly as the camera moves? Watching the full result matters more than checking a thumbnail.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Starting from a character or scene concept
&lt;/h2&gt;

&lt;p&gt;Sometimes the creative question begins before the camera is chosen. An &lt;a href="https://3d-camera-control.com/ai-influencer-generator" rel="noopener noreferrer"&gt;AI influencer generator&lt;/a&gt; can help explore a character concept from a description or photo and build visual references for later work.&lt;/p&gt;

&lt;p&gt;A template solves a different problem: it fixes much of the scene so that the user can focus on the inputs. For example, &lt;a href="https://3d-camera-control.com/hotel-lobby-ai" rel="noopener noreferrer"&gt;Hotel Lobby AI&lt;/a&gt; takes two separate performer photos and places them in an orange recording-booth duet. The template defines the setting and performance direction; the generated video still needs to be reviewed for facial details, gestures, and timing.&lt;/p&gt;

&lt;p&gt;Templates can make an experiment quicker, but they do not remove uncertainty. Clear source images and a review of the finished output remain important, especially when a result includes identifiable people or details that should stay consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  A useful review process
&lt;/h2&gt;

&lt;p&gt;Across all these workflows, I find it helpful to decide what success means before generating. Write down the subject details that must survive, the viewpoint or movement you want to test, and how the result will be used. Then compare the output with the reference.&lt;/p&gt;

&lt;p&gt;A product concept image may be enough for a mood board but unsuitable for describing the exact item being sold. A character turnaround may expose design questions without being consistent enough for final modeling. A video may communicate a camera idea even if individual frames need another pass.&lt;/p&gt;

&lt;p&gt;That distinction is the point of these tools: they help explore and communicate visual options. The generated result is a reference to inspect and refine, while the final decision about accuracy and usefulness stays with the creator.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>saas</category>
    </item>
    <item>
      <title>I Built GPT Image 2.5: AI Image Generation with Both Classic Prompts and a Chat Agent</title>
      <dc:creator>Jesus Lopez</dc:creator>
      <pubDate>Thu, 10 Sep 2026 15:52:51 +0000</pubDate>
      <link>https://dev.to/jesus_lopez_63e2183718359/i-built-gpt-image-25-ai-image-generation-with-both-classic-prompts-and-a-chat-agent-4php</link>
      <guid>https://dev.to/jesus_lopez_63e2183718359/i-built-gpt-image-25-ai-image-generation-with-both-classic-prompts-and-a-chat-agent-4php</guid>
      <description>&lt;p&gt;I recently built GPT Image 2.5, a web-based AI image generation and editing workspace:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gpt-image-2-5.org/" rel="noopener noreferrer"&gt;https://gpt-image-2-5.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most AI image tools follow the same pattern: choose a model, write a prompt, select a size, click generate, and wait for the result. That workflow is still useful, so GPT Image 2.5 supports the classic image generation flow.&lt;/p&gt;

&lt;p&gt;But I also wanted to explore a more natural way to create images: generating through conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two ways to create images
&lt;/h2&gt;

&lt;p&gt;GPT Image 2.5 currently supports both workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traditional prompt-based image generation&lt;/li&gt;
&lt;li&gt;Conversational image generation with an AI agent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The traditional mode is good when you already know what you want. You can write a prompt, upload a reference image, choose the model and output size, then generate or edit the image directly.&lt;/p&gt;

&lt;p&gt;The AI agent mode is different. Instead of filling out everything manually, you can chat with the agent about what you want to create. For example, you can describe a product photo, a poster idea, a portrait style, or a marketing visual, and the agent helps turn that conversation into an image generation task.&lt;/p&gt;

&lt;p&gt;This makes the workflow feel closer to working with a creative assistant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can start with a rough idea&lt;/li&gt;
&lt;li&gt;Ask the agent to refine the direction&lt;/li&gt;
&lt;li&gt;Adjust the style through conversation&lt;/li&gt;
&lt;li&gt;Explore multiple visual concepts&lt;/li&gt;
&lt;li&gt;Generate images without needing to write a perfect prompt from the beginning&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supported models and use cases
&lt;/h2&gt;

&lt;p&gt;The workspace includes Flare, Sunburst, and GPT Image 2.&lt;/p&gt;

&lt;p&gt;Flare is useful for fast creative exploration. Sunburst is better suited for more detail-focused editing. GPT Image 2 remains available for workflows built around the previous generation.&lt;/p&gt;

&lt;p&gt;Some example use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Product visuals&lt;/li&gt;
&lt;li&gt;Portraits&lt;/li&gt;
&lt;li&gt;Posters&lt;/li&gt;
&lt;li&gt;Campaign concepts&lt;/li&gt;
&lt;li&gt;Social media images&lt;/li&gt;
&lt;li&gt;Reference-based image editing&lt;/li&gt;
&lt;li&gt;Creative visual experiments&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why add an AI agent?
&lt;/h2&gt;

&lt;p&gt;A lot of people do not naturally think in “prompt format.” They may know the result they want, but not how to describe it in a way that works well for an image model.&lt;/p&gt;

&lt;p&gt;The agent helps bridge that gap.&lt;/p&gt;

&lt;p&gt;Instead of forcing users to write a polished prompt immediately, the site lets them describe the idea conversationally. The agent can help shape the request, clarify the visual direction, and guide the generation process.&lt;/p&gt;

&lt;p&gt;For developers and makers, I think this is an interesting direction: AI image tools do not have to be just prompt boxes. They can become interactive creative workspaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am improving next
&lt;/h2&gt;

&lt;p&gt;The project is still early, and I am working on improving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The chat-to-image workflow&lt;/li&gt;
&lt;li&gt;Better prompt refinement&lt;/li&gt;
&lt;li&gt;More image editing options&lt;/li&gt;
&lt;li&gt;More examples and templates&lt;/li&gt;
&lt;li&gt;A smoother model selection experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would love feedback from developers, designers, marketers, and creators who use AI images in real workflows.&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://gpt-image-2-5.org/" rel="noopener noreferrer"&gt;https://gpt-image-2-5.org/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Built an AI Tool That Turns Flat Images into Editable Layers</title>
      <dc:creator>Jesus Lopez</dc:creator>
      <pubDate>Mon, 31 Aug 2026 10:05:09 +0000</pubDate>
      <link>https://dev.to/jesus_lopez_63e2183718359/i-built-an-ai-tool-that-turns-flat-images-into-editable-layers-2ike</link>
      <guid>https://dev.to/jesus_lopez_63e2183718359/i-built-an-ai-tool-that-turns-flat-images-into-editable-layers-2ike</guid>
      <description>&lt;h1&gt;
  
  
  I Built an AI Tool That Turns Flat Images into Editable Layers
&lt;/h1&gt;

&lt;p&gt;A flat image can look complete, but it is often difficult to edit.&lt;/p&gt;

&lt;p&gt;If you want to move a product, remove a shadow, replace a background, edit text, or reuse part of a composition, you usually have to recreate the image structure manually in Photoshop.&lt;/p&gt;

&lt;p&gt;That was the problem we wanted to solve with &lt;a href="https://image2layer.com" rel="noopener noreferrer"&gt;Image2Layer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Image2Layer does
&lt;/h2&gt;

&lt;p&gt;Image2Layer uses AI to analyze a flat JPG, PNG, or WebP image and separate it into meaningful editable layers.&lt;/p&gt;

&lt;p&gt;Depending on the image, the result may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main subjects&lt;/li&gt;
&lt;li&gt;Foreground objects&lt;/li&gt;
&lt;li&gt;Product elements&lt;/li&gt;
&lt;li&gt;Text and logos&lt;/li&gt;
&lt;li&gt;Shadows&lt;/li&gt;
&lt;li&gt;Decorative elements&lt;/li&gt;
&lt;li&gt;Background areas&lt;/li&gt;
&lt;li&gt;Reconstructed regions behind removed objects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each layer keeps its transparency, so it can be moved, hidden, edited, or recomposed independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Export formats
&lt;/h2&gt;

&lt;p&gt;After processing an image, you can export:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transparent PNG layers&lt;/li&gt;
&lt;li&gt;A ZIP package containing the layers&lt;/li&gt;
&lt;li&gt;A layered PSD file for Photoshop and other creative workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to recreate the original source file perfectly. Instead, Image2Layer provides a useful editable starting point from an image that would otherwise be difficult to work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is it useful for?
&lt;/h2&gt;

&lt;p&gt;Some possible workflows include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retouching product photos&lt;/li&gt;
&lt;li&gt;Creating new e-commerce compositions&lt;/li&gt;
&lt;li&gt;Reusing poster and marketing assets&lt;/li&gt;
&lt;li&gt;Preparing images for animation&lt;/li&gt;
&lt;li&gt;Separating characters and objects from illustrations&lt;/li&gt;
&lt;li&gt;Rebuilding backgrounds&lt;/li&gt;
&lt;li&gt;Moving from an AI-generated image to an editable design&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Upload a JPG, PNG, or WebP image.&lt;/li&gt;
&lt;li&gt;Choose the layer detail level.&lt;/li&gt;
&lt;li&gt;Add separation notes if certain elements are important.&lt;/li&gt;
&lt;li&gt;Generate the layers.&lt;/li&gt;
&lt;li&gt;Review and download the result as PNG, ZIP, or PSD.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can try it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://image2layer.com/image-to-psd" rel="noopener noreferrer"&gt;Try Image2Layer&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we are still improving
&lt;/h2&gt;

&lt;p&gt;AI separation is not equally easy for every image. Fine details, transparent objects, reflections, complex typography, and heavily overlapping elements can still be challenging.&lt;/p&gt;

&lt;p&gt;We are continuing to improve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Layer boundaries&lt;/li&gt;
&lt;li&gt;Background reconstruction&lt;/li&gt;
&lt;li&gt;Text and logo separation&lt;/li&gt;
&lt;li&gt;PSD export quality&lt;/li&gt;
&lt;li&gt;Control over the desired layer structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work with image editing, design, or creative automation, I would be interested to hear what kind of images you would want to split into layers.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>design</category>
    </item>
  </channel>
</rss>
