← Selected work
VIDEO ENCODING / PUB.DEV / PACKAGE STUDY
flutter_story_encoder

Hardware-accelerated 4K story video encoding with thermal stability.

A native Flutter video encoding engine backed by AVFoundation on iOS and macOS and MediaCodec on Android, engineered with backpressure control, Pigeon type-safe IPC, and real-time telemetry.

FlutterAVFoundationMediaCodecpub.dev v1.2.2MIT

Published Dart & Flutter package architecture. Verified source, API documentation, and releases on pub.dev.

PACKAGE ENGINEERING

Hardware-accelerated 4K story video export without thermal throttling.

Exporting rich, layered Flutter story canvases to MP4 video often forces teams into shipping massive software FFmpeg binaries that overheat mobile devices, drop frames, and inflate app bundle sizes.

flutter_story_encoder bridges directly to native hardware encoders—AVFoundation on iOS and macOS, and MediaCodec with OpenGLRenderer on Android—delivering 4K 60fps H.264 High Profile 4.1 output through a compact, dependency-free Flutter plugin.

Designed around thermal stability and deterministic frame pacing, the plugin enforces backpressure across a Pigeon type-safe IPC boundary and streams live FPS, frame counts, and progress telemetry back to Dart.

PUB.DEV VERSION1.2.2
PUB POINTS160 / 160
PLATFORMSAndroid, iOS, macOS
NATIVE ENGINESAVFoundation & MediaCodec
MAX PROFILEH.264 High 4.1 · 4K 60fps
IPC LAYERPigeon (Type-Safe)
APPLE PACKAGINGSwift Package Manager (SPM)
LICENSEMIT
QUICK START & INTEGRATION

Drop-in installation and Dart API.

Published as flutter_story_encoder on pub.dev (v1.2.2, published Mar 4, 2026) with 160 / 160 pub points.

FlutterStoryEncoder — RepaintBoundary to Hardware MP4AVFOUNDATION / MEDIACODEC
pubspec.yaml
dependencies:
  flutter_story_encoder: ^1.2.2
lib/main.dart
await FlutterStoryEncoder.start(
  config: EncoderConfig(
    width: 1080,
    height: 1920,
    fps: 30,
    bitrate: 10000000,
    outputPath: '/path/to/story.mp4',
    addSilentAudio: true,
  ),
  onProgress: (stats) => print('${stats.currentFps} fps'),
);

await FlutterStoryEncoder.appendFrame(rgbaBytes);
final outputPath = await FlutterStoryEncoder.finish();
01. Deterministic Frame-by-Frame Hardware Export. Capture exact-resolution RGBA buffers from any Flutter RepaintBoundary, feed them through backpressure-aware appendFrame calls, and finalize a universal BT.709 MP4 with an optional silent AAC track.
TECHNICAL ARCHITECTURE

Native speed, zero FFmpeg bloat.

Type-safe Pigeon IPC, upfront dimension validation, and GPU-backed native pipelines across Apple and Android hardware.

01

AVFoundation & MediaCodec Backends

Uses Swift AVAssetWriter / AVFoundation on iOS 13+ and macOS 11+ (with optimized pixel swizzling) and Android MediaCodec + OpenGLRenderer (with GL_UNPACK_ALIGNMENT support) on API 21+ / 24+ for 4K.

02

Thermal Backpressure & Pacing

appendFrame coordinates native buffer readiness and signals backpressure to Dart when the hardware queue is saturated, avoiding runaway memory growth and thermal throttling on long story exports.

03

Pigeon Type-Safe IPC & Guardrails

Generated StoryEncoderHostApi and StoryEncoderFlutterApi contracts eliminate stringly-typed channel bugs. FlutterStoryEncoder.start validates even dimensions, positive FPS/bitrate, and output paths before invoking native code.

04

Swift Package Manager & Live Telemetry

Ships native SPM Package.swift manifests for both iOS and macOS, streams real-time EncodingStats (framesProcessed, currentFps, progress), and optionally muxes a silent AAC track for universal social platform playback.

ENCODER SPECIFICATIONS

Video Pipeline & Platform Requirements

160 / 160 PUB POINTS
VIDEO & AUDIO SPECS
  • Codec: H.264 / AVC (High Profile 4.1)
  • Audio: Optional silent AAC track
  • Color Space: BT.709 standard
  • Rate Control: Variable Bitrate (VBR)
  • Keyframe Interval: 1 second
PLATFORM SUPPORT
  • iOS 13.0+ (AVFoundation + SPM)
  • macOS 11.0+ (AVFoundation + SPM)
  • Android Min SDK 21 (24+ recommended for 4K)
  • Dart >=3.10.7 · Flutter >=3.3.0
  • Zero external runtime dependencies
PUBLIC DART API
  • FlutterStoryEncoder.start(config, callbacks)
  • FlutterStoryEncoder.appendFrame(Uint8List)
  • FlutterStoryEncoder.finish() & cancel()
  • EncoderConfig(width, height, fps, bitrate, ...)
  • EncodingStats(framesProcessed, currentFps, progress)
OPEN SOURCE & VERIFIED PUBLISHER

Maintained under devflier.com.

flutter_story_encoder is MIT-licensed open source. Explore the Swift and Kotlin native encoders, unit test suite, and runnable RepaintBoundary example on GitHub or pub.dev.

EXPLORE PACKAGEbr_code_pixEXPLORE PACKAGE@lucasveneno/trafficbotEXPLORE PLATFORMAutomotive DTC Codes PlatformEXPLORE PACKAGEBTC & Altcoins Trend Indicator
LET’S BUILD WHAT’S NEXTIDEA → PRODUCTION

Have something
worth building?

Tell us what you’re working on.

Start a conversation

New product · Existing platform · Engineering partnership · Technical challenge