Compress videos, remove audio, manipulate thumbnails, and make your video compatible with all platforms through this lightweight and efficient library.
100% native code was used, we do not use FFMPEG as it is very slow, bloated and the GNU license is an obstacle for commercial applications.
In addition, google chrome uses VP8/VP9, safari uses h264, and most of the time, it is necessary to encode the video in two formats, but not with this library.
All video files are encoded in an MP4 container with AAC audio that allows 100% compatibility with safari, mozila, chrome, android and iOS.
Works on ANDROID, IOS and desktop (just MacOS for now).
Add this to your package's pubspec.yaml
file:
dependencies:
video_compress: ^3.1.0
You can install packages from the command line:
with pub
:
$ pub get
Now in your Dart
code, you can use:
import 'package:video_compress/video_compress.dart';
import 'package:video_compress/video_compress.dart';
MediaInfo mediaInfo = await VideoCompress.compressVideo(
path,
quality: VideoQuality.DefaultQuality,
deleteOrigin: false, // It's false by default
);
VideoQuality.isCompressing
Inspired by the flutter_ffmpeg library.
https://github.com/rurico/flutter_video_compress