flutter_quick_video_encoder 1.0.0
flutter_quick_video_encoder: ^1.0.0 copied to clipboard
Quickly encode raw RGB images & PCM audio to MP4 video using the system h264 encoder
Quickly encode raw RGB images & PCM audio to MP4 video using the system h264 encoder
No Dependencies #
FlutterQuickVideoEncoder has zero dependencies besides Flutter, Android, iOS, and MacOS themselves.
⭐ Stars ⭐ #
Please star this repo & on pub.dev. We all benefit from having a larger community.
Usage #
await FlutterQuickVideoEncoder.setup(
width: 1920,
height: 1080,
fps: 60,
bitrate: 2500000,
sampleRate: 44100,
filepath: "/documents/video.mp4",
);
for(int i = 0; i < frameCount; i++) {
Uint8List rgba = _renderVideoFrame(i); // your video function
Uint8List pcm = _renderAudioFrame(i); // your audio function
await FlutterQuickVideoEncoder.appendVideoFrame(rgba);
await FlutterQuickVideoEncoder.appendAudioFrame(pcm);
}
await FlutterQuickVideoEncoder.finish();
Example App #
Enable the platforms you need.
cd ./example
flutter config --enable-macos-desktop
flutter config --enable-android
flutter config --enable-ios
flutter create .
flutter run