我有以下示例代码:
import numpy as np
writer = imageio.get_writer('test.mp4', fps=1)
max = 800
resolution = 256
for idx in range(1, max):
img = np.zeros((resolution,resolution))
img[: int((idx / max) * resolution), : int((idx / max) * resolution)] = 255
img = img.astype(np.uint8)
writer.append_data(img)
writer.close()
fps == 1
的视频只是黑色的
我在这里想念什么?我在文档中看不到任何提示说我无法使fps = 1?
编辑
对于fps >= 10
来说似乎不错。