1

我有以下示例代码:

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它似乎很好。

4

0 回答 0