Flutter + ReelSDK $0.02 per compute minute, first $0.50 free
FFmpeg in Flutter after ffmpeg-kit
ffmpeg_kit_flutter is discontinued and its binaries are gone. ReelSDK runs ffmpeg from a Cloud Function for $0.02 per compute minute: a 6-second cut of a phone clip plus a poster frame comes back in about 8 seconds, with no native code in the app.
- Same ffmpeg arguments, run on a server
- Key in Secret Manager, not the app
- Trimmed clip and poster frame from one job
{"isDiscontinued":true,"replacedBy":null,"isUnlisted":false}
> Could not find com.arthenica:ffmpeg-kit-https:6.0-2.
BUILD FAILED in 6s
curl: (22) The requested URL returned error: 404
Sources: ffmpeg_kit_flutter on pub.dev, Saying goodbye to FFmpegKit
The same job as one call to ReelSDK
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"in.mp4": "https://api.reelsdk.com/f/lib/demo/clip.mp4"
},
"args": [
"-ss", "2", "-i", "in.mp4", "-t", "6", "-vf", "scale=-2:1280", "-c:v",
"libx264", "-crf", "24", "-c:a", "aac", "clip.mp4", "-frames:v", "1",
"-q:v", "3", "poster.jpg"
],
"outputs": ["clip.mp4", "poster.jpg"]
}'Why ffmpeg breaks here
The package is discontinued, the fork is GPL and heavy
ffmpeg_kit_flutter was discontinued after ffmpeg-kit was retired on January 6, 2025, and its prebuilt binaries were removed: versions before 6.0 on February 1, 2025, and 6.0 on April 1, 2025. Version 6.0.3 still points at them, so Gradle can't find ffmpeg-kit-https:6.0-2 and the iOS framework download answers 404. The maintained fork, ffmpeg_kit_flutter_new, builds again, but its Android side pulls ffmpeg-kit-full-gpl, which adds 44.1 MB of arm64 native libraries, and as a GPL build it comes with the GPL's terms. Since November 1, 2025, Google Play has also required 16 KB page support for apps targeting Android 15 and higher, so whatever ffmpeg you ship has to keep up. Every other way off ffmpeg-kit is in ReelSDK vs FFmpegKit.
With Firebase you can skip the native side. The app uploads the clip to Cloud Storage under the user's folder and calls a callable function with its path. The function, which reads the ReelSDK key from Secret Manager, makes a download URL with the Admin SDK and runs one ffmpeg job that writes both the trimmed clip and a poster frame. Those two links go back to the app, the key never does, and the function deletes the upload once the job is done.
Raw ffmpeg costs $0.02 per compute minute, billed by the second, and failed jobs are free. Output links last 7 days, so copy the files to Storage if you keep them. Pricing has the other job types. Here are a trimmed clip and its poster.
ffmpeg_kit_flutter next to ReelSDK
| Topic | ffmpeg-kit in the app | ReelSDK from a function |
|---|---|---|
| Package | ffmpeg_kit_flutter discontinued | POST /v1/ffmpeg with the same arguments |
| Android build | ffmpeg-kit-https:6.0-2 not found | No native code |
| iOS build | Framework download returns 404 | No pods to install |
| Maintained fork | GPL build, 44.1 MB of arm64 libraries | Nothing added to the app |
| Outputs | Whatever the phone can encode | Clip and poster from one job |
Flutter limits from ffmpeg_kit_flutter on pub.dev, checked November 2026.
Set it up
A callable function and a few lines of Dart
This uses Firebase Auth, Cloud Storage and Cloud Functions, since most Flutter apps already have them. Any backend that holds the key and checks the user works the same way; the React Native page shows one in Node.
Store the key in Secret Manager
The CLI asks for the value, and the function reads it through
defineSecret. Never put the key in Dart code, a--dart-defineor an asset, since all of those ship inside the app.terminal firebase functions:secrets:set REELSDK_KEY firebase deploy --only functions:trimClip,storageLet users write only their own clips
The rules allow uploads into
clips/<uid>/, video only, under 100 MiB, and no reads from the app.storage.rules rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /clips/{uid}/{file} { allow write: if request.auth != null && request.auth.uid == uid && request.resource.size < 100 * 1024 * 1024 && request.resource.contentType.matches('video/.*'); } } }Add the callable function
It checks the caller, only accepts a path in their own folder, and waits up to 60 s for the job.
functions/src/index.tsTry it import { initializeApp } from "firebase-admin/app"; import { getDownloadURL, getStorage } from "firebase-admin/storage"; import { defineSecret } from "firebase-functions/params"; import { HttpsError, onCall } from "firebase-functions/v2/https"; initializeApp(); const reelsdkKey = defineSecret("REELSDK_KEY"); const options = { secrets: [reelsdkKey], timeoutSeconds: 90 }; export const trimClip = onCall(options, async (request) => { if (!request.auth) throw new HttpsError("unauthenticated", "sign in first"); const path = String(request.data?.path ?? ""); if (!path.startsWith(`clips/${request.auth.uid}/`)) { throw new HttpsError("permission-denied", "not your clip"); } // ReelSDK fetches the upload through a Storage download URL, which never reaches the app const file = getStorage().bucket().file(path); const clipUrl = await getDownloadURL(file); const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", { method: "POST", headers: { Authorization: `Bearer ${reelsdkKey.value()}`, "Content-Type": "application/json", }, body: JSON.stringify({ inputs: { "in.mp4": clipUrl }, args: [ "-ss", "2", "-i", "in.mp4", "-t", "6", "-vf", "scale=-2:1280", "-c:v", "libx264", "-crf", "24", "-c:a", "aac", "clip.mp4", "-frames:v", "1", "-q:v", "3", "poster.jpg", ], outputs: ["clip.mp4", "poster.jpg"], }), }); const { job, error } = await res.json(); if (!res.ok) throw new HttpsError("internal", error?.message ?? `reelsdk ${res.status}`); // Once the job is done it has its own copy, so the upload can go if (job.status === "succeeded") await file.delete(); return { id: job.id, status: job.status, clip: job.outputs?.["clip.mp4"] ?? null, poster: job.outputs?.["poster.jpg"] ?? null, }; });Call it from Flutter
The app needs cloud_functions, firebase_auth, firebase_storage and image_picker. This code passes
flutter analyzewith their current versions.lib/trim_clip.dart import 'dart:io'; import 'package:cloud_functions/cloud_functions.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:image_picker/image_picker.dart'; // The app talks to Firebase only, the ReelSDK key lives in the function's secret Future<Map<String, dynamic>?> trimClip() async { final picked = await ImagePicker().pickVideo(source: ImageSource.gallery); final user = FirebaseAuth.instance.currentUser; if (picked == null || user == null) return null; final name = '${DateTime.now().millisecondsSinceEpoch}.mp4'; final ref = FirebaseStorage.instance.ref('clips/${user.uid}/$name'); await ref.putFile(File(picked.path), SettableMetadata(contentType: 'video/mp4')); final trim = FirebaseFunctions.instance.httpsCallable( 'trimClip', options: HttpsCallableOptions(timeout: const Duration(seconds: 90)), ); final result = await trim.call({'path': ref.fullPath}); return Map<String, dynamic>.from(result.data as Map); }
FAQ
Video on Flutter, answered
Is ffmpeg_kit_flutter still maintained?
No. It is marked discontinued on pub.dev, and the native binaries it downloads were removed in 2025, so new Android and iOS builds fail. ffmpeg-kit itself was retired on January 6, 2025.
What about ffmpeg_kit_flutter_new?
It's a maintained community fork and it builds. Its Android side pulls a full GPL ffmpeg build with 44.1 MB of arm64 native libraries, so check the GPL terms for your app and expect to keep the fork up to date yourself.
Why not call ReelSDK from Dart directly?
An API key inside a Flutter app can be pulled out of the binary by anyone who installs it. The app calls your function as a signed-in user, and only the function holds the key.
Do I need Firebase?
No. Any backend that checks the user, keeps the key and accepts the upload works. Firebase is here because Storage, Auth and callable functions cover all three with little code.
What does it cost?
Raw ffmpeg is $0.02 per compute minute, billed by the second. Failed jobs are free and the first $0.50 is free.
The same fix on other platforms
All integrationsReady to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
