light_compressor
2.2.0, released 3 years ago by an unverified publisher
A Flutter plugin for video compression on Android, iOS, and macOS.
What it does
Generates a compressed MP4 video with modified width, height, and bitrate from a source video path, reducing high bitrates while maintaining good quality. It provides progress updates via a stream and allows compression cancellation.
AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to compress video files before uploading them in your Flutter app.
- You want to target Android, iOS, and macOS platforms with video optimization.
Skip it when
- You need complex video editing features beyond compression, scaling, and bitrate modification.
Strengths
- Supports multiple video qualities (very_low to very_high).
- Provides compression progress updates via a stream.
- Allows cancelling ongoing compression tasks.
Weaknesses
- Requires platform-specific configuration for permissions on Android and iOS.
- Requires specific build.gradle configurations and minimum Kotlin version on Android.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires adding NSPhotoLibraryUsageDescription in iOS Info.plist, storage/media permissions in AndroidManifest.xml, and JitPack repository along with Kotlin version updates in Android build.gradle files.
final LightCompressor _lightCompressor = LightCompressor();
final Result response = await _lightCompressor.compressVideo(
path: _sourcePath,
destinationPath: _destinationPath,
videoQuality: VideoQuality.medium,
isMinBitrateCheckEnabled: false,
video: Video(videoName: videoName),
android: AndroidConfig(isSharedStorage: true, saveAt: SaveAt.Movies),
ios: IOSConfig(saveInGallery: true),);Alternatives
Packages that do the same job and could replace light_compressor.
- v_video_compressor
Flutter plugin for video compression and thumbnail generation using native APIs.
83Compare - easy_video_editor
A lightweight Flutter plugin for video editing and manipulation without FFmpeg dependency.
81Compare - light_compressor_v2
Native video compression and editing for Flutter without FFmpeg
80Compare - flutter_compress
Native video and image compression for Android, iOS, and Web without FFmpeg.
67Compare