pipeline-examples/video-to-gif

Turn a video into a GIF with removed background

Public
24 runs

video-to-gif

Convert videos to transparent GIFs with background removal, crop controls, and animation effects.

https://replicate.com/pipeline-examples/video-to-gif

Features

  • Remove video backgrounds automatically
  • Convert to transparent GIF format
  • Control timing with start/end timestamps
  • Adjust output dimensions with max width/height settings
  • Customize frame rate (FPS)
  • Apply center cropping for square output
  • Create boomerang effect (play forwards then backwards)

Models

Under the hood it uses these models:

How it works

This pipeline processes videos in several steps:

  1. First, it optionally preprocesses your video with FFmpeg to handle cropping, timing adjustments, and other basic video manipulations.

  2. Then it sends the video through the background removal model, which returns a version with the background replaced by a green screen.

  3. Finally, it converts the green screen video to a GIF, making the green background transparent and applying any additional effects like boomerang animation.

The result is a transparent GIF that can be overlaid on any background or used in presentations, websites, or social media.