LoginSignup
0
0

More than 3 years have passed since last update.

よく使うPythonコード  動画作成編

Last updated at Posted at 2021-02-19

画像をつなぎ合わせた動画の作成方法

import cv2

fourcc = cv2.VideoWriter_fourcc('X','V','I','D')
video = cv2.VideoWriter('movie.avi', fourcc, 30.0, (100, 100)) #fps, size 
#20.0 = 1秒間に20コマ

  for i in range(0, 100):
    img = cv2.imread("%d.png"%(i))
    video.write(img)

video.release()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0