Using videos in Remotion
Prerequisites
First, the @remotion/media package needs to be installed.If it is not, use the following command:
<Video> from @remotion/media to embed videos into your composition.
Trimming
UsetrimBefore and trimAfter to remove portions of the video. Values are in seconds.
Delaying
Wrap the video in a<Sequence> to delay when it appears:
Sizing and Position
Use thestyle prop to control size and position:
Volume
Set a static volume (0 to 1):muted to silence the video entirely:
Speed
UseplaybackRate to change the playback speed:
Looping
Useloop to loop the video indefinitely:
loopVolumeCurveBehavior to control how the frame count behaves when looping:
"repeat": Frame count resets to 0 each loop (forvolumecallback)"extend": Frame count continues incrementing
Pitch
UsetoneFrequency to adjust the pitch without affecting speed. Values range from 0.01 to 2:
<Player />.