本文整理匯總了Python中moviepy.editor.VideoFileClip.speedx方法的典型用法代碼示例。如果您正苦於以下問題:Python VideoFileClip.speedx方法的具體用法?Python VideoFileClip.speedx怎麽用?Python VideoFileClip.speedx使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類moviepy.editor.VideoFileClip
的用法示例。
在下文中一共展示了VideoFileClip.speedx方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: VideoFileClip
# 需要導入模塊: from moviepy.editor import VideoFileClip [as 別名]
# 或者: from moviepy.editor.VideoFileClip import speedx [as 別名]
import random
import urllib
import sys
import os
import json
from bs4 import BeautifulSoup
import requests
from moviepy.editor import VideoFileClip, CompositeVideoClip, ImageClip, vfx
from moviepy.video.fx.resize import resize
from PIL import Image, ImageDraw, ImageFont
fname = sys.argv[1]
clip = VideoFileClip(fname)
# clip.write_gif('t0.gif', fps=15, loop=1)
# clip.speedx(1.8).write_gif('t1.gif', fps=7, loop=1)
# clip.speedx(1.8).write_gif('t2.gif', fps=5, loop=1)
# clip.speedx(2.4).write_gif('t3.gif', fps=4, loop=1)
# clip.speedx(2.3).write_gif('t4.gif', fps=4, loop=1)
# clip.speedx(2.2).write_gif('t5.gif', fps=4, loop=1)
# clip.speedx(2.1).write_gif('t6.gif', fps=4, loop=1)
# clip.speedx(2.4).write_gif('t7.gif', fps=5, loop=1)
clip.resize(.8)
clip.speedx(1.8).write_gif('t8.gif', fps=7, loop=1)
# clip.speedx(1.8).write_gif('t4.gif', fps=5, loop=1, opt='wu')
# clip.speedx(1.7).write_gif('t2.gif', fps=7, loop=1, opt='wu')
# clip.speedx(1.7).write_gif('t3.gif', fps=7, loop=1, program='ffmpeg')
# clip.speedx(1.7).write_gif('t4.gif', fps=7, loop=1, program='ImageMagick', opt='optimizeplus', fuzz=10)