Skip to content
pubscout

flutter_compress

2.0.1, released 4 weeks ago by an unverified publisher

Native video and image compression for Android, iOS, and Web without FFmpeg.

WASM-ready
$ flutter pub add flutter_compress
Source repository

What it does

Compresses videos and images natively using hardware-accelerated platform encoders on Android, iOS, and Web. Supports target size, bitrate, and quality controls without bundling an FFmpeg binary.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to compress videos or images before uploading them.
  • You want cross-platform media compression without adding FFmpeg or GPL dependencies.
  • You need to target precise output file sizes or bitrates.

Skip it when

  • You require complex video editing, filtering, or merging capabilities.
  • You need extensive format transcoding outside of standard platform codecs.

Strengths

  • No large FFmpeg binary or GPL license constraints.
  • Cross-platform support including Android, iOS, and Web.
  • Precise target size and quality configuration APIs.

Weaknesses

  • Some specific advanced platform configurations (like audio bitrate or frame-rate decimation on Android) are not supported.
  • Web EXIF metadata is stripped entirely due to canvas re-encoding limitations.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

No permissions declared by default; add foreground service or storage permissions only if background compression or specific downloads saving is needed.

import 'package:flutter_compress/flutter_compress.dart';

final result = await FlutterCompress.instance.compress(
  inputPath,
  const VideoCompressConfig(
    targetSizeMB: 10,
    codec: VideoCodec.h265,
  ),
  onProgress: (p) => debugPrint('${(p.progress * 100).toStringAsFixed(0)}%'),
);

Alternatives

Packages that do the same job and could replace flutter_compress.

Works with

Packages commonly used together with flutter_compress: ones it builds on, ones built on it, and its own family.