Skip to main content

Rendering GIFs

Available since v3.1

You can render a video as a GIF by:

Reducing frame rate

Commonly a GIF has a lower frame rate than a video. For this, we support a parameter everyNthFrame that works as follows:

  • By default, everyNthFrame is set to 1: Frames 0, 1, 2, 3, 4 and so on are rendered.
  • Assuming everyNthFrame is 2, only every 2nd frame is rendered: 1, 3, 5, 7 and so on. A 30FPS video would now become a 15FPS GIF.
  • If everyNthFrame is 3, only every 3rd frame is rendered: 2, 5, 8, 11 and the pattern continues.

everyNthFrame is supported:

Changing the number of loops

The numberOfGifLoops option allows you to set the number of loops as follows:

  • null (or omitting in the CLI) means to play the GIF indefinitely.
  • 0 disables looping.
  • 1 loops the GIF once (plays twice in total)
  • 2 loops the GIF twice (plays three times in total)
  • and so on.

The numberOfGifLoops option can be set:

Importing GIFs

Wondering how to import other GIFs into a Remotion project? See here.

Transparent GIFs

To render a transparent GIF, the imageFormat option must be set to "png". In the Remotion Studio, this can be set in the "Picture" tab.

See also