UniversalAl / view

view.py is Python module for vapoursynth scripts that previews, compares VideoNodes (clips) within script itself by just running script. It is using openCV to put vapoursynth's RGB on screen.
MIT License
16 stars 0 forks source link

Incompatible with latest Vapoursynth versions? #3

Open adworacz opened 2 years ago

adworacz commented 2 years ago

Just tried running this with v59 of Vapoursynth, got the following error:

    self.img = np.dstack([np.array(f.get_read_array(p), copy=False) for p in [2,1,0]])
AttributeError: 'vapoursynth.VideoFrame' object has no attribute 'get_read_array'. Did you mean: 'get_read_ptr'?

Looks like the Vapoursynth API has changed since this project was last updated?

adworacz commented 2 years ago

Ahh yup, looks like the were replaced with get_frame: https://github.com/vapoursynth/vapoursynth/blob/8b784095663e519f8117b62ca840a449179baa2b/APIV4%20changes.txt#L108-L110

Might take a look at fixing this locally when I find the time. Should be an easy fix.