Giter Club home page Giter Club logo

deno_gif's Introduction

Gif.ts

convert your videos to .gif, .mp3, .mp4, .webm and .avi

Installation

deno install  --allow-read --allow-write --allow-run -f -n gif https://deno.land/x/[email protected]/cli.ts

This module Requires ffmpeg:

brew install ffmpeg

Options

name description
width controls the width of the video
height controls the height of the video

Methods

name description
gif converts videos of any format to gifs
mp4 converts videos of any format to mp4
mp3 converts videos of any format to mp3
avi converts videos of any format to avi
webm converts videos of any format to webm

Example

Example of converting video to gif with options

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

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

gif(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
  options,
);

and without options

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

gif(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Example of converting video to mp3

import { mp3 } from "https://deno.land/x/deno_gif@<version>/mod.ts";

mp3(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif --mp3 -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Example of converting video to mp4 with options

import { mp4 } from "https://deno.land/x/deno_gif@<version>/mod.ts";

const options = {
  width: 480,
  height: 350,
};

mp4(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
  options,
);

and with out options

import { mp4 } from "https://deno.land/x/deno_gif@<version>/mod.ts";

mp4(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif --mp4 -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Example of converting video to avi with options

import { avi } from "https://deno.land/x/deno_gif@<version>/mod.ts";

const options = {
  width: 480,
  height: 350,
};

avi(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
  options,
);

and with out options

import { avi } from "https://deno.land/x/deno_gif@<version>/mod.ts";

avi(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif --avi -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Example of converting video to webm with options

import { webm } from "https://deno.land/x/deno_gif@<version>/mod.ts";

const options = {
  width: 480,
  height: 350,
};

webm(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
  options,
);

and with out options

import { webm } from "https://deno.land/x/deno_gif@<version>/mod.ts";

webm(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif --webm -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Example of converting video to mov with options

import { mov } from "https://deno.land/x/deno_gif@<version>/mod.ts";

const options = {
  width: 480,
  height: 350,
};

mov(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
  options,
);

and with out options

import { mov } from "https://deno.land/x/deno_gif@<version>/mod.ts";

mov(
  "https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4",
  "output",
);

or using the cli

gif --mov -i https://github.com/Eyoatam/Gif.ts/tree/master/example/testdata/video.mp4 -o output

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b feat/new-feature
  3. Commit your changes: git commit -am 'feat(newFeature): add new features'
  4. Push to the branch: git push origin feat/new-feature
  5. Submit a pull request

Give your pr a descriptive title

Examples of good title:

  • fix(cli): fix cli video to gif converter
  • feat(utils): add more utils

For further information you can read the Contribiting guidelines

Show Your Support

Give a ๐ŸŒŸ if you like this project!

License

MIT

deno_gif's People

Contributors

eyoatam avatar

Stargazers

Naol Arega avatar

Watchers

 avatar

deno_gif's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.