https://github.com/dheovani/gifcreator
Python code that generates a GIF from the URL of a YouTube video
https://github.com/dheovani/gifcreator
gif gif-animation gif-creator python python-script python3 youtube youtube-downloader
Last synced: about 19 hours ago
JSON representation
Python code that generates a GIF from the URL of a YouTube video
- Host: GitHub
- URL: https://github.com/dheovani/gifcreator
- Owner: Dheovani
- License: mit
- Created: 2021-12-31T20:01:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-08T00:42:00.000Z (about 2 years ago)
- Last Synced: 2025-01-20T07:31:55.366Z (9 months ago)
- Topics: gif, gif-animation, gif-creator, python, python-script, python3, youtube, youtube-downloader
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTube Video to GIF Converter
[GifCreator](https://github.com/Dheovani/GifCreator/assets/79609196/715488e5-b329-4190-b067-5a4dc7533ba0)
## Description
This is a simple Python script that allows you to convert YouTube videos into animated GIFs. It uses the PyTube library to download YouTube videos, extracts frames from the video, and then creates a GIF from those frames. The script also includes improvements to ensure that frames are processed and organized correctly.
## Prerequisites
Before using this script, make sure you have the following Python libraries installed:
- [PyTube](https://python-pytube.readthedocs.io/en/latest/)
- [OpenCV](https://pypi.org/project/opencv-python/)
- [Pillow (PIL)](https://pillow.readthedocs.io/en/stable/)You can install them using `pip`:
```bash
pip install -r requirements.txt
```## Usage
1. Clone this repository:
```bash
git clone https://github.com/your-username/your-repository.git
cd your-repository
```2. Run the youtube_to_gif.py script:
```bash
python youtube_to_gif.py
```3. Follow the prompts to enter the video URL, the directory to save videos, the directory to save frames, and the GIF name.
4. The generated GIF will be saved in the specified directory.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for more details.