14.06.2024, 18:48
Hello, I really like this grain effect made with Avisynth and I want to try it in Vaporsynth, but no matter what I do, I can't add the grain. Does anyone have any ideas?
![[Image: XmkFWWGNUaNd]](https://prnt.sc/XmkFWWGNUaNd)
and as you can see, it looks bad. can i make it look better and ensure that it only applies grain to the white color?
video = FFmpegSource2("C:\Users\gzr\Downloads\Video\asd.mp4")
video = video.ConvertBits(8).ConvertToYV12()
white_mask = mt_binarize(video, 200).mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand()
grain_video = GrainFactory3(video)
sharpened_video = LSFMod(grain_video, strength=255)
result = mt_merge(video, sharpened_video, white_mask)
return result