(WIP) gif.ts

CI

Note: ⚠️ This project is early WIP! currently the focus is to make it stable and feature complete.

Turn videos into gifs.

Installation

deno install --allow-read --allow-write --allow-run -f -n gif https://deno.land/x/deno_gif@0.2.6/cli.ts

This module Requires ffmpeg:

brew install ffmpeg

Example

import { gif } from "https://deno.land/x/deno_gif@0.2.6/mod.ts";

const opts = {
  width: 480,
  height: 380,
};

gif("https://www.w3schools.com/html/mov_bbb.mp4", "./out.gif", opts);

or using the cli

gif -w 480 -t 350 https://www.w3schools.com/html/mov_bbb.mp4 output.mp4

Options

  • width type number
  • height type number

Credits

This project is based on:

  • Benjamin Fischer’s deno_fast_forward which is a wrapper for the FFmpeg library which is used for actually encoding into gifs

License

MIT