"CUDA is not available"
Do you have Nvidia card with drivers updated ?
Do you have the dependencies installed ?
https://github.com/HolyWu/vs-realesrgan
NumPy , PyTorch with cuda ?
+ Reply to Thread
Results 31 to 41 of 41
-
-
Last edited by kienkzz; 12th Feb 2022 at 00:06.
-
I think you can use device_type="cpu", but it will be slower
https://github.com/HolyWu/vs-realesrgan/blob/master/vsrealesrgan/__init__.py
device_type: Device type on which the tensor is allocated. Must be 'cuda' or 'cpu'.
Many anime have duplicate frames; one way to speed it up is to decimate the duplicates (VFR), instead of upscaling duplicates -
-
I said "search on the web", because I am sure you will find the exact script you need. Doom9 guys are the real experts.
-
Since RealESRFAN using the cpu usually is way to slow to be useful, another approach would be to use glsl filters (ignoring intro&outro) to increase the sharpness a bit.
(using Anime4Ks Darken, DeBlur and adaptive sharpening here)
Code:# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/libvs_placebo.dll") core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # source: 'E:\clips\[NanakoRaws] Delicious Party♡Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading E:\clips\[NanakoRaws] Delicious Party♡Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4 using LibavSMASHSource clip = core.lsmas.LibavSMASHSource(source="E:/clips/[NanakoRaws] Delicious Party♡Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4") # making sure input color matrix is set as 709 clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 29.970 clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # adjusting color space from YUV420P8 to YUV444P16 for vsGLSLAdaptiveSharpen clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited") with open("I:/Hybrid/64bit/vsfilters/GLSL/parameterized/adaptive-sharpen.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define curve_height 1.0', '#define curve_height 1.0000') glsl = glsl.replace('#define anime_mode false', '#define anime_mode true') glsl = glsl.replace('#define overshoot_ctrl false', '#define overshoot_ctrl false') glsl = glsl.replace('#define video_level_out false', '#define video_level_out false') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) with open("I:/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Deblur_Original.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define REFINE_STRENGTH 1.0', '#define REFINE_STRENGTH 100') glsl = glsl.replace('#define REFINE_BIAS 0.0', '#define REFINE_BIAS 0') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) with open("I:/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Darken_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 1.5', '#define STRENGTH 3') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) # adjusting output color from: to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited") # set output frame rate to 29.970fps clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # Output clip.set_output()
(bonus: glsl filters are usually fast and only require opengl compatible cards)
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
I have tried this but...
[Attachment 63327 - Click to enlarge] -
The glsl shaders for placebo.Shader have to be in mpv compatible syntax
The path that you're using glsl-shaders-master/sharpen... suggests to me they were from a collection of shaders, but not in mpv format , probably this one
https://github.com/libretro/glsl-shaders
Use this one for adaptive-sharpen.glsl
https://gist.github.com/HolyWu/72fbe92c2b4700243adb502526a88591 -
The green video:
[Attachment 63332 - Click to enlarge]
Code:# Imports import vapoursynth as vs # getting Vapoursynth core core = vs.core # Loading Plugins core.std.LoadPlugin(path=r"E:\Video\Script\libvs_placebo.dll") core.std.LoadPlugin(path=r"E:\Video\Script\L-SMASH-Works_20210423\plugins64\LSMASHSource.dll") # source: 'E:\Video\[NanakoRaws] Delicious Party Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4' # current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading E:\Video\[NanakoRaws] Delicious Party Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4 using LibavSMASHSource clip = core.lsmas.LibavSMASHSource(source="E:/Video/[NanakoRaws] Delicious Party Precure - 01 (WEB-DL 1920x1080 x264 AAC).mp4") # making sure input color matrix is set as 709 clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited") # making sure frame rate is set to 29.970 clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # adjusting color space from YUV420P8 to YUV444P16 for vsGLSLAdaptiveSharpen clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited") with open("E:/Video/Script/adaptive-sharpen.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define curve_height 1.0', '#define curve_height 1.0000') glsl = glsl.replace('#define anime_mode false', '#define anime_mode true') glsl = glsl.replace('#define overshoot_ctrl false', '#define overshoot_ctrl false') glsl = glsl.replace('#define video_level_out false', '#define video_level_out false') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) with open("E:/Video/Script/Anime4K_v4.0/Anime4K_Deblur_Original.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define REFINE_STRENGTH 1.0', '#define REFINE_STRENGTH 100') glsl = glsl.replace('#define REFINE_BIAS 0.0', '#define REFINE_BIAS 0') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) with open("E:/Video/Script/Anime4K_v4.0/Anime4K_Darken_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 1.5', '#define STRENGTH 3') clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=1920, height=1080) # adjusting output color from: to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited") # set output frame rate to 29.970fps clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # Output clip.set_output()
-
"Failed creating GPU textures"
Not sure , that script works for me with those shaders
BTW you should decimate to 23.976 after the source filter , for any script version
clip = core.tivtc.TDecimate(clip)
That particular shader combination does not improve the aliasing (the broken / jaggy line problems) . I think Selur was using it to illustrate line darkening , deblur, sharpen filters -
Yes, I mainly posted this to show an alternative route.
libplacebo should work, without cuda.
-> try updating your gpu drivers. (Windows defaults drivers may lack some features.)
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
How to Make A Thumbnail From 2 Splitted Video on Video Thumbnails Maker
By Daringbaaz in forum Newbie / General discussionsReplies: 1Last Post: 10th Jan 2019, 01:41 -
Looking to make BluRay video from 1080p/60fps video shot on Sony NX100 cam
By liberty610 in forum Authoring (Blu-ray)Replies: 38Last Post: 26th Sep 2018, 20:13 -
adding audio files to exist video with ffmpeg make the video currapted
By yanshof in forum Video ConversionReplies: 2Last Post: 21st Jan 2018, 14:37 -
adding audio files to exist video with ffmpeg make the video currapted
By yanshof in forum ProgrammingReplies: 1Last Post: 21st Jan 2018, 13:56 -
How can I make a VHS video get a better quality, is there a video software?
By hello0 in forum Newbie / General discussionsReplies: 9Last Post: 26th Jun 2017, 14:05