Code Monkey home page Code Monkey logo

giftube's Introduction

GIFtube

Youtube to GIF Converter

Bash script to convert a YouTube video to a high-quality GIF file with a specified resolution, frame rate, start time, duration, and aspect ratio. It utilizes yt-dlp, ffmpeg, and gifsicle to accomplish this task. This script is based on a previous version by fushime2 with updated and new libraries, optimization and some other quality-of-life improvements added.

alt text

Dependencies

  • yt-dlp (for downloading YouTube videos)
  • ffmpeg (for video processing and GIF generation)
  • gifsicle (for optimizing the generated GIF)

The script will attempt to automatically install these dependencies if they are not already present on your system. It only supports automatic installation on Ubuntu/Debian and macOS; on other operating systems, you will need to install the dependencies manually.

Usage

  1. Save the script
  2. Run the script with ./make_gif.sh
  3. Follow the onscreen prompts

The script will guide you through the following steps:

  • Enter the YouTube URL
  • Specify the desired FPS (frames per second)
  • Set the start time and duration for the GIF
  • Choose the output resolution
  • Select the aspect ratio (new feature!)
  • Enter the output filename

The script will then download the video, generate a color palette, convert the specified video clip to a GIF using the selected resolution, FPS, and aspect ratio, and optimize the GIF file for better compression.

Features

  • Download YouTube videos
  • Convert video clips to high-quality GIFs
  • Customizable resolution and frame rate
  • Selectable aspect ratio (16:9, 4:3, 1:1, or 9:16)
  • Optimized color palette generation
  • GIF optimization for reduced file size

License

This script is released under the MIT License.

giftube's People

Contributors

gords avatar zondaxxx avatar

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.