RenderGraphBuilder class
Builds the FFmpeg filter graph for a project.
Pure Dart (no plugins) so the graph can be unit tested. Every clip is normalised to the same canvas, frame rate and audio format before the concat, which is what keeps audio and video in sync across clips with different sources, speeds and missing audio streams.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
build(
{required List< VideoEditorClip> clips, required List<VideoEditorAudioTrack> audioTracks, required List<VideoEffectOverlay> effectOverlays, required Size canvas, required String outputPath, required List<String> videoCodecArgs, int fps = 30, List<RenderImageOverlay> imageOverlays = const [], String audioBitrate = '192k'}) → RenderPlan -
buildSegment(
{required VideoEditorClip clip, required ClipTransition transitionIn, required ClipTransition transitionOut, required Size canvas, required String outputPath, required List< String> videoCodecArgs, int fps = 30}) → RenderPlan - Renders one clip, normalised exactly as in build, to a Matroska file with uncompressed audio. Preview segments are cached per clip and later joined with buildSegmentJoin without re-encoding the video; PCM audio avoids the AAC priming gaps that would otherwise build up at each join.
-
buildSegmentJoin(
{required String concatListPath, required Duration duration, required List< VideoEditorAudioTrack> audioTracks, required List<VideoEffectOverlay> effectOverlays, required String outputPath, required List<String> videoCodecArgs, int fps = 30, String audioBitrate = '96k'}) → RenderPlan -
Joins cached segments listed in
concatListPath(FFmpeg concat demuxer format) into the preview MP4. The video is copied as is unless timed effects need it re-encoded; the audio is re-timed, mixed with the audio tracks and encoded to AAC. -
concatList(
List< String> paths) → String - One line per segment for the FFmpeg concat demuxer.
-
segmentFrames(
VideoEditorClip clip, int fps) → int -
Frames of a preview segment for
clipatfps(at least one). -
transitionInAt(
List< VideoEditorClip> clips, int i) → ClipTransition -
Transition into clip
i(none for the first clip). -
transitionOutAt(
List< VideoEditorClip> clips, int i) → ClipTransition -
Transition out of clip
i: the next clip's transition, if any. -
transitionSeconds(
ClipTransition transition, double clipSeconds) → double -
Length in seconds of one side of
transitionon a clip that lastsclipSeconds; never more than a third of the clip.