<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>video-editing on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/video-editing/</link>
    <description>Recent content in video-editing on S Anand</description>
    <generator>Hugo -- 0.165.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 14 Jun 2026 08:27:16 +0530</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/video-editing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Editing Workshop Videos</title>
      <link>https://www.s-anand.net/blog/editing-workshop-videos/</link>
      <pubDate>Sun, 14 Jun 2026 08:27:16 +0530</pubDate>
      <guid>https://www.s-anand.net/blog/editing-workshop-videos/</guid>
      <description>&lt;p&gt;I sometimes use &lt;a href=&#34;https://meet.google.com/&#34;&gt;Google Meet&lt;/a&gt;, &lt;a href=&#34;https://teams.microsoft.com/&#34;&gt;Teams&lt;/a&gt;, &lt;a href=&#34;https://www.zoom.com/&#34;&gt;Zoom&lt;/a&gt;, etc. to record workshops and talks. These record the entire session, including &lt;em&gt;before&lt;/em&gt; and &lt;em&gt;after&lt;/em&gt; the actual talk, and save it as large MP4 files.&lt;/p&gt;
&lt;p&gt;I use &lt;code&gt;ffmpeg&lt;/code&gt; to trim the video to just the talk, and then compress it for sharing. I&amp;rsquo;m sharing the options that work for me, discovered by trial-and-error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To trim it&lt;/strong&gt;, I use the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffmpeg -ss 00:10:00 -to 02:10:00 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -i &lt;span class=&#34;s2&#34;&gt;&amp;#34;original.mp4&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -map &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -c copy &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -avoid_negative_ts make_zero &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -movflags +faststart &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  new.mp4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Arguments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-ss 00:10:00&lt;/code&gt;: Start reading from 10:00 into the source file. Placing -ss before -i makes this fast because ffmpeg seeks instead of decoding from the start.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-to 02:10:00&lt;/code&gt;: Stop at 02:10:00 in the source timeline. So this keeps roughly the section from 00:10:00 to 02:10:00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-map 0&lt;/code&gt;: Keep all streams from the input: video, audio, subtitles, metadata streams, etc. Use &lt;code&gt;-map 0:v:0 -map 0:a:0&lt;/code&gt; for just the first video and audio streams.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-c copy&lt;/code&gt;: Do not re-encode. Just copy the existing encoded streams. This is very fast and preserves original quality, but cuts only cleanly near keyframes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-avoid_negative_ts make_zero&lt;/code&gt;: Rewrite timestamps so the output starts cleanly near zero. This helps avoid weird negative timestamps and duration/reporting issues in some players.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-movflags +faststart&lt;/code&gt;: Move MP4 metadata to the beginning of the file. This helps playback start faster in browsers and streaming contexts.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;To compress it&lt;/strong&gt; I use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffmpeg -i &lt;span class=&#34;s1&#34;&gt;&amp;#39;trimmed.mp4&amp;#39;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -map 0:v:0 -map 0:a:0 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -c:v libvpx-vp9 &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -b:v &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -crf &lt;span class=&#34;m&#34;&gt;42&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -deadline realtime &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -cpu-used &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -row-mt &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -tile-columns &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -frame-parallel &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -threads &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -pix_fmt yuv420p &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -vf &lt;span class=&#34;s2&#34;&gt;&amp;#34;fps=16&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -c:a libopus &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -b:a 32k &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -ac &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -ar &lt;span class=&#34;m&#34;&gt;48000&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -af &lt;span class=&#34;s2&#34;&gt;&amp;#34;highpass=f=80,lowpass=f=12000&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;compressed.webm&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Arguments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-map 0:v:0 -map 0:a:0&lt;/code&gt;: Use the first video stream and first audio stream from the input&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-c:v libvpx-vp9&lt;/code&gt;: Compress video with VP9 codec&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-b:v 0&lt;/code&gt;: Use constant-quality mode instead of targeting a fixed bitrate&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-crf 42&lt;/code&gt;: When testing on samples, CRF 42 was small enough and clear enough for me&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-deadline realtime&lt;/code&gt;: &lt;code&gt;-deadline good&lt;/code&gt; is too slow for me though that&amp;rsquo;s better for production&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-cpu-used 8&lt;/code&gt;: 8 is the maximum allowed for VP9 for now&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-row-mt 1&lt;/code&gt;: Enable row-based multithreading for faster VP9 encoding&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-tile-columns 2&lt;/code&gt;: Split each frame into tiles so multiple threads can encode in parallel&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-frame-parallel 1&lt;/code&gt;: Allow frames to be decoded in parallel; useful for VP9/WebM playback&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-threads 8&lt;/code&gt;: Use up to 8 CPU threads during encoding&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-pix_fmt yuv420p&lt;/code&gt;: Use the most compatible pixel format for browsers and video players&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-vf &amp;quot;fps=16&amp;quot;&lt;/code&gt;: Reduce frame rate to 16 fps to shrink file size; good enough for slides/talk videos&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-c:a libopus&lt;/code&gt;: Compress audio with Opus, the standard audio codec for WebM&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-b:a 32k&lt;/code&gt;: Use low audio bitrate; enough for speech&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-ac 1&lt;/code&gt;: Convert audio to mono; good for voice and halves stereo audio data&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-ar 48000&lt;/code&gt;: Use 48 kHz, the standard sample rate for Opus&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-af &amp;quot;highpass=f=80,lowpass=f=12000&amp;quot;&lt;/code&gt;: Remove very low rumble and very high noise; keeps speech frequencies&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I deploy these on CloudFlare R2 on a custom domain: &lt;a href=&#34;https://media.s-anand.net/&#34;&gt;media.s-anand.net&lt;/a&gt;. &lt;a href=&#34;https://developers.cloudflare.com/r2/pricing/&#34;&gt;R2 costs&lt;/a&gt; 1.5c / GB-month. Storing 10 years&amp;rsquo; worth of ~500 talks of ~0.5 GB each is under $4 / month - quite affordable. (If it increases, I can shift. Statis files are easy to move.)&lt;/p&gt;
&lt;p&gt;I serve them via a &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; tag. Here is an &lt;a href=&#34;https://media.s-anand.net/2026-05-23-ai-unboxed-context-engineering.webm&#34;&gt;example video&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;video&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;preload&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;1920&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;1080&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;controls&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;max-width: 100%; height: auto;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;source&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;https://media.s-anand.net/2026-05-23-ai-unboxed-context-engineering.webm&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;video/webm; codecs=&amp;amp;quot;vp9, opus&amp;amp;quot;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;video&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;video preload=&#34;metadata&#34; width=&#34;1920&#34; height=&#34;1080&#34; controls style=&#34;max-width: 100%; height: auto;&#34;&gt;
  &lt;source src=&#34;https://media.s-anand.net/2026-05-23-ai-unboxed-context-engineering.webm&#34; type=&#34;video/webm; codecs=&amp;quot;vp9, opus&amp;quot;&#34;&gt;
&lt;/video&gt;
</description>
    </item>
    <item>
      <title>Brilliant video editing</title>
      <link>https://www.s-anand.net/blog/brilliant-video-editing/</link>
      <pubDate>Wed, 29 Nov 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/brilliant-video-editing/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a &amp;ldquo;music video&amp;rdquo; with &lt;a href=&#34;http://www.feedbite.com/html/?406/1/2121/14&#34;&gt;brilliant video editing&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Google Video Downloader</title>
      <link>https://www.s-anand.net/blog/google-video-downloader/</link>
      <pubDate>Sun, 25 Dec 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/google-video-downloader/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://dev2.traxio.net/projects/googlevideo/&#34;&gt;Google Video Downloader&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Madhu&lt;/strong&gt; &lt;em&gt;5 Jan 2006 8:40 am&lt;/em&gt;:
Have you tried &lt;a href=&#34;https://www.youtube.com&#34;&gt;www.youtube.com&lt;/a&gt; Google will probably take it over!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;5 Jan 2006 6:00 pm&lt;/em&gt;:
I use it. But why would Google take over? They already have a pretty good service&amp;hellip;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Madhu&lt;/strong&gt; &lt;em&gt;6 Jan 2006 12:11 pm&lt;/em&gt;:
Why not? MSN will take over otherwise.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;shekar&lt;/strong&gt; &lt;em&gt;14 Jan 2006 11:06 pm&lt;/em&gt;:
s anand, I saw your Swindon vidoes. They are edited very well. What software did you use? Especially the blue first screen.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;14 Jan 2006 11:31 pm&lt;/em&gt;:
Microsoft Movie Maker. It came bundled with Windows XP on my office laptop.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Download Squad</title>
      <link>https://www.s-anand.net/blog/download-squad/</link>
      <pubDate>Tue, 23 Aug 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/download-squad/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.downloadsquad.com/2005/08/16/how-to-create-your-own-ilm-for-almost-nothing/&#34;&gt;Download Squad&lt;/a&gt;. A bunch of free (or cheap) software that will give you many of the tools used by special effects houses.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
