Gif2mp4 by Python

参考链接

目的:

$ .gif \rightarrow .mp4 $

解决:

  1. pip install MoviePy
import moviepy.editor as mp
clip = mp.VideoFileClip("mygif.gif")
clip.write_videofile("myvideo.mp4")
  1. If you have ffmpeg on your device, this might be Okay as well.
pip install ffmpy
import ffmpy
ff = ffmpy.FFmpeg(
inputs={'input.gif': None},
outputs={'output.mp4': None}
)
ff.run()

  -1. If python isn't necessary, THIS ONE would be a very good and comprehensive choice.

posted @ 2018-05-01 19:21  默盒  阅读(2805)  评论(0编辑  收藏  举报