All Contributors

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 and IOS.

How to use

Video compression

MediaInfo mediaInfo = await VideoCompress.compressVideo(
  quality: VideoQuality.DefaultQuality, 
  deleteOrigin: false, // It's false by default

Check compress state


Get memory thumbnail from VideoPath

final uint8list = await VideoCompress.getByteThumbnail(
  quality: 50, // default(100)
  position: -1 // default(-1)

Get File thumbnail from VideoPath

final thumbnailFile = await VideoCompress.getFileThumbnail(
  quality: 50, // default(100)
  position: -1 // default(-1)

Get media information

final info = await VideoCompress.getMediaInfo(videopath);

delete all cache files

  • Delete all files generated by this will delete all files located at 'video_compress', you shoule ought to know what are you doing.
await VideoCompress.deleteAllCache()

Listen the compression progress

class _Compress extends State<Compress> {

  Subscription _subscription;

  void initState() {
    _subscription =
        VideoCompress.compressProgress$.subscribe((progress) {
      debugPrint('progress: $progress');

  void dispose() {


  • Add the trim video function
  • Add cancel function to Android


getByteThumbnailString pathvideo path, int quality(1-100)thumbnail quality, int positionGet a thumbnail from video positionget thumbnail from video pathFuture<Uint8List>
getFileThumbnailString pathvideo path, int quality(1-100)thumbnail quality, int positionGet a thumbnail from video positionget thumbnail file from video pathFuture<File>
getMediaInfoString pathvideo pathget media information from video pathFuture<MediaInfo>
compressVideoString pathvideo path, VideoQuality qualitycompressed video quality, bool deleteOrigindelete the origin video, int startTimecompression video start time, int durationcompression video duration from start time, bool includeAudiois include audio in compressed video, int frameRatecompressed video frame ratecompression video at origin video pathFuture<MediaInfo>
cancelCompressionnonecancel compressingFuture<void>
deleteAllCachenoneDelete all files generated by 'video_compress' will delete all files located at 'video_compress'Future<bool>


compressProgress$Subscribe the compression progress steamdouble progress


Contributions are always welcome!


Inspired by the flutter_ffmpeg library.

Contributors ✨

Thanks goes to these wonderful people:



Andres Gutierrez


Jonny Borges


This project follows the all-contributors specification. Contributions of any kind welcome!