Video to GIF Converter: MP4 to GIF & Animated WebP (Bulk) avatar

Video to GIF Converter: MP4 to GIF & Animated WebP (Bulk)

Pricing

from $9.60 / 1,000 gif or webp createds

Go to Apify Store
Video to GIF Converter: MP4 to GIF & Animated WebP (Bulk)

Video to GIF Converter: MP4 to GIF & Animated WebP (Bulk)

Convert video file URLs to animated GIF or animated WebP in bulk: set start, duration, fps and width, plus an optional max file size (it re-encodes smaller to fit). Palette-optimised ffmpeg, signed download links. Direct files only, no YouTube.

Pricing

from $9.60 / 1,000 gif or webp createds

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Features

Limited permissions

Share

This video to GIF converter turns direct video file URLs (MP4, MOV, WebM, MKV) into animated GIFs or animated WebP files in bulk. You choose the start time, duration, frame rate and width, and optionally a maximum file size: if the first result is too big, the Actor re-encodes it smaller until it fits. Every file comes back as a signed download link. It runs ffmpeg in the cloud, so there is nothing to install and no API key.

What it does not do. It reads direct video files from a public URL. It does not download from YouTube, Vimeo, TikTok, Instagram or other streaming sites and rejects those links without charge; HLS/DASH playlists (.m3u8, .mpd) are not supported. It makes silent, looping animations of at most 60 seconds (no audio, no text, captions or editing). It respects the robots.txt of the host that serves your video. Use it only on videos you own or have the right to process.

What you get

  • One dataset row per GIF or WebP: download link, frames, width, height, playing time, file size, settings actually used, and a clear status or error.
  • A palette built from your own clip (two-pass palettegen / paletteuse), so GIFs look much better than a plain conversion.
  • A size cap that really holds: the Actor lowers fps, width and colors (GIF) or quality (WebP) in steps and tells you what it changed. Failed outputs are free.

How to convert a video URL to a GIF

  1. Paste one or more direct video URLs in videoUrls.
  2. Set startSeconds (for example "12.5" or "00:01:30"), durationSeconds (default 3), fps (default 12) and width (default 480 px, never upscaled).
  3. Run it. Open the dataset: every row has a url to the GIF. The SUMMARY record lists each video's duration, resolution and any problems.

How to make an animated WebP instead

Set "outputFormat": "webp" (or "both" for a GIF and a WebP of each window; that is two outputs and two charges). Animated WebP plays in all current browsers and is usually much smaller: in a local test, the same 3 s, 15 fps, 400 px window of the MDN flower sample was 1.56 MB as a GIF and 311 KB as a WebP (quality 70). Some chat apps, email clients and older tools still show only a still image for WebP, so pick GIF when you need to be sure it animates everywhere. webpQuality sets the quality (default 75).

How to keep a GIF under a file size limit

Set maxFileSizeKb, for example 8192 for an 8 MB limit (1 KB = 1,024 bytes). The Actor encodes with your settings first. If the file is over the cap it tries again with fewer frames per second, a smaller width and then fewer colors (GIF) or lower quality (WebP), in up to 7 attempts in total, and stops at the first result under the cap. The row shows attempts, the fps and width that were finally used, and a note. If even the last attempt is too big, that output is an error row with the smallest size reached, and nothing is charged. The ladder never goes below 64 px wide or 4 fps and never changes which part of the video you picked; shorten durationSeconds if you hit the limit.

How to make several GIFs from one video

Use videos with one entry per window: [{"url": "https://example.com/talk.mp4", "start": "00:05:00", "duration": 4, "name": "intro"}, {"url": "https://example.com/talk.mp4", "start": "00:12:30", "duration": 6}]. The same URL is downloaded once. Entries without start or duration use the run-level values.

Input

FieldDefaultWhat it does
videoUrlssample videoDirect video file links (required).
videosemptyPer-video windows: [{"url", "start", "duration", "name"}].
outputFormatgifgif, webp or both (two outputs per window).
startSeconds"0"Start as seconds or HH:MM:SS (a string).
durationSeconds30.2 to 60. Shortened (with a note) if the video ends sooner.
fps121 to 30. Duration times fps may not exceed 1,800 frames.
width48016 to 1920 px; never upscales.
maxFileSizeKb0 (off)Size cap per file, see above.
looptrueLoop forever, or play once.
colors / dither256 / bayerGIF palette size and dithering.
webpQuality75WebP quality, 1 to 100.
maxOutputsPerRun100Hard cap on files per run (max 2000).
maxVideoSizeMb500Source size cap (max 2048).
maxDurationMinutes120Source length cap.
videoTimeoutSecs300Per download and per output, including size-cap retries.
outputStoreNameemptySave files in a named store that is kept until you delete it.

Input example:

{
"videoUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"],
"outputFormat": "gif",
"startSeconds": "0",
"durationSeconds": 3,
"fps": 12,
"width": 480
}

Output

From a real local run of the input above:

{
"sourceUrl": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"videoIndex": 1, "outputIndex": 1, "name": null, "format": "gif",
"start": 0.0, "requestedSeconds": 3.0, "durationSeconds": 3.0,
"frames": 36, "fps": 12, "width": 480, "height": 270, "loops": "forever", "bytes": 1709122,
"maxFileSizeBytes": null, "withinSizeCap": null, "attempts": 1, "colors": 256, "webpQuality": null,
"sourceDurationSeconds": 5.055,
"url": "https://api.apify.com/v2/key-value-stores/<store>/records/v01-001.gif",
"key": "v01-001.gif", "status": "ok", "error": null, "note": null
}

On Apify the url is a signed link that downloads without a token. status is ok, error (nothing charged) or skipped (spending limit, maxOutputsPerRun, or the host's robots.txt). durationSeconds, frames, width and height are read back from the finished file.

Use with the Apify API, MCP, n8n and Make

Python:

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/video-to-gif-converter").call(run_input={
"videoUrls": ["https://example.com/demo.mp4"], "startSeconds": "5", "durationSeconds": 4,
"outputFormat": "gif", "maxFileSizeKb": 8192})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["status"], row["url"] or row["error"])

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/video-to-gif-converter').call({
videoUrls: ['https://example.com/demo.mp4'], outputFormat: 'webp', durationSeconds: 5 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();

In n8n or Make use the Apify node with the actor name and the same JSON. With Apify's MCP server (mcp.apify.com) an AI assistant can call it: "make a 4-second GIF from second 5 of this mp4, under 5 MB". Only a video URL is needed.

Use cases

  • Turn product demos and screen recordings into GIFs for docs, README files and tickets.
  • Make small looping previews for a video catalogue or a changelog.
  • Fit animations under a chat, email or CMS upload limit with one setting.
  • Convert a batch of clips to animated WebP for a faster website.
  • Generate GIF thumbnails for a pipeline that already stores video URLs.

How much does it cost

Pay per event: $0.012 per GIF or WebP created (output-created, $12 per 1,000). Outputs that fail, are skipped or rejected, and the SUMMARY record are free. outputFormat: both creates two outputs and so costs two events. Plan discounts apply (Silver about 10%, Gold and higher about 20%).

  • 1,000 GIFs: $12.
  • 10,000 GIFs: $120.
  • 100,000 GIFs: $1,200.

The price is per file delivered, whatever its length, size or number of size-cap attempts; Apify platform usage is included. maxOutputsPerRun caps a run, and if you set a maximum spend per run the Actor stops cleanly when it is reached and removes the file it could not charge for.

FAQ

Can it convert YouTube videos to GIF?

No. YouTube, Vimeo, TikTok, Instagram and other streaming-site links are rejected with a message and no charge. Use a direct link to a video file you have the rights to (for example a file on your own server or storage bucket).

Does it add sound, text or captions?

No. GIF and animated WebP here are silent animations of a time window of the video, at most 60 seconds. For captions see the subtitle tool under Related tools; for audio use the audio extractor.

What if the start time or window does not fit the video?

The Actor reads the real duration first. A start at or past the end gives an error row (free). A window that runs past the end is shortened and the row says so (note, and the measured durationSeconds).

How reliable is the size cap?

It re-encodes up to 7 times in total and stops at the first file under the cap, so a cap is met whenever the content can be compressed that far at 64 px wide and 4 fps. Very noisy or fast-moving footage is the hard case. If it cannot be met you get an error row with the smallest size reached and no charge. GIF is the less efficient format: a cap that a GIF cannot meet is often easy for WebP.

Which limits apply?

Source files up to 2 GB (default 500 MB) and 2 hours by default; GIFs and WebPs up to 60 s, 30 fps, 1920 px wide and 1,800 frames; up to 2,000 outputs per run. Links to private or internal addresses are blocked. The whole source file is downloaded once per video, so a very large file takes time even for a short GIF. The Actor honours the host's robots.txt: if it disallows your URL (or cannot be read) the video is skipped for free.

Which formats can it read?

Common containers (mp4, mov, webm, mkv, avi, flv, mpeg, ts) with codecs ffmpeg can decode. Animated WebP output needs the WebP encoder in the Actor's ffmpeg; if a build ever lacks it, the run stops with a clear message and nothing is charged.

Files live in the run's key-value store, which expires with your plan's retention period. Set outputStoreName to keep them in a named store until you delete it.

  • Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI pulls still images from the same videos.
  • Cut Video: Video Trimmer, Clip Cutter & Video to GIF cuts clips as MP4, WebM or MP3, or a simple GIF, with start and end times.
  • Batch Image Converter & Resizer: WebP, AVIF, PNG & JPEG converts and resizes still images.
  • Burn Subtitles into Video: Hardcode SRT & VTT Captions (Bulk) adds captions to a video before you make the GIF.