video_forge 1.0.0
video_forge: ^1.0.0 copied to clipboard
High-performance Rust video processing engine for Flutter. Hardware-accelerated video transcoding, frame-accurate previews, audio mixing, and fast thumbnail generation powered by FFmpeg. Low-level eng [...]
1.0.0 #
- Initial pub.dev release of
video_forge— high-performance Rust video processing engine for Flutter powered by FFmpeg. - Hardware-accelerated transcoding (
CompressOptionswith platform codecs: MediaCodec on Android, VideoToolbox on iOS/macOS), async progress reporting withProgressEvent(phase, fps, ETA). - Metadata probing: fast MP4 inspection with FFmpeg fallback — dimensions, duration, framerate, codecs, rotation, Dolby Vision markers.
- Thumbnails: single (
thumbnail) and batch filmstrips (batchThumbnails/batchThumbnailBytes) with optimized GOP seek; two-tier seek for non-keyframes. - Frame-accurate previews:
decodePreviewFrameRgbafor raw RGBA,decodePreviewFramePixelBufferfor Apple zero-copyCVPixelBuffer. No temp files. - Audio mixing: mix external audio tracks with source video — per-track offsets, durations, and volume.
- Overlay burn-in: composite PNG overlays (watermarks, stickers) onto video frames with fade transitions.
- Playback sessions: decoder-driven playback with seek, play/pause, and custom frame-rate ticks.
- Demuxer/decoder LRU cache: reuses
AVFormatContextand decoder for repeatedthumbnail/batchThumbnails/decodePreviewFrameRgbacalls (default 4 entries, 30 s idle TTL, ~256 MB working-set cap). Disable viasetDecoderCacheConfig, flush viaclearDecoderCache. - Output container profiles:
OutputProfile { ProgressiveMp4, FragmentedMp4, Hls }enum witheffective_output_profilehelper. - Async remote-input prefetch:
startPrefetchRemoteInputwithwaitForJob/cancelJob. Improved HTTP options (seekable=1,tcp_nodelay=1,send_buffer_size=65536,listen_timeout=10s). - Buffer pool:
bufferPoolAcquire/bufferPoolReleaseand token-basedbufferPoolAcquireWithToken/bufferPoolReleaseByTokenfor zero-allocation render loops. DartReleaseTokenfinalizer returns the buffer to the pool on GC. - Comprehensive error type
VideoForgeErrorwith 11 variants (invalidInput,fileNotFound,unsupportedCodec,jobNotFound,cancelled,ioError,ffmpegError,queueFull,internal,cooldownActive,recoveryBudgetExhausted). - Zero Flutter-package dependencies. Native libraries linked at build time via
flutter_rust_bridgeand FFmpeg.
Platform support #
- Android (SDK 24+, MediaCodec HW encode)
- iOS (13.0+, VideoToolbox HW encode/decode)
- macOS (10.15+, VideoToolbox HW encode/decode)
- Windows / Linux: in progress
- Web: not supported