Skip to content

Video-to-Gif-Project -This is a simple web application that allows users to upload a video file and convert it to a GIF. The user can specify the duration of the GIF. The application is built using Flask, a micro web framework for Python, and uses the moviepy library for video editing and compression.

License

Notifications You must be signed in to change notification settings

Zoronium/Video-to-Gif-Project

Repository files navigation

Video to Gif Converter

This is a simple web application that allows users to upload a video file and convert it to a GIF. The user can specify the duration of the GIF.

The application is built using Flask, a micro web framework for Python, and uses the moviepy library for video editing and compression.

link

Deployment Link

https://video-to-gif-project.up.railway.app/

image done on railway

Requirements

  • Python 3.x
  • Flask
  • moviepy
  • imageio
  • opencv-python-headless more can be seen in requirements.txt

Usage

  1. Clone the repository:
 git clone https://github.com/Zoronium/video-to-gif
  1. Install the required packages:
pip install -r requirements.txt
  1. Run the server:
python server.py
  1. Open the application in a web browser: http://localhost:5000/
  2. Select a video file and enter the desired duration, then click the upload button to upload the file and receive the gif as a response.

Note

  • The gif file will not be stored in the same folder as the script but in the temp folder. You can store the gif file in a separate folder or in cloud storage by changing the following lines
    file.save(filename)
    video_to_gif(filename, int(duration))
    gif_filepath = filename.replace(".mp4", ".gif")
    response = send_file(gif_filepath, as_attachment=True) 
  
    # change the file path here
  • The application is in development mode and it is may not be ok recommended to use it in a production environment.

Demo

vidtogif

License

This project is licensed under the MIT License.

Contributing

Feel free to fork this repository and make changes as you like. If you have any suggestions for improvements, please open a pull request.

About

Video-to-Gif-Project -This is a simple web application that allows users to upload a video file and convert it to a GIF. The user can specify the duration of the GIF. The application is built using Flask, a micro web framework for Python, and uses the moviepy library for video editing and compression.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published