Closed sosie-js closed 3 years ago
Hi. Sorry for the late response.
There are two places that need to be changed:
1.
rgb = core.ffms2.Source(source= abs_file_path)
should be changed to
rgb = mvf.ToRGB(core.ffms2.Source(source= abs_file_path))
to ensure the clip is in RGB format.
clip = mufnp.numpy_process(rgb, pencil_core, input_per_plane=False, output_per_plane=False)
should be changed to
empty = core.std.BlankClip(rgb, width=1280, height=720)
clip = mufnp.numpy_process([empty, rgb], pencil_core, input_per_plane=False, output_per_plane=False, omit_first_clip=True)
since the size of the output is not equal to the input. If the cv2.resize
is removed, this change is not necessary.
It should work after above changes.
That sounds cool! Big thanks WolframRhodium, here is the resulting file version_opencv.vpy
Hello, I am starting to use opencv with vapoursynth.
I tried to play the pencilsketch sample, but I get the message when rendered with mpv using video test.webm [ffmpeg/demuxer] vapoursynth: Error getting frame: all input arrays must have the same shape
my test code is:
Normaly video frames have the same image size as video so I don't understand