Closed williamfzc closed 4 years ago
from stagesepx.video import VideoObject
from stagesepx.hook import CompressHook
VIDEO_PATH = "demo.mp4"
v = VideoObject(VIDEO_PATH)
hook = CompressHook(target_size=(600, 800))
v.add_preload_hook(hook)
v.load_frames()
after that, all the frames would be converted to 600x800 before loading
0.14.1
especially for long/high-quality video add hook for video object