Video-Summary/Exporter.py

12 lines
319 B
Python
Raw Normal View History

import imageio
import numpy as np
2020-09-20 20:01:54 +00:00
class Exporter:
fps = 30
def __init__(self, data, outputPath):
print("Exporter initiated")
fps = self.fps
writer = imageio.get_writer(outputPath, fps=fps)
for frame in data:
writer.append_data(np.array(frame))
writer.close()