williamfzc / stagesepx

detect stages in video automatically
MIT License
432 stars 125 forks source link

too much memory cost when using preload #129

Closed williamfzc closed 4 years ago

williamfzc commented 4 years ago

especially for long/high-quality video add hook for video object

williamfzc commented 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

williamfzc commented 4 years ago

0.14.1