ai_video_editor 1.0.0 copy "ai_video_editor: ^1.0.0" to clipboard
ai_video_editor: ^1.0.0 copied to clipboard

CapCut-style video editor for Flutter with free on-device AI: voice AI Edit, AI Shorts, captions, noise cancellation, cut-out, transitions and FFmpeg export.

ai_video_editor #

A CapCut-style video editor for Flutter, built for TikTok, Instagram Reels and YouTube Shorts. Edit on a multi-track timeline, or just say what you want and let AI Edit cut, style, caption and score the video.

All the AI runs on the phone, for free: no account, no API key, no paid service. Rendering and export go through FFmpeg.

Features #

AI Edit: edit by voice or text #

  • "Make it a trending reel, keep only the talking and add captions"
  • "Make a 30 second short of the best parts" (AI Shorts)
  • "Remove the filters, add vintage at the start and make the music quieter"
  • Or one tap on a style: Viral Reel, Talking Vlog, Cinematic, Hype, Aesthetic.

AI Edit then writes a post caption with hashtags, ready to copy or share.

Free on-device AI #

Feature How it works
Smart AI Qwen 2.5 0.5B (Apache 2.0) runs on the phone's CPU via MediaPipe. It downloads once (~550 MB, optional) and understands requests in any language. Without it, built-in keyword rules do the same jobs.
AI Shorts Transcribes the speech and keeps only the strongest moments
Keep only the talking Cuts silent pauses automatically (jump cuts)
Auto captions Whisper speech-to-text, 12 languages, model downloaded once (~40 MB)
Noise cancellation Reduce noise / Studio voice, applied inside the render so it stays in sync
Person cut-out / green screen ML Kit selfie segmentation; chroma key on the measured backdrop colour
Auto reframe, beat sync Face detection keeps the subject centred; cuts on the music's beat
AI music, voiceover Offline music synthesis; the phone's text-to-speech

A full editor #

  • Timeline with a centre playhead, pinch zoom, filmstrips, waveforms and lanes for audio, text, stickers and effects.
  • Trim (with live frame preview), cut out, split, duplicate, speed 0.25x–4x, volume.
  • Crop by pinching the video, fit / fill, ratios 9:16, 16:9, 1:1, 4:5.
  • 10 transitions: Fade, Flash, four slides, Zoom, Spin, Glitch, plus a "Mix" that varies them per cut.
  • 10 colour looks, timed effects, styled text, emoji and image stickers, music tracks.
  • Lip-sync kept across any number of cuts.
  • An instant live preview plus a fast incremental render.
  • Export up to 4K / 60 fps with Android hardware encoding; save to the gallery or share.
  • Drafts, undo / redo (50 steps), black-and-white UI with blue for AI.

Installation #

dependencies:
  ai_video_editor: ^1.0.0

Android #

In android/app/build.gradle.kts, set minSdk = 26.

Add to AndroidManifest.xml:

<manifest ...>
  <!-- One-time model downloads (Whisper, Smart AI) -->
  <uses-permission android:name="android.permission.INTERNET"/>
  <!-- Spoken AI Edit requests -->
  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
  <!-- Saving to the gallery on Android 9 and older -->
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
      android:maxSdkVersion="29"/>

  <queries>
    <intent><action android:name="android.intent.action.TTS_SERVICE"/></intent>
    <intent><action android:name="android.speech.RecognitionService"/></intent>
  </queries>

  <application ...>
    <!-- Recommended: some MediaTek GPUs crash in Impeller when drawing video -->
    <meta-data android:name="io.flutter.embedding.android.EnableImpeller"
        android:value="false"/>
  </application>
</manifest>

iOS #

Add these keys to Info.plist: NSPhotoLibraryUsageDescription, NSPhotoLibraryAddUsageDescription, NSCameraUsageDescription, NSMicrophoneUsageDescription and NSSpeechRecognitionUsageDescription.

Usage #

Open the editor:

import 'package:ai_video_editor/ai_video_editor.dart';

Navigator.push(
  context,
  MaterialPageRoute(builder: (_) => const VideoEditorScreen()),
);

Keep your own controller, for example to read the project afterwards:

final controller = VideoEditorController();

Navigator.push(
  context,
  MaterialPageRoute(
    builder: (_) => VideoEditorScreen(existingController: controller),
  ),
);

// later
controller.dispose();

Other screens: ProjectsScreen (saved drafts), VideoEntryScreen, OpenCutEditorScreen and FinalResultPlayer.

Run an AI edit from code:

final plan = EditCommandParser.parse(
  'make it a trending reel, keep only the talking and add captions',
);
final report = await AutoEditor(controller).run(plan);
print(report.done);      // what was done
print(report.postText);  // caption + hashtags

In widget tests, create the controller with VideoEditorController(initializeAi: false), because ML Kit can't start there.

Platform support #

Platform Support
Android Full
iOS Full
Web, Windows, macOS, Linux UI only: FFmpeg, ML Kit, Whisper, speech and Smart AI need a phone

Notes #

  • App size: FFmpeg (full-gpl), ML Kit and MediaPipe add native libraries.
  • Downloads: Whisper (~40 MB) and Smart AI (~550 MB) download only when first used. Smart AI is optional.
  • Licences: this package is MIT. FFmpeg is used through ffmpeg_kit_flutter_new's GPL build; check that this suits your app before you ship it.

Example #

The example/ folder has a complete app.

License #

MIT. See LICENSE.