feat: stop-motion support (images → video)#149
Merged
Merged
Conversation
Render a video from a sequence of still images, each frame held for a configurable duration — the classic stop-motion look. - Dart: StopMotionRenderData / StopMotionFrame / StopMotionFit + new renderStopMotion / renderStopMotionToFile platform interface methods, method-channel and web (unsupported) implementations. - Darwin (iOS/macOS): AVAssetWriter + pixel-buffer adaptor encoder, EXIF-aware ImageIO decoding with downscaling. - Android: Media3 Transformer image input with a Presentation effect for the fit mode, EXIF orientation handling and downscaled decoding. - Reuses the existing task/progress/cancel infrastructure; output is silent (add audio via renderVideo with audioTracks). - Example app page, unit + method-channel + integration tests, README, CHANGELOG and version bump to 1.20.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds stop-motion support: render a video from a sequence of still images, each frame held for a configurable duration — the classic choppy stop-motion look. This was previously impossible since the whole render pipeline only accepted video sources.
A dedicated feature parallel to
render(rather than touching the composition pipeline), so it reuses the existing task/progress/cancel infrastructure and is low-risk.API
The output is silent — add music by passing the result through
renderVideowithaudioTracks.Implementation
StopMotionRenderData/StopMotionFrame/StopMotionFit;renderStopMotion/renderStopMotionToFileon the platform interface, method channel and web (unsupported) stub.AVAssetWriter+ pixel-buffer adaptor; EXIF-aware ImageIO decoding (CGImageSourceCreateThumbnailWithTransform) with downscaling.setImageDurationMs) with aPresentationeffect for the fit mode;ExifInterfaceorientation handling andinSampleSizedownscaled decoding.RenderTask/RenderJobHandle→cancel(id)works unchanged.Platform support
Tests & verification
flutter analyze(package + example): clean.flutter test: all unit tests pass (model + method-channel coverage).example/integration_test/stop_motion_test.dart): duration, resolution, per-frame duration, all fit modes, to-file, progress, cancel.flutter build macosandflutter build apkboth succeed.Version bumped to 1.20.0.