<?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: sxndhu</title>
    <description>The latest articles on DEV Community by sxndhu (@sandhu_711).</description>
    <link>https://dev.to/sandhu_711</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%2F4264346%2F89e1fa2f-48aa-458a-8e31-000e995b4195.png</url>
      <title>DEV Community: sxndhu</title>
      <link>https://dev.to/sandhu_711</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sandhu_711"/>
    <language>en</language>
    <item>
      <title>I Automated an Entire 9:16 AI Video Studio Into a Telegram Bot (Python + Gemini 2.5 + FFmpeg)</title>
      <dc:creator>sxndhu</dc:creator>
      <pubDate>Wed, 25 Nov 2026 09:26:15 +0000</pubDate>
      <link>https://dev.to/sandhu_711/i-automated-an-entire-916-ai-video-studio-into-a-telegram-bot-python-gemini-25-ffmpeg-5549</link>
      <guid>https://dev.to/sandhu_711/i-automated-an-entire-916-ai-video-studio-into-a-telegram-bot-python-gemini-25-ffmpeg-5549</guid>
      <description>&lt;p&gt;Most AI video tools charge monthly subscriptions, cap your exports, and still leave you doing the boring glue work: checking if a topic is repetitive, trimming awkward audio cutoffs, stitching an outro, writing YouTube tags, and scheduling.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;APEX CINEGEN PRO&lt;/strong&gt; — a self-hosted Python pipeline that turns a &lt;strong&gt;single tap in Telegram&lt;/strong&gt; into a mastered, scheduled &lt;strong&gt;YouTube Short&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the Pipeline Does End-to-End
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Story Ideation:&lt;/strong&gt; Brainstorms 10 dialogue-dense concepts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 2.5 Flash Virality Audit:&lt;/strong&gt; Scores each concept for &lt;strong&gt;2-Clip (20s)&lt;/strong&gt; or &lt;strong&gt;3-Clip (30s)&lt;/strong&gt; pacing, checks &lt;code&gt;used_topics.json&lt;/code&gt; to prevent repeats, and auto-rerolls weak ideas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Google Flow Calibration (Playwright CDP):&lt;/strong&gt; Disables Flow Agent on fresh projects, falls back to &lt;code&gt;Omni 1.1 Flash&lt;/code&gt; / &lt;code&gt;.duration-slider&lt;/code&gt; if &lt;code&gt;10s&lt;/code&gt; isn't exposed, locks &lt;code&gt;Video · 720p · 10s · 9:16 · x1&lt;/code&gt;, and captures the MP4 via &lt;code&gt;expect_download()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FFmpeg Mastering:&lt;/strong&gt; Stitches your custom outro with a smooth &lt;code&gt;0.3s&lt;/code&gt; &lt;code&gt;afade&lt;/code&gt; audio transition and extracts cover frames.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram Mobile Studio + YouTube Data API v3:&lt;/strong&gt; Delivers the playable MP4 straight to your phone with inline buttons (&lt;code&gt;Approve &amp;amp; Schedule (9 PM IST)&lt;/code&gt;, &lt;code&gt;View Tags &amp;amp; Info&lt;/code&gt;, &lt;code&gt;Publish Instantly&lt;/code&gt;) and packs up to 24+ tags inside YouTube's &lt;code&gt;480&lt;/code&gt;-character quote-aware limit.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3 Engineering Lessons That Made It Reliable
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The 1.5s Breathing Buffer:&lt;/strong&gt; AI video clips love cutting off the last word at &lt;code&gt;10.0s&lt;/code&gt;. Enforcing &lt;code&gt;22–26&lt;/code&gt; words/clip plus a &lt;code&gt;1.5s&lt;/code&gt; silent visual tail solved it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI Fallback Calibration:&lt;/strong&gt; Web UIs change selectors and model defaults. Having an automatic fallback from &lt;code&gt;Omni 1.2 Flash&lt;/code&gt; to &lt;code&gt;Omni 1.1 Flash&lt;/code&gt; + slider control kept batch runs (&lt;code&gt;2x&lt;/code&gt;–&lt;code&gt;10x&lt;/code&gt;) from stalling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quote-Aware Tag Packing:&lt;/strong&gt; Naively joining tags blows past YouTube's &lt;code&gt;500&lt;/code&gt;-char limit once multi-word tags get quoted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Check Out the Repo
&lt;/h3&gt;

&lt;p&gt;Full architecture diagram, live demo MP4s, and quickstart are on GitHub:&lt;br&gt;
&lt;a href="https://github.com/mehaksandhudev/apex-cinegen-pro" rel="noopener noreferrer"&gt;https://github.com/mehaksandhudev/apex-cinegen-pro&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're building multi-step AI pipelines or Playwright CDP automations, I'd love your feedback in the comments!&lt;/p&gt;

</description>
      <category>showdev</category>
    </item>
  </channel>
</rss>
