An Interest In:
Web News this Week
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
December 30, 2021 02:44 pm GMT
How to convert
Original Link: https://dev.to/abipravi/convert-video-to-gif-in-python-464n
Convert video to gif in python
How to convert video file
to gif
format using Python programming language
- First install module
pip install MoviePy
- Now Code the following
from moviepy.editor import *clip = (VideoFileClip("./video1.mp4"))clip.write_gif("output.gif")
You can also trim the video from one part and then convert them into gif
from moviepy.editor import * clip = (VideoFileClip("./video1.mp4").subclip((0:00),(1:00)).resize(ACCORDING TO THE USER WISH)) clip.write_gif("output.gif")
Thanks for Reading
If you like this article please like and leave us an comment
Original Link: https://dev.to/abipravi/convert-video-to-gif-in-python-464n
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To