Skip to content

gunash-portfolio/mov-to-gif-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOV to GIF Converter (Node.js Script)

This Node.js script converts .mov files to .gif format using the ffmpeg command-line tool. You can provide the .mov file path from the terminal, and the script will output a .gif in the same directory.

Prerequisites

1. Install Node.js

Make sure you have Node.js installed on your machine. You can check by running:

node -v

If Node.js is installed, it will return the version number. If not, follow the installation instructions at nodejs.org.

2. Install ffmpeg

The script uses ffmpeg to perform the video conversion. You need to install ffmpeg on your system:

MacOS(Using Homebrew)

brew install ffmpeg

Windows

  1. Download ffmpeg from the official website: ffmpeg.org ffmpeg.

  2. Follow the installation instructions for Windows.

  3. Add ffmpeg to your system's PATH so you can use it in the command line.

  4. To verify that ffmpeg is installed, run:

ffmpeg -version

Linux(Debian/Ubuntu)

sudo apt update
sudo apt install ffmpeg

How to Use

  1. Clone this repository or copy the script.
  2. Save the script as convertMovToGif.js.
  3. Open a terminal in the same directory where the script is saved.
  4. Run the following command, replacing path/to/your/video.mov with the actual path to your .mov file:
node convertMovToGif.js path/to/your/video.mov

Example:

node convertMovToGif.js ./example.mov

Conversion Details

  • The output .gif will be saved in the same directory as the .mov file with the same name (but .gif extension).
  • You can modify the fps (frames per second) and scale options inside the script to adjust the quality of the GIF.

License

This project is licensed under the MIT License. License: MIT

About

Convert any videos to gif

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published