VideoFlowcodeGitHubTry itCoreRenderersReact Video EditorPlaygroundExamplesDocscodeGitHubTry it
Getting started
InstallationQuick startCore conceptsYour first video
Builder
Builder APITime formatsParallel & wait
Layers
TextImageVideoAudioCaptionsShapeGroups
Animation
Animate & keyframesEasing functionsTransitionsEffects
Renderers
Browser rendererServer rendererDOM preview
React Video Editor
QuickstartThemingUploadsCustom panelsHooks & commandsKeyboard shortcuts
API reference
Overview@videoflow/core@videoflow/renderer-browser@videoflow/renderer-server@videoflow/renderer-dom@videoflow/react-video-editor

Video layers

Add a video clip to the timeline. VideoFlow reads its duration (if autoDetectDurations is on), decodes frames on demand, and lets you trim, offset, and animate transforms over it.

const $ = new VideoFlow({ width: 512, height: 512, fps: 30, backgroundColor: '#000' });

const clip = $.addVideo(
  { fit: 'cover' },
  { source: 'https://videoflow.dev/samples/sample.mp4' },
);
$.wait('4s');
clip.remove();
return $;
Compiling00:00
const clip = $.addVideo(
  { fit: 'cover', volume: 0.8, mute: false },
  {
    source: 'https://videoflow.dev/samples/sample.mp4',
    sourceStart: '2s', // skip the first 2s of the source
  },
);
clip.animate({ scale: 1 }, { scale: 1.05 }, { duration: '10s', easing: 'linear', wait: false });

// Stop the clip after 10s of timeline play instead of letting it run to its
// own end. .remove() is the preferred way to bound a media layer's duration.
$.wait('10s');
clip.remove();

Properties

PropType / defaultNotes
source (setting)stringMP4 / WebM / MOV. Must be decodable by the chosen renderer.
sourceStart (setting)Time / 0In source-media seconds.
sourceEnd (setting)Time / 0Trim from the END of the source (source seconds).
sourceDuration (setting)TimeAuto-detected from the file. Set it only when you need to clip a sub-segment.
speed (setting)number / 1Playback speed multiplier.
volume0–1 / 1Animatable.
muteboolean
fitcover | contain / coverHow the video sizes to the project canvas.
position / anchor / scale / rotationAnimatable.
opacity / filterBlur / filterBrightnessAnimatable.
Source-media seconds. Animations on a video layer are keyed in source-media seconds, not timeline seconds. If you sourceStart: '5s' and then animate(from, to, { duration: '3s' }), the animation runs from source 5s → source 8s.
VideoFlow

Open-source toolkit for composing videos from code.

Product

CoreRenderersReact Video EditorPlayground

Learn

DocsAPI referenceExamplesvs. Remotionvs. FFmpeg

Project

GitHubLicenseContact

Legal

TermsPrivacy
© 2026 VideoFlow. Apache-2.0 core.