码迷,mamicode.com
首页 > 编程语言 > 详细

Gif2mp4 by Python

时间:2018-05-01 23:31:27      阅读:431      评论:0      收藏:0      [点我收藏+]

标签:mpeg   dev   ons   链接   edit   import   editor   row   tar   

参考链接

目的:

$ .gif \rightarrow .mp4$

解决:

  1. pip install MoviePy

    import moviepy.editor as mp
    clip = mp.VideoFileClip("mygif.gif")
    clip.write_videofile("myvideo.mp4")
  2. 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.

Gif2mp4 by Python

标签:mpeg   dev   ons   链接   edit   import   editor   row   tar   

原文地址:https://www.cnblogs.com/ZhengPeng7/p/8977127.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!