最近需要把视频转换成GIF格式,所以小写了一个Demo,分享给大家:
pip install moviepy
from moviepy.editor import *
clip = (VideoFileClip("your_video.mov").resize(0.5))
clip.write_gif("test.gif")
参考文献
[1].Python:把视频转为Gif图片. https://zhuanlan.zhihu.com/p/163575055
最近需要把视频转换成GIF格式,所以小写了一个Demo,分享给大家:
pip install moviepy
from moviepy.editor import *
clip = (VideoFileClip("your_video.mov").resize(0.5))
clip.write_gif("test.gif")
[1].Python:把视频转为Gif图片. https://zhuanlan.zhihu.com/p/163575055