encode library
Pure-Dart media encoders for use outside Flutter widget tests.
This entrypoint does not import dart:ui or Flutter libraries, so it can be
used by command-line tools that run after widget tests have finished.
Classes
- GifOptions
- GIF export options. GIF delays have a 10 ms unit; values are rounded.
Functions
-
doctorFfmpeg(
{String? executable}) → Future< String> - Checks that FFmpeg is runnable and includes an H.264 video encoder.
-
encodeAnimationGif(
List< File> frames, File output, {required int fps, int loopCount = 0, int paletteColors = 256, int background = 0xffffffff}) → Future<File> - Encodes deterministic animation frames with one GIF delay derived from FPS.
-
encodeGif(
List< File> frames, File output, {GifOptions options = const GifOptions()}) → Future<File> - Encodes PNG frames into an animated GIF using a common canvas. The canvas uses the largest frame dimensions. Smaller frames start at the top-left; the configured background fills the remaining area.
-
encodeMp4(
List< File> frames, File output, {String? executable, int fps = 15, int? width, int? height, String paddingColor = 'black'}) → Future<File> - Encodes an ordered list of PNG frames as silent H.264 MP4.
-
encodeStoryboard(
List< File> checkpoints, String outputPath, {GifOptions options = const GifOptions()}) → Future<File> - Creates a storyboard GIF from named screenshot files.