Installation
First of all you need to install moviepy
library using the pip command
pip install moviepy
After installing it make an app.py
file and copy paste the following code
app.py
1 2 3 4 5 |
from moviepy.editor import VideoFileClip clip = VideoFileClip("Video.mp4") clip.write_gif("output.gif",fps=10) |
Here we are using the write_gif
method of moviepy library to convert video to gif in python