<?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>Forem: Farshid Rezaei</title>
    <description>The latest articles on Forem by Farshid Rezaei (@farshid_rezaei_9ab0a01897).</description>
    <link>https://forem.com/farshid_rezaei_9ab0a01897</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1806229%2Ff05f8bf6-04b6-42fd-9a9e-6e0c56d8d061.jpg</url>
      <title>Forem: Farshid Rezaei</title>
      <link>https://forem.com/farshid_rezaei_9ab0a01897</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/farshid_rezaei_9ab0a01897"/>
    <language>en</language>
    <item>
      <title>I Got Tired of Writing FFmpeg Commands, So I Built a Small Go Helper</title>
      <dc:creator>Farshid Rezaei</dc:creator>
      <pubDate>Wed, 24 Dec 2025 19:30:01 +0000</pubDate>
      <link>https://forem.com/farshid_rezaei_9ab0a01897/i-got-tired-of-writing-ffmpeg-commands-so-i-built-a-small-go-helper-ccm</link>
      <guid>https://forem.com/farshid_rezaei_9ab0a01897/i-got-tired-of-writing-ffmpeg-commands-so-i-built-a-small-go-helper-ccm</guid>
      <description>&lt;p&gt;If you’ve worked with FFmpeg beyond one-liners, you know how quickly things get messy.&lt;/p&gt;

&lt;p&gt;What starts as a reasonable command slowly turns into a fragile, unreadable blob — especially once adaptive bitrate outputs, multiple renditions, and different profiles enter the picture.&lt;/p&gt;

&lt;p&gt;While building a video pipeline in Go, I hit this wall hard. So instead of copy-pasting yet another FFmpeg command, I wrote a small helper library to bring some structure back.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;The goal wasn’t to hide FFmpeg or replace it.&lt;/p&gt;

&lt;p&gt;I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;explicit, readable command generation&lt;/li&gt;
&lt;li&gt;a way to define encoding ladders without magic&lt;/li&gt;
&lt;li&gt;something testable and maintainable in a Go codebase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a small, opinionated helper that still outputs plain FFmpeg commands — just assembled in a more predictable way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Helps With
&lt;/h2&gt;

&lt;p&gt;Right now, the focus is on ABR workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HLS and DASH outputs using CMAF&lt;/li&gt;
&lt;li&gt;basic ladder generation based on input resolution&lt;/li&gt;
&lt;li&gt;bitrate caps and trimming redundant renditions&lt;/li&gt;
&lt;li&gt;different presets for VOD vs live use cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s intentionally narrow, but already useful in real projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It’s Not
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Not a wrapper that hides FFmpeg&lt;/li&gt;
&lt;li&gt;Not a “perfect ladder” generator&lt;/li&gt;
&lt;li&gt;Not a one-size-fits-all solution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If shell scripts work for you, that’s totally fine. This just fits better with how I like to structure Go services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;p&gt;The project is open source and here if you want to take a look:&lt;br&gt;
&lt;a href="https://github.com/farshidrezaei/mosaic" rel="noopener noreferrer"&gt;https://github.com/farshidrezaei/mosaic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’d love feedback — especially from people who’ve wrestled with FFmpeg pipelines or ABR setups before.&lt;/p&gt;

</description>
      <category>go</category>
      <category>ffmpeg</category>
      <category>videostreaming</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
