<?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: Arshal Aromal</title>
    <description>The latest articles on DEV Community by Arshal Aromal (@arshalaromal).</description>
    <link>https://dev.to/arshalaromal</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%2F3962906%2Fe6defb1b-130d-459b-b411-9060fa2ee7f0.jpeg</url>
      <title>DEV Community: Arshal Aromal</title>
      <link>https://dev.to/arshalaromal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arshalaromal"/>
    <language>en</language>
    <item>
      <title>How I optimized a Python AI gesture engine to run on a 12-year-old laptop</title>
      <dc:creator>Arshal Aromal</dc:creator>
      <pubDate>Tue, 02 Jun 2026 09:15:09 +0000</pubDate>
      <link>https://dev.to/arshalaromal/how-i-optimized-a-python-ai-gesture-engine-to-run-on-a-12-year-old-laptop-4p72</link>
      <guid>https://dev.to/arshalaromal/how-i-optimized-a-python-ai-gesture-engine-to-run-on-a-12-year-old-laptop-4p72</guid>
      <description>&lt;p&gt;Most hand-gesture recognition projects look great in short video demos but fail as everyday tools. After analyzing why, the issue became clear: almost all of them try to replace the mouse and keyboard. Holding your arm in the air for minutes just to click a button is exhausting. A mouse is simply more efficient.&lt;/p&gt;

&lt;p&gt;When I started building GestCtrl, I chose a different approach. It is designed strictly as a frictionless add-on, not a replacement. The goal was simple: provide quick, touchless shortcuts for specific moments—like pausing a video or adjusting volume when your hands are messy while eating at your desk, or triggering automated macros without moving your hands from home row.&lt;/p&gt;

&lt;p&gt;The real challenge wasn't the idea, though. It was the hardware constraints. I build my projects on a 12-year-old laptop running an older i5 processor and 8GB of RAM. If the app bloated the CPU or lagged, it was useless.&lt;/p&gt;

&lt;p&gt;Here is how I optimized a mixed-language stack to run real-time spatial AI tracking with near-zero resource impact.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Stack: Flutter and Python
&lt;/h2&gt;

&lt;p&gt;I ended up using a somewhat unusual combination: Dart/Flutter for the desktop user interface and Python with Google MediaPipe for the computer vision engine.&lt;/p&gt;

&lt;p&gt;The immediate bottleneck was Inter-Process Communication (IPC) and the inherent overhead of running a raw Python script alongside a compiled UI wrapper. To fix the performance lag and resource drain, I made a few critical architectural choices:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Native Compilation via Nuitka
&lt;/h3&gt;

&lt;p&gt;Instead of shipping a bundled Python interpreter or relying on slow runtime execution, I compiled the entire Python gesture engine into native binaries using Nuitka. This drastically reduced startup time and minimized the background memory footprint, bringing IPC communication down to near-instant speeds.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Stripping the Model Down
&lt;/h3&gt;

&lt;p&gt;Running high-fidelity spatial tracking will melt an older CPU if left uncapped. I configured the engine to run a tightly optimized 7MB MediaPipe model and strictly locked the processing rate to 15 FPS. At this rate, the tracking remains perfectly real-time for human gestures, but the CPU and RAM draw dropped to almost nothing.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Implementing a Smart Auto-Sleep State Machine
&lt;/h3&gt;

&lt;p&gt;A camera feed does not need to process frames if nothing is happening. I built an automated sleep feature into the core loop. If the engine detects that no hands are in the camera frame for a set duration, the detection engine enters a low-power standby mode. It can be instantly re-awakened with global system hotkeys (&lt;code&gt;Ctrl + Alt + W&lt;/code&gt; to wake, &lt;code&gt;Ctrl + Alt + S&lt;/code&gt; to force sleep).&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Zero Telemetry Architecture
&lt;/h3&gt;

&lt;p&gt;Because everything processing-heavy is optimized to run locally, the app requires absolutely no internet connection. There are no user accounts, no background data collection, and your webcam feed never records, stores, or transmits a single byte of data. It is 100% offline.&lt;/p&gt;




&lt;h2&gt;
  
  
  From Script to Store
&lt;/h2&gt;

&lt;p&gt;After resolving the optimization hurdles, I packaged the project into two versions for the Microsoft Store.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GestCtrl (Free Tier):&lt;/strong&gt; Provides 3 fully mappable gestures to control media playback (play, pause, next, previous, volume) and simulate basic global hotkeys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GestCtrl Pro:&lt;/strong&gt; Extends the engine to 7 gestures (the maximum practical limit before memory recall becomes a burden for the user) and introduces precise tuning tools: adjustable AI confidence levels and gesture activation cooldown timers to prevent repeated or accidental triggers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For developers and automation power users, the Pro version adds a &lt;strong&gt;Run File&lt;/strong&gt; option. This allows you to map a specific hand gesture directly to a script—meaning you can execute PowerShell, Python, or Batch workflows with a quick hand movement.&lt;/p&gt;

&lt;p&gt;The app is officially live. If you want to check out the optimization or need a clean, local macro trigger, you can grab the free version or take advantage of the launch sale for the Pro tier.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GestCtrl (Free Version):&lt;/strong&gt; &lt;a href="https://apps.microsoft.com/store/detail/9P14FMQ5J4Z7?cid=DevShareMCLPCS" rel="noopener noreferrer"&gt;Download the core app on the Microsoft Store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GestCtrl Pro (50% OFF Launch Sale):&lt;/strong&gt; &lt;a href="https://apps.microsoft.com/store/detail/9PFB7ZH7F4BW?cid=DevShareMCLPCS" rel="noopener noreferrer"&gt;Get the advanced scripting version on the Microsoft Store&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would love to hear feedback on the performance, especially from anyone running older or lower-spec Windows machines.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>performance</category>
      <category>python</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I got tired of Googling FFmpeg flags, so I built a universal CLI converter in Rust</title>
      <dc:creator>Arshal Aromal</dc:creator>
      <pubDate>Mon, 01 Jun 2026 16:38:23 +0000</pubDate>
      <link>https://dev.to/arshalaromal/i-got-tired-of-googling-ffmpeg-flags-so-i-built-a-universal-cli-converter-in-rust-45l9</link>
      <guid>https://dev.to/arshalaromal/i-got-tired-of-googling-ffmpeg-flags-so-i-built-a-universal-cli-converter-in-rust-45l9</guid>
      <description>&lt;p&gt;Hey everyone! This is my first ever post on dev.to, and I wanted to share a tool I built purely out of frustration with my own terminal workflow.&lt;/p&gt;

&lt;p&gt;If you are anything like me, you probably process a lot of media and documents locally. You also probably refuse to use slow, bloated desktop GUIs, and you definitely don't want to upload sensitive files to random cloud converters just to change a format.&lt;/p&gt;

&lt;p&gt;So, we turn to the CLI titans: FFmpeg, ImageMagick, and Pandoc. They are incredibly powerful, but they share one massive flaw: &lt;strong&gt;a massive cognitive tax.&lt;/strong&gt; Memorizing hyper-specific, multi-line CLI flags for three separate monolithic tools is a nightmare.&lt;/p&gt;

&lt;p&gt;To solve this friction, I built &lt;strong&gt;MCVT (Multi-format ConVerTer)&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Let's say you just want to convert a video into a high-quality, dithered GIF. If you want it to actually look good, you can't just change the extension. You usually end up on StackOverflow, copying and pasting a massive filter graph that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffmpeg &lt;span class="nt"&gt;-i&lt;/span&gt; input.mp4 &lt;span class="nt"&gt;-filter_complex&lt;/span&gt; &lt;span class="s2"&gt;"[0:v] fps=15,scale=w=640:h=-1,split [a][b];[a] palettegen [p];[b][p] paletteuse"&lt;/span&gt; output.gif

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or maybe you want to encode an &lt;code&gt;.avi&lt;/code&gt; to an &lt;code&gt;.mp4&lt;/code&gt; that won't crash hardware decoders (requiring even-pixel dimensions):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ffmpeg &lt;span class="nt"&gt;-i&lt;/span&gt; input.avi &lt;span class="nt"&gt;-c&lt;/span&gt;:v libx264 &lt;span class="nt"&gt;-preset&lt;/span&gt; medium &lt;span class="nt"&gt;-crf&lt;/span&gt; 16 &lt;span class="nt"&gt;-pix_fmt&lt;/span&gt; yuv420p &lt;span class="nt"&gt;-vf&lt;/span&gt; &lt;span class="s2"&gt;"bwdif=deint=interlaced,scale=trunc(iw/2)*2:trunc(ih/2)*2"&lt;/span&gt; &lt;span class="nt"&gt;-movflags&lt;/span&gt; +faststart output.mp4

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is exhausting.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution: MCVT
&lt;/h2&gt;

&lt;p&gt;MCVT is a CLI tool written in Rust that acts as a universal abstraction layer over FFmpeg, ImageMagick, and Pandoc.&lt;/p&gt;

&lt;p&gt;Instead of dealing with three different syntaxes, MCVT lets you do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mcvt input.mp4 output.gif
mcvt input.avi output.mp4
mcvt document.docx document.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You give it an input and an output, and it figures out the rest. The exact same optimization templates (like the complex GIF palette generation) are built right in and executed under the hood.&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.amazonaws.com%2Fuploads%2Farticles%2Fa95yd105m6prs4pw4iai.gif" 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.amazonaws.com%2Fuploads%2Farticles%2Fa95yd105m6prs4pw4iai.gif" alt="MCVT Demo showing file conversion in action" width="600" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this isn't "just another wrapper"
&lt;/h3&gt;

&lt;p&gt;I know what you're thinking. &lt;em&gt;"Oh great, another wrapper script that hides the useful flags."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I specifically engineered MCVT to avoid the classic wrapper traps. It doesn't just blindly pipe commands; it’s an actual routing engine with theoretically over 94,600 unique file conversion pathways.&lt;/p&gt;

&lt;p&gt;Here is what makes it a standalone utility rather than a dumb script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Magic-Byte Detection:&lt;/strong&gt; It doesn't just trust the file extension you type. The routing engine inspects raw file headers to determine the correct domain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Domain Routing:&lt;/strong&gt; It handles intra-domain swaps (video-to-video) and cross-domain routes (extracting video frames straight into document-ready images) seamlessly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe Interrupts:&lt;/strong&gt; Basic process cleanup is built-in. If you &lt;code&gt;Ctrl+C&lt;/code&gt; a batch job, MCVT ensures the leftover backend processes don't keep quietly chewing up your CPU in the background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recursive Directory Batching:&lt;/strong&gt; It natively handles converting entire nested folders without needing a messy &lt;code&gt;find ... -exec&lt;/code&gt; bash loop.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Escape Hatches (Retaining Control)
&lt;/h3&gt;

&lt;p&gt;Crucially, MCVT doesn't lock you into its default templates. As power users, we need access to the underlying binaries for edge cases.&lt;/p&gt;

&lt;p&gt;You can force paths, bypass the header probing, or inject raw backend flags whenever you need to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Don't probe the file, trust the extension&lt;/span&gt;
mcvt corrupted.jpg restored.png &lt;span class="nt"&gt;--no-guess&lt;/span&gt;

&lt;span class="c"&gt;# Inject raw FFmpeg arguments to limit threads during a batch job&lt;/span&gt;
mcvt ./in/ ./out/ &lt;span class="nt"&gt;--batch-ext&lt;/span&gt; mkv &lt;span class="nt"&gt;--ffmpeg-out&lt;/span&gt; &lt;span class="nt"&gt;-threads&lt;/span&gt; 1 &lt;span class="nt"&gt;-b&lt;/span&gt;:v 1M

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How to try it out
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; MCVT does not replace FFmpeg, ImageMagick, or Pandoc. It routes them. You still need them installed and available in your system's &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can grab the prebuilt binaries (Windows, macOS, Linux) directly from the &lt;a href="https://github.com/arshalaromal/mcvt" rel="noopener noreferrer"&gt;GitHub Releases&lt;/a&gt;, or you can build it from source if you have Rust installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/arshalaromal/mcvt.git
&lt;span class="nb"&gt;cd &lt;/span&gt;mcvt
cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's 100% local, fully open-source (GPL), and keeps your data entirely private.&lt;/p&gt;

&lt;p&gt;If you appreciate local-first dev tools or just want to clean up your terminal workflow, I would love for you to try it out. Let me know what you think in the comments, and if you find it useful, dropping a star on the repo goes a long way!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/arshalaromal/mcvt" rel="noopener noreferrer"&gt;arshalaromal/mcvt&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>rust</category>
      <category>showdev</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
