<?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: Owen R.</title>
    <description>The latest articles on DEV Community by Owen R. (@owen_clips).</description>
    <link>https://dev.to/owen_clips</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%2F4273714%2F3ccfe45e-49c0-41ad-aa17-ea6f5df0d787.png</url>
      <title>DEV Community: Owen R.</title>
      <link>https://dev.to/owen_clips</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/owen_clips"/>
    <language>en</language>
    <item>
      <title>How a video tool can cut, caption and export MP4 clips in the browser without uploading the file</title>
      <dc:creator>Owen R.</dc:creator>
      <pubDate>Mon, 30 Nov 2026 08:22:37 +0000</pubDate>
      <link>https://dev.to/owen_clips/how-a-video-tool-can-cut-caption-and-export-mp4-clips-in-the-browser-without-uploading-the-file-3m3p</link>
      <guid>https://dev.to/owen_clips/how-a-video-tool-can-cut-caption-and-export-mp4-clips-in-the-browser-without-uploading-the-file-3m3p</guid>
      <description>&lt;p&gt;Most clipping tools follow the same pattern: you upload a long video, a server cuts it, a server renders the clips and you download the results. There's another way to build this, where the heavy file never leaves the user's machine and only small pieces of data go out to AI services. Browser Clipper, an &lt;a href="https://browserclipper.com/" rel="noopener noreferrer"&gt;AI clipping tool that turns long videos into captioned shorts in your browser&lt;/a&gt;, is one public example of that design. This post walks you through the general approach at a high level, then lists what that site says about its own setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with uploading a two hour video
&lt;/h2&gt;

&lt;p&gt;A long podcast or stream recording is a file of several gigabytes. Before an upload-based service can do anything, the whole file has to arrive on its servers. On a home connection, that upload is often the slowest part of the job. Then the clips render on a server, sit in a queue and come back down as new downloads.&lt;/p&gt;

&lt;p&gt;If you flip that around, the browser already has the file. What it lacks is two things: a transcript, and some judgment about who should stay in frame. Both of those can be produced from much smaller inputs than the full video.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: read the file locally
&lt;/h2&gt;

&lt;p&gt;When a user picks a file through an &lt;code&gt;&amp;lt;input type="file"&amp;gt;&lt;/code&gt;, you get a &lt;code&gt;File&lt;/code&gt; object. You can read it, seek in it and decode it. None of that sends a byte over the network.&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;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'#video'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;input&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;'change'&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&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="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// still only on this machine&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'video'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&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;An object URL lets a &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; element play the file for preview. For real processing you'd demux the container yourself and decode frames with something like WebCodecs, which recent Chromium browsers support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: send only the audio for transcription
&lt;/h2&gt;

&lt;p&gt;Picking clip-worthy moments is mostly a language problem. You need to know what people said and when. So you extract the audio track in the browser, encode it to something compact and send that to a speech-to-text service that returns words with timestamps.&lt;/p&gt;

&lt;p&gt;The word timestamps it returns become your timeline for everything else: where a clip starts and ends, and when each caption word lights up.&lt;/p&gt;

&lt;p&gt;With the transcript in hand, a model or a set of rules can choose the moments. A good selector looks for passages that stand on their own, and it can join segments that sit minutes apart into one clip when they belong to the same thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: send a few still frames for framing
&lt;/h2&gt;

&lt;p&gt;A wide 16:9 shot has to become a 9:16 vertical clip, so you need to decide where the narrow crop window goes. You don't need the video for that. A handful of still frames per clip is enough for a vision model or a face detector to say where the speaker is, or whether two people are on screen.&lt;/p&gt;

&lt;p&gt;You grab those frames locally (draw the video to a canvas at a given timestamp and export a small image), send them out and get back a position or a layout choice. The rest of the frames never leave the machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: render and export in the browser
&lt;/h2&gt;

&lt;p&gt;Now you have cut points, a crop position and timed caption words. Rendering is a loop: decode a frame, draw the cropped region to a 1080 by 1920 canvas, draw the caption text on top, encode the result.&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="c1"&gt;// inside the per-frame loop&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawImage&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="n"&gt;cropX&lt;/span&gt;&lt;span class="p"&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;cropW&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;srcH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1920&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;drawCaption&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="nf"&gt;wordsAt&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="n"&gt;timestamp&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;out&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="n"&gt;frame&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="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;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;out&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="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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Drawing the captions into the frame means they're burned in, so they show on any platform with no subtitle file. After encoding, you mux video and audio into an MP4 and hand it to the user as a download. Speed now depends on the user's CPU and GPU rather than a server queue, which is a real trade-off: a fast laptop exports quickly, an old one doesn't.&lt;/p&gt;

&lt;p&gt;a nice side effect is that exporting costs the service nothing, so there's no reason to meter it. Users can change a caption and export again as often as they like.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Browser Clipper says about its own setup
&lt;/h2&gt;

&lt;p&gt;Here is what the site states, without guessing at its internals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The video file stays on your computer and is never uploaded. The privacy page says the service never receives the video file or the finished clips.&lt;/li&gt;
&lt;li&gt;Cutting, framing, captions and export run in the browser.&lt;/li&gt;
&lt;li&gt;The browser extracts the audio and sends it, and an AI service turns the speech into words with timestamps.&lt;/li&gt;
&lt;li&gt;The browser sends a few still frames so an AI service can choose who to keep in the vertical frame.&lt;/li&gt;
&lt;li&gt;The audio and frames are not used to train AI models.&lt;/li&gt;
&lt;li&gt;The tool saves a copy of each project in your browser so edits survive a lost connection. Opening a project on another computer needs the original video files.&lt;/li&gt;
&lt;li&gt;Speed depends on your computer. It needs a recent Chrome or Edge on a desktop and doesn't run on phones or tablets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the output side, each clip exports as a 1080 by 1920 MP4 with captions burned in. You choose 1 to 30 clips per video and a length (under 30 seconds, 30 to 60 seconds or 60 to 90 seconds), plus a layout per clip: follow one person, two people, game and camera or full frame. Speech can be English or Spanish.&lt;/p&gt;

&lt;p&gt;Its pricing lines up with that split. One credit covers one minute of imported video and exports use no credits. Plans start at $5.90 a month for 600 credits and a new account gets 20 trial credits with watermarked exports. The &lt;a href="https://browserclipper.com/privacy/" rel="noopener noreferrer"&gt;privacy policy&lt;/a&gt; has a table of exactly what is sent and how long it's kept.&lt;/p&gt;

&lt;h2&gt;
  
  
  When this design makes sense
&lt;/h2&gt;

&lt;p&gt;If you're building something similar, the in-browser approach fits when files are large, when users care where their recordings go and when export is a step people repeat. It fits less well when you need mobile support, link imports or server-side features like scheduled posting, since all of those want the file on a server anyway.&lt;/p&gt;

&lt;p&gt;The core idea is simple: move the small data, keep the big file.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>video</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
