[HELP] about grain - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: A/V Talk (https://forum.selur.net/forum-6.html) +--- Thread: [HELP] about grain (/thread-3742.html) |
about grain - litamonz - 14.06.2024 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? video = FFmpegSource2("C:\Users\gzr\Downloads\Video\asd.mp4") RE: about grain - Selur - 14.06.2024 Avisynth: video = FFmpegSource2("C:\Users\gzr\Downloads\Video\asd.mp4") (assuming you import or autoload everything you need) video = core.ffms2.Source(source=r"C:\Users\gzr\Downloads\Video\asd.mp4") Cu Selur Ps.: don't see any image,.. RE: about grain - litamonz - 14.06.2024 Yes, it worked after a bit of effort. I'd like to add one more thing briefly: How do I apply grain to just a single color code? For example, if the color code is RGB 255, how can I apply the grain only to 255? Also, the current script is causing the grain to extend beyond the white areas, which looks bad. Do you have any suggestions for this? Thank you in advance. Please see the attached example. https://prnt.sc/B1NAQL8ST9WT RE: about grain - Selur - 14.06.2024 Quote:Also, the current script is causing the grain to extend beyond the white areas, which looks bad.Yes, that is what all those mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand().mt_expand() for i in range(11): => remove those parts if that is not what you wanted. For a specific color mask, use: https://github.com/Beatrice-Raws/VapourSynth-TColorMask instead of BinarizeMask with a threshold. Cu Selur RE: about grain - litamonz - 14.06.2024 (14.06.2024, 22:18)Selur Wrote: For a specific color mask, use: https://github.com/Beatrice-Raws/VapourSynth-TColorMask instead of BinarizeMask with a threshold.It seems there might be a version compatibility issue causing it to not work, I'm using the R68. import vapoursynth as vs Python exception: No module named 'TColorMask' Traceback (most recent call last): File "src\\cython\\vapoursynth.pyx", line 3365, in vapoursynth._vpy_evaluate File "src\\cython\\vapoursynth.pyx", line 3366, in vapoursynth._vpy_evaluate File "C:\Users\gzr\Desktop\Avisynth stuff\a\2.vpy", line 3, in ModuleNotFoundError: No module named 'TColorMask' RE: about grain - Selur - 14.06.2024 You need to download https://github.com/Beatrice-Raws/VapourSynth-TColorMask/releases and put the dll into your plugins folder, then instead of tcm.TColorMask you use core.tcm.TColorMask. Cu Selur RE: about grain - litamonz - 15.06.2024 (14.06.2024, 23:41)Selur Wrote: You need to download https://github.com/Beatrice-Raws/VapourSynth-TColorMask/releases and put the dll into your plugins folder, then instead of tcm.TColorMask you use core.tcm.TColorMask. Thanks! Looks awesome https://prnt.sc/86ocu7FHPjOp |