DEV Community

Cover image for SwiftCut: AI-Powered Video Silence Remover Built with GitHub Copilot CLI
Nishikanta Ray
Nishikanta Ray

Posted on

SwiftCut: AI-Powered Video Silence Remover Built with GitHub Copilot CLI

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

SwiftCut is a local-first desktop application that automates the "Rough Cut" phase of video editing. It uses AI-powered audio analysis to instantly detect and remove silent segments from videos β€” no cloud uploads, no subscriptions, complete privacy.

The Problem I Solved

As a content creator, I spent hours manually cutting out silent pauses from my podcast recordings, tutorial videos, and vlogs. The workflow was:

  1. Import video into heavy editing software
  2. Scrub through timeline looking for silence
  3. Manually mark and delete each silent segment
  4. Repeat 50+ times per video 😩

SwiftCut automates this entire process in seconds.

Key Features

🎯 Smart Silence Detection β€” FFmpeg-powered audio analysis with configurable thresholds

⚑ Instant Results β€” Process a 10-minute video in under 5 seconds

πŸ”’ 100% Local & Private β€” Your videos never leave your machine

🎚️ Content Presets β€” Optimized settings for Podcasts, Tutorials, Vlogs, and Interviews

πŸ€– AI Natural Language Commands β€” Tell it what to do: "Remove all silences" or "Make a 30-second clip"

🎬 Reel Cutter β€” Split long videos into Instagram Reels, TikTok, or YouTube Shorts

πŸŽ™οΈ Voice Commands β€” Speak your edits using Web Speech API

↩️ Full Undo/Redo β€” Never lose your work

Tech Stack

Layer Technology
Framework Tauri v2 (Rust + WebView)
Frontend React 19 + TypeScript
Styling Tailwind CSS v4
State Zustand
Video Processing FFmpeg
AI Multi-provider (Local, Ollama, OpenAI, Copilot SDK)

Demo

πŸŽ₯ Video Walkthrough

▢️ Watch SwiftCut in Action

Screenshots

Landing Page β€” Clean, focused interface

Silence Detection β€” Visual timeline with detected segments

AI Commands β€” Natural language video editing

Reel Cutter β€” Split videos for social media

Try It Yourself

# Clone the repo
git clone https://github.com/yourusername/swiftcut.git
cd swiftcut

# Install dependencies
npm install

# Run in development
npm run tauri dev

# Build for production
npm run tauri:build
Enter fullscreen mode Exit fullscreen mode

Requirements: Node.js 22+, Rust 1.93+, FFmpeg


My Experience with GitHub Copilot CLI

How Copilot CLI Transformed My Development

Building SwiftCut would have taken weeks without GitHub Copilot CLI. Here's how I used it:

1. FFmpeg Command Generation

FFmpeg has notoriously complex syntax. Instead of Googling for hours, I asked Copilot:

gh copilot suggest "ffmpeg command to detect silence below -30dB lasting more than 0.5 seconds"
Enter fullscreen mode Exit fullscreen mode

Result:

ffmpeg -i input.mp4 -af "silencedetect=noise=-30dB:d=0.5" -f null -
Enter fullscreen mode Exit fullscreen mode

This became the core of my silence detection algorithm.

2. Rust Backend Development

I'm primarily a TypeScript developer. Writing Rust for Tauri was daunting, but Copilot CLI helped:

gh copilot explain "how to parse FFmpeg stderr output in Rust and extract timestamps"
Enter fullscreen mode Exit fullscreen mode

It gave me a complete regex pattern and parsing logic that I adapted for my lib.rs.

3. Complex Filter Chains

Building the export filter was tricky. I needed to keep non-silent segments and remove gaps:

gh copilot suggest "ffmpeg select filter to keep multiple time ranges and close gaps"
Enter fullscreen mode Exit fullscreen mode

Result:

-vf "select='between(t,0,5)+between(t,8,20)',setpts=N/FRAME_RATE/TB"
-af "aselect='between(t,0,5)+between(t,8,20)',asetpts=N/SR/TB"
Enter fullscreen mode Exit fullscreen mode

4. AI Planner System Prompt

I used Copilot to help design the system prompt for my AI planner:

gh copilot suggest "system prompt for an AI that converts natural language to FFmpeg commands"
Enter fullscreen mode Exit fullscreen mode

This helped me structure the SWIFTCUT_SYSTEM_PROMPT that powers the natural language interface.

5. Cross-Platform Build Configuration

Setting up GitHub Actions for multi-platform builds:

gh copilot suggest "github actions workflow to build tauri app for mac windows and linux"
Enter fullscreen mode Exit fullscreen mode

Got a working CI/CD pipeline in minutes instead of hours.

Impact on Development Experience

Metric Without Copilot CLI With Copilot CLI
FFmpeg learning curve 2-3 days 2 hours
Rust backend 1 week 2 days
Total development time ~3 weeks ~5 days
Stack Overflow visits 100+ ~10

The "Aha!" Moment

The breakthrough came when I realized I could use Copilot CLI as a planning agent within the app itself. The system prompt I developed with Copilot's help now powers SwiftCut's AI command interface:

User: "Remove all silences longer than 1 second"
     ↓
AI Planner (Copilot-inspired prompt)
     ↓
FFmpeg: select='between(t,0,5)+between(t,8,20)...'
     ↓
Exported video with silences removed!
Enter fullscreen mode Exit fullscreen mode

What I'd Tell Other Developers

  1. Don't just ask for code β€” Ask Copilot CLI to explain concepts first
  2. Use suggest for commands β€” Especially for complex CLI tools like FFmpeg, Docker, Git
  3. Iterate with explain β€” If the first suggestion isn't perfect, ask it to explain and refine
  4. Build your own prompts β€” The system prompts Copilot uses are great templates for your AI features

Technical Deep Dive

How Silence Detection Works

ORIGINAL VIDEO (10 minutes)
β–“β–“β–“β–“β–“β–‘β–‘β–‘β–“β–“β–“β–“β–“β–“β–“β–‘β–‘β–“β–“β–“β–“β–‘β–‘β–‘β–‘β–“β–“β–“β–“β–“β–“β–“β–“β–‘β–‘β–“β–“β–“β–“β–“β–“β–‘β–‘β–‘β–“β–“β–“β–“β–“
     β–²       β–²       β–²           β–²         β–²
  silence silence silence    silence   silence

                    ↓ FFmpeg silencedetect

EXPORTED VIDEO (7 minutes)  
β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“
(All silence removed β€” 30% shorter!)
Enter fullscreen mode Exit fullscreen mode

AI Provider Architecture

SwiftCut supports multiple AI backends:

type AIProvider = 'local' | 'copilot' | 'ollama' | 'openai';

// Switch providers in settings
setAIProvider({ 
  provider: 'ollama', 
  baseUrl: 'http://localhost:11434', 
  modelName: 'llama3.2' 
});
Enter fullscreen mode Exit fullscreen mode
Provider Use Case
Local Offline, rule-based processing
Ollama Privacy-focused local LLM
OpenAI Most capable, requires API key
Copilot SDK Coming soon!

What's Next

  • [ ] Waveform visualization in timeline
  • [ ] Transcript-based editing ("Find where I say 'demo'")
  • [ ] Batch processing multiple videos
  • [ ] Plugin system for custom filters
  • [ ] Mobile companion app

Links


Acknowledgments

Built with ❀️ using:


What editing task takes you the longest? Let me know in the comments β€” maybe SwiftCut can help!

Top comments (0)