rogerxavier commited on
Commit
946c163
1 Parent(s): e680d0e

Update moviepyTest.py

Browse files
Files changed (1) hide show
  1. moviepyTest.py +3 -2
moviepyTest.py CHANGED
@@ -2,6 +2,8 @@ from moviepy.editor import *
2
  import cv2
3
  import numpy as np
4
  import subprocess
 
 
5
 
6
 
7
  # 函数用于获取图片的持续时间
@@ -11,8 +13,7 @@ def get_duration(image_name) ->str:
11
 
12
  def test():
13
 
14
- # 执行命令
15
- subprocess.run(["apt", "install", "imagemagick"])
16
  # 图片素材和字幕
17
  image_files = ['6.jpg', '7.jpg']
18
  subtitles = ['我我我,我帝者战神呀!', '嘻嘻!不要笑,不可以笑啦!']
 
2
  import cv2
3
  import numpy as np
4
  import subprocess
5
+ from moviepy import config_default
6
+
7
 
8
 
9
  # 函数用于获取图片的持续时间
 
13
 
14
  def test():
15
 
16
+ IMAGEMAGICK_BINARY = '/magick'
 
17
  # 图片素材和字幕
18
  image_files = ['6.jpg', '7.jpg']
19
  subtitles = ['我我我,我帝者战神呀!', '嘻嘻!不要笑,不可以笑啦!']