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. Using yt-dlp and ffmpeg.
- Download YouTube videos and convert to high-quality GIFs
- Customizable resolution, frame rate, and aspect ratio (16:9, 4:3, 1:1, or 9:16)
- Automatic installation of missing dependencies
- Easy uninstall of dependencies
yt-dlp(for downloading YouTube videos)ffmpeg(for video processing)
The script automatically checks for missing dependencies and offers to install them on supported systems:
- Ubuntu/Debian: Uses apt-get for ffmpeg and installs yt-dlp binary directly
- Fedora/Red Hat: Uses dnf for ffmpeg and installs yt-dlp binary directly
- Arch Linux: Uses pacman
- macOS: Uses Homebrew
- Make the script executable:
chmod +x make_gif.sh - Run:
./make_gif.sh(orsudo ./make_gif.shon Linux for first-time installation) - Follow the prompts to specify:
- YouTube URL
- Start time and duration
- Resolution and aspect ratio
- FPS (frames per second)
- Output filename
./make_gif.sh --uninstall
- Removes installed dependencies
