VideoRenderService class

Constructors

VideoRenderService()

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

applyTextAndEffects({required String inputPath, required List<VideoEditorClip> clips, required List<VideoTextOverlay> textOverlays, required List<VideoEffectOverlay> effectOverlays}) → Future<String>
Burns clip effects, effect overlays and text into an existing video.
canvasFor({required List<VideoEditorClip> clips, required VideoAspectRatio aspectRatio, required int shortSide}) → Size
Canvas the project renders to for aspectRatio at shortSide pixels.
convertImageToVideo({required File imageFile, required Duration duration}) → Future<File>
disableHardwareEncoder() → void
Stops using the hardware encoder for the rest of this session.
executePlan(RenderPlan plan, {RenderProgressCallback? onProgress, RenderJob? job}) → Future<void>
Runs plan with FFmpeg, reporting progress and honouring job.
generateProxyVideo(File inputVideo) → Future<File>
A small (480 px short side) copy of inputVideo for fast previews, encoded with the hardware encoder when the device has one.
generateThumbnail(File videoFile, {Duration time = const Duration(seconds: 1)}) → Future<File?>
generateThumbnailStrip(File videoFile, {int count = 8}) → Future<List<File>>
getVideoDuration(File file) → Future<Duration>
getVideoResolution(File file) → Future<Size>
hardwareEncoderAvailable() → Future<bool>
probe(File file) → Future<MediaInfo>
renderProject({required List<VideoEditorClip> clips, required List<VideoEditorAudioTrack> audioTracks, required List<VideoTextOverlay> textOverlays, required List<VideoEffectOverlay> effectOverlays, required VideoAspectRatio aspectRatio, bool isPreview = false, ExportSettings settings = const ExportSettings(), RenderProgressCallback? onProgress, RenderJob? job}) → Future<String>
Renders the whole project to an MP4 and returns its path.
runEncode({required List<String> argumentsFor(List<String> encoderArgs), required Size size, required Duration duration, RenderProgressCallback? onProgress, int fps = 30}) → Future<void>
Runs an FFmpeg job that encodes video at size: the phone's hardware encoder first, x264 if that fails. argumentsFor gets the encoder arguments to place before the output file. Throws RenderException.
videoCodecArgs({required Size canvas, required int fps, required ExportQuality quality, required bool preview, bool hardware = false}) → List<String>
Encoder arguments for canvas at fps: hardware H.264 on Android when hardware is set, otherwise x264 (VideoToolbox on Apple platforms).

Constants

previewShortSide → const int
Short side of the canvas used for the in-editor composed preview.
watermarkText → const String
Text shown in the corner when ExportSettings.watermark is enabled.