Convert Figma logo to code with AI

remotion-dev logoremotion

🎥 Make videos programmatically with React

20,001
985
20,001
79

Top Related Projects

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/

23,338

Open source, production-ready animation and gesture library for React

✌️ A spring physics based React animation library

🇨🇭 A React renderer for Three.js

19,483

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web

Quick Overview

Remotion is a powerful framework for creating videos programmatically using React. It allows developers to leverage their web development skills to produce high-quality videos with dynamic content, animations, and custom logic.

Pros

  • Utilizes familiar React concepts and components for video creation
  • Offers fine-grained control over video composition and timing
  • Supports integration with external data sources and APIs
  • Provides a rich ecosystem of plugins and extensions

Cons

  • Steep learning curve for those new to video production concepts
  • Rendering can be resource-intensive for complex compositions
  • Limited built-in video editing features compared to traditional video software
  • Requires Node.js environment for video rendering

Code Examples

  1. Creating a simple video composition:
import {Composition} from 'remotion';
import {MyComposition} from './MyComposition';

export const RemotionVideo: React.FC = () => {
  return (
    <Composition
      id="MyVideo"
      component={MyComposition}
      durationInFrames={150}
      fps={30}
      width={1920}
      height={1080}
    />
  );
};
  1. Animating elements using interpolation:
import {useCurrentFrame, interpolate} from 'remotion';

export const AnimatedText: React.FC = () => {
  const frame = useCurrentFrame();
  const opacity = interpolate(frame, [0, 30], [0, 1]);
  
  return <h1 style={{opacity}}>Hello, Remotion!</h1>;
};
  1. Incorporating audio into a composition:
import {Audio} from 'remotion';

export const VideoWithAudio: React.FC = () => {
  return (
    <div>
      <h1>My Video Content</h1>
      <Audio src="path/to/audio.mp3" />
    </div>
  );
};

Getting Started

To start using Remotion, follow these steps:

  1. Install Remotion:

    npm init video
    
  2. Create a new composition in src/Composition.tsx:

    import {useCurrentFrame} from 'remotion';
    
    export const MyComposition = () => {
      const frame = useCurrentFrame();
      return <div>The current frame is {frame}</div>;
    };
    
  3. Preview your video:

    npm start
    
  4. Render your video:

    npm run build
    

For more detailed instructions and advanced features, refer to the official Remotion documentation.

Competitor Comparisons

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/

Pros of Lottie-web

  • Lightweight and efficient for simple animations
  • Wide browser support and easy integration
  • Large ecosystem of pre-made animations

Cons of Lottie-web

  • Limited to vector animations, less flexible for complex video-like content
  • Requires designers to use specific tools (e.g., After Effects) for creating animations
  • Less control over runtime behavior and interactivity

Code Comparison

Lottie-web:

lottie.loadAnimation({
  container: document.getElementById('lottie-container'),
  renderer: 'svg',
  loop: true,
  autoplay: true,
  path: 'animation.json'
});

Remotion:

import { Composition } from 'remotion';
import { MyAnimation } from './MyAnimation';

export const RemotionVideo = () => {
  return (
    <Composition
      id="MyAnimation"
      component={MyAnimation}
      durationInFrames={120}
      fps={30}
      width={1920}
      height={1080}
    />
  );
};
23,338

Open source, production-ready animation and gesture library for React

Pros of Motion

  • Simpler API for basic animations and transitions
  • Better suited for interactive web animations
  • Smaller bundle size for client-side applications

Cons of Motion

  • Limited to React-based web applications
  • Less control over complex video-like animations
  • Not designed for server-side rendering of videos

Code Comparison

Motion:

<motion.div
  initial={{ opacity: 0 }}
  animate={{ opacity: 1 }}
  transition={{ duration: 1 }}
>
  Hello World
</motion.div>

Remotion:

<Sequence from={0} durationInFrames={30}>
  <Img src={logo} style={{
    opacity: interpolate(frame, [0, 30], [0, 1])
  }} />
</Sequence>

Key Differences

  • Motion focuses on interactive web animations, while Remotion specializes in programmatic video creation
  • Remotion offers frame-based control, ideal for precise video editing
  • Motion provides an intuitive API for quick implementation of common animations
  • Remotion integrates with video editing concepts like compositions and sequences
  • Motion is more lightweight for web applications, while Remotion is better suited for complex video projects

Use Cases

Motion is ideal for:

  • Interactive web animations
  • Simple transitions in React applications
  • Enhancing UI/UX in web interfaces

Remotion excels in:

  • Creating programmatic videos
  • Complex animations for video content
  • Generating dynamic video assets at scale

✌️ A spring physics based React animation library

Pros of react-spring

  • Lightweight and focused on spring animations
  • Easier to integrate into existing React projects
  • More suitable for UI animations and transitions

Cons of react-spring

  • Limited to React applications
  • Not designed for complex video creation or editing

Code Comparison

react-spring:

import { useSpring, animated } from 'react-spring'

function AnimatedComponent() {
  const props = useSpring({ opacity: 1, from: { opacity: 0 } })
  return <animated.div style={props}>I will fade in</animated.div>
}

Remotion:

import { useCurrentFrame } from 'remotion'

export const MyVideo = () => {
  const frame = useCurrentFrame()
  return <div style={{ opacity: frame / 60 }}>Fade in over 1 second</div>
}

Summary

react-spring is a powerful animation library for React applications, focusing on spring physics-based animations. It's lightweight and easy to integrate into existing projects, making it ideal for UI animations and transitions.

Remotion, on the other hand, is a comprehensive framework for creating videos programmatically using React. It offers more advanced features for video creation and editing but may be overkill for simple UI animations.

Choose react-spring for lightweight UI animations in React applications, and Remotion for complex video creation tasks requiring programmatic control.

🇨🇭 A React renderer for Three.js

Pros of react-three-fiber

  • Specialized for 3D graphics and WebGL rendering
  • Seamless integration with Three.js, providing a React-friendly API
  • Large ecosystem of extensions and helpers for 3D development

Cons of react-three-fiber

  • Steeper learning curve for developers unfamiliar with 3D graphics concepts
  • Limited to 3D rendering, not suitable for general-purpose video creation
  • Performance may be a concern for complex 3D scenes on low-end devices

Code Comparison

react-three-fiber:

function Box(props) {
  const mesh = useRef()
  const [hovered, setHover] = useState(false)
  return (
    <mesh {...props} ref={mesh} onPointerOver={() => setHover(true)} onPointerOut={() => setHover(false)}>
      <boxGeometry args={[1, 1, 1]} />
      <meshStandardMaterial color={hovered ? 'hotpink' : 'orange'} />
    </mesh>
  )
}

Remotion:

export const MyVideo = () => {
  return (
    <Composition
      id="MyComp"
      component={MyComp}
      durationInFrames={150}
      fps={30}
      width={1920}
      height={1080}
    />
  );
};

While react-three-fiber focuses on creating 3D scenes with React components, Remotion is designed for programmatic video creation using React. The code examples highlight these different use cases, with react-three-fiber demonstrating 3D object manipulation and Remotion showcasing video composition setup.

19,483

GSAP (GreenSock Animation Platform), a JavaScript animation library for the modern web

Pros of GSAP

  • Mature and battle-tested animation library with extensive browser support
  • Powerful and flexible, capable of animating virtually any property
  • Large community and ecosystem with numerous plugins and resources

Cons of GSAP

  • Steeper learning curve for complex animations
  • Primarily focused on DOM and CSS animations, less suited for video creation
  • Requires a paid license for some advanced features and commercial use

Code Comparison

GSAP:

gsap.to(".box", {
  duration: 1,
  x: 100,
  y: 50,
  rotation: 360,
  ease: "bounce.out"
});

Remotion:

<Sequence from={0} durationInFrames={30}>
  <Animate
    start={[0, 0, 0]}
    end={[100, 50, 360]}
    easing="bounceOut"
  >
    {({x, y, rotation}) => (
      <div style={{transform: `translate(${x}px, ${y}px) rotate(${rotation}deg)`}} />
    )}
  </Animate>
</Sequence>

GSAP excels in web animations and interactive content, offering a powerful API for complex animations. Remotion, on the other hand, is specifically designed for programmatic video creation using React, making it more suitable for generating video content. While GSAP has a larger ecosystem and broader browser support, Remotion provides a more integrated approach for video production within a React environment.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Animated Remotion Logo

Discord Shield NPM Version NPM Downloads Open Bounties Twitter

Remotion is a framework for creating videos programmatically using React.

Why create videos in React?

  • Leverage web technologies: Use all of CSS, Canvas, SVG, WebGL, etc.
  • Leverage programming: Use variables, functions, APIs, math and algorithms to create new effects
  • Leverage React: Reusable components, Powerful composition, Fast Refresh, Package ecosystem

Created with Remotion

"This video was made with code" - Fireship Watch • Source

GitHub Unwrapped - Personalized Year in Review Try • Source

View more in the Remotion Showcase!

Get started

If you already have Node.JS installed, type

npx create-video@latest

to get started. Otherwise, read the installation page in the documentation.

Documentation

Documentation: remotion.dev/docs
API Reference: remotion.dev/api

License

Be aware of that Remotion has a special license and requires obtaining a company license in some cases. Read the LICENSE page for more information.

Contributing

Please read CONTRIBUTING.md to learn about contributing to this project.

NPM DownloadsLast 30 Days