Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th February 2018, 17:52   #1321  |  Link
Khanattila
Registered User
 
Khanattila's Avatar
 
Join Date: Nov 2014
Posts: 440
I never used vseditor, but I suspect it could slow things down.

RX 480 8GB (1330MHz / 2000MHz) ~1,29 FPS with 90-100% GPU Load.

script.vpy
Code:
import vapoursynth as vs
core = vs.get_core()

clip = core.lsmas.LWLibavSource("Sample.mkv", format="YUV420P8")
# 1920x1080 clip from a Blu-ray.

clip = core.knlm.KNLMeansCL(clip, d=3, a=6, channels="Y",  device_type = "GPU")
clip = core.knlm.KNLMeansCL(clip, d=3, a=6, channels="UV", device_type = "GPU")

clip.set_output()
launcher.bat
Code:
vspipe script.vpy NUL -p
PS. Furthermore, there is the possibility LWLibavSource has decoding problems in that particular situation.
You should use a blank clip rather:
Code:
core.std.BlankClip(width=1920, height=1080, format=vs.YUV420P8, length=1000)
__________________
github.com

Last edited by Khanattila; 25th February 2018 at 22:34.
Khanattila is offline   Reply With Quote
Old 26th February 2018, 07:47   #1322  |  Link
fadedmaple
Registered User
 
fadedmaple's Avatar
 
Join Date: Dec 2017
Posts: 8
Quote:
Originally Posted by Khanattila View Post
I never used vseditor, but I suspect it could slow things down.

RX 480 8GB (1330MHz / 2000MHz) ~1,29 FPS with 90-100% GPU Load.

script.vpy
Code:
import vapoursynth as vs
core = vs.get_core()

clip = core.lsmas.LWLibavSource("Sample.mkv", format="YUV420P8")
# 1920x1080 clip from a Blu-ray.

clip = core.knlm.KNLMeansCL(clip, d=3, a=6, channels="Y",  device_type = "GPU")
clip = core.knlm.KNLMeansCL(clip, d=3, a=6, channels="UV", device_type = "GPU")

clip.set_output()
launcher.bat
Code:
vspipe script.vpy NUL -p
PS. Furthermore, there is the possibility LWLibavSource has decoding problems in that particular situation.
You should use a blank clip rather:
Code:
core.std.BlankClip(width=1920, height=1080, format=vs.YUV420P8, length=1000)
Thanks for you explain and advise,i find a very strange thing.
I record a short video here https://youtu.be/yvW8pOkl2_I

I have use a BlankClip in the video,you can see the GPU load change after I close and reopen the chrome .

Last edited by fadedmaple; 26th February 2018 at 07:50.
fadedmaple is offline   Reply With Quote
Old 26th February 2018, 13:48   #1323  |  Link
fadedmaple
Registered User
 
fadedmaple's Avatar
 
Join Date: Dec 2017
Posts: 8
Quote:
Originally Posted by HolyWu View Post
You should really use something like GPU-Z instead of Win10's task manager for measuring GPU Load.
A rookie mistake ...
It works well with 90-100% GPU Load.
fadedmaple is offline   Reply With Quote
Old 26th April 2018, 12:45   #1324  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 111
Could you give me a link to download onpencl for AMD? I can't find it anywhere
tuanden0 is offline   Reply With Quote
Old 26th April 2018, 13:07   #1325  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
In general, a hardware accelerated OpenCL driver should be part of a current graphic card driver (not knowing AMD, but nVidia drivers do install OpenCL.dll and additional hardware specific DLL files in the system director{y/ies}).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 26th April 2018, 13:49   #1326  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by tuanden0 View Post
Could you give me a link to download onpencl for AMD? I can't find it anywhere
OpenCL is a part of AMD GPU driver.
Atak_Snajpera is offline   Reply With Quote
Old 26th April 2018, 15:25   #1327  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 111
Quote:
Originally Posted by Atak_Snajpera View Post
OpenCL is a part of AMD GPU driver.
thank you, I installed
tuanden0 is offline   Reply With Quote
Old 17th November 2018, 11:15   #1328  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
@Khanattila what about trying to create a FFT3DCL filter?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 21st November 2018, 09:54   #1329  |  Link
Arhu
Registered User
 
Join Date: Nov 2003
Posts: 12
I'm seeing some weird frame order issues that appear to be happening with KNLMeansCL for me. I'm not sure for how long it has been happening because I only noticed recently with some UHD encodes. It may go back a few months.

1. Without KNLMeansCL frames seem to be fine in the output.
2. With d=0 and some values vor s, a and h sometimes a frame is skipped and later on another frame is repeated.
3. With d>0 and particularly with some UHD sources I occasionally but repeatedly get jumbled frames. E.g. for frames 1, 2, 3, 4, 5, 6 I'd get 1, 2, 3, 2, 5, 6 or something like that.

I didn't have time for more tests yet, but wanted to ask if this is a known problem or if anyone knows why this could be happening? Maybe something with the GPU or some buffer? I'm using a Geforce 1060, currently updating drivers.

Here's a sample script from staxrip:

Code:
import os
import sys
ScriptPath = 'D:/stax/staxrip/Apps/Plugins/VS/Scripts'
sys.path.append(os.path.abspath(ScriptPath))
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\both\ffms2\ffms2.dll")
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\vs\fmtconv\fmtconv.dll")
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\both\KNLMeansCL\KNLMeansCL.dll")
clip = core.ffms2.Source(r"D:\clip.mkv", cachefile = r"D:\clip_temp\clip.ffindex")
clip = core.fmtc.bitdepth(clip, bits=16)
clip = core.knlm.KNLMeansCL(clip, d = 2, s = 4, a = 4, h = 0.5)
clip.set_output()

Last edited by Arhu; 21st November 2018 at 10:30.
Arhu is offline   Reply With Quote
Old 21st November 2018, 13:34   #1330  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by Arhu View Post
I'm seeing some weird frame order issues that appear to be happening with KNLMeansCL for me. I'm not sure for how long it has been happening because I only noticed recently with some UHD encodes. It may go back a few months.

1. Without KNLMeansCL frames seem to be fine in the output.
2. With d=0 and some values vor s, a and h sometimes a frame is skipped and later on another frame is repeated.
3. With d>0 and particularly with some UHD sources I occasionally but repeatedly get jumbled frames. E.g. for frames 1, 2, 3, 4, 5, 6 I'd get 1, 2, 3, 2, 5, 6 or something like that.

I didn't have time for more tests yet, but wanted to ask if this is a known problem or if anyone knows why this could be happening? Maybe something with the GPU or some buffer? I'm using a Geforce 1060, currently updating drivers.

Here's a sample script from staxrip:

Code:
import os
import sys
ScriptPath = 'D:/stax/staxrip/Apps/Plugins/VS/Scripts'
sys.path.append(os.path.abspath(ScriptPath))
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\both\ffms2\ffms2.dll")
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\vs\fmtconv\fmtconv.dll")
core.std.LoadPlugin(r"D:\stax\staxrip\Apps\Plugins\both\KNLMeansCL\KNLMeansCL.dll")
clip = core.ffms2.Source(r"D:\clip.mkv", cachefile = r"D:\clip_temp\clip.ffindex")
clip = core.fmtc.bitdepth(clip, bits=16)
clip = core.knlm.KNLMeansCL(clip, d = 2, s = 4, a = 4, h = 0.5)
clip.set_output()
I suspect that FFms2 plugin is unable to deliver frames in right order for knlmeanscl.
Atak_Snajpera is offline   Reply With Quote
Old 21st November 2018, 14:30   #1331  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Atak_Snajpera View Post
I suspect that FFms2 plugin is unable to deliver frames in right order for knlmeanscl.
Test your source with seek-test https://gist.github.com/dubhater/3a2...ae25cd47ff78d2
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 21st November 2018, 16:14   #1332  |  Link
Arhu
Registered User
 
Join Date: Nov 2003
Posts: 12
Quote:
Originally Posted by Atak_Snajpera View Post
I suspect that FFms2 plugin is unable to deliver frames in right order for knlmeanscl.
Quote:
Originally Posted by ChaosKing View Post
I'm too much of a newbie to get it to work, but I found an old post of yours where you describe the issue I'm having. Switched to LWLibavSouce in staxrip and frames look accurate now. Guess I'll use that one from now on.

Bummer. I suppose I won't have to redo all of my earlier encodes as most of them look fine. It's just a select few that suffer from relatively obvious jerkiness where isolated frames weren't just repeated or skipped but came out in the wrong order.

Anyway, thanks for the quick help.
Arhu is offline   Reply With Quote
Old 22nd November 2018, 00:20   #1333  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Arhu View Post
I'm too much of a newbie to get it to work, but I found an old post of yours where you describe the issue I'm having.
Try the FATpack here https://forum.doom9.org/showthread.p...98#post1858098 (need to download seek-test zip AND the latest zip from the 1st page)

You literary just need to extract it and drag&drop your video file onto the bat file.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 22nd November 2018 at 00:26.
ChaosKing is offline   Reply With Quote
Old 15th February 2019, 03:24   #1334  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
I just gave this a spin. What's interesting is that it delivers extremely uneven results from one frame to the next. On most, it'll deliver stronger denoising than blur(1.0) without the actual blurring, but on some frames (maybe 20 or 25%?), it seems to do nothing at all.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.

Last edited by Katie Boundary; 15th February 2019 at 03:31.
Katie Boundary is offline   Reply With Quote
Old 19th February 2019, 15:43   #1335  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
Quote:
Originally Posted by Katie Boundary View Post
I just gave this a spin. What's interesting is that it delivers extremely uneven results from one frame to the next. On most, it'll deliver stronger denoising than blur(1.0) without the actual blurring, but on some frames (maybe 20 or 25%?), it seems to do nothing at all.
What are the parameters you're using? This is my go-to denoiser, but the choice of parameters makes a big difference.
SaurusX is offline   Reply With Quote
Old 24th February 2019, 15:30   #1336  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Small question for clarification: What color spaces are supported when using Vapoursynth?
Because when loading an 8bit 4:2:0 source, I get no problem, but when loading a 10bit 4:2:0 source I get 'only YUV444P10 and RGB30 are supported!'
So does KNLMeansCL only support 4:2:0 when using 8bit?
script I used:
Code:
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading E:\Output\10bitTest.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="E:/Output/10BITT~1.MKV", format="YUV420P10", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25/1
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# denoising using KNLMeansCL
clip = core.knlm.KNLMeansCL(clip=clip, device_type="gpu", device_id=0)
# adjusting output color from: YUV420P10 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# Output
clip.set_output()
also adding:
Code:
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P10, range_s="limited")
doesn't seem to fix the issue, when using:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DenoiseFilter/KNLMeansCL/KNLMeansCL.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading E:\Output\10bitTest.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="E:/Output/10BITT~1.MKV", format="YUV420P10", cache=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25/1
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# denoising using KNLMeansCL (bit depth: 10)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P10, range_s="limited")
clip = core.knlm.KNLMeansCL(clip=clip, device_type="gpu", device_id=0)
# adjusting output color from: YUV444P10 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# Output
clip.set_output()
I still get:
Code:
Python exception: knlm.KNLMeansCL: only YUV444P10 and RGB30 are supported!
using:
Code:
clip = core.resize.Bicubic(clip=clip, format=vs.RGB30, matrix_in_s="470bg", range_s="limited")
does the trick for me, so from the looks of it bitdepth > 8 bit requires a conversion to RGB30.
Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 24th February 2019 at 16:04.
Selur is offline   Reply With Quote
Old 25th February 2019, 17:03   #1337  |  Link
littlepox
Registered User
 
Join Date: Nov 2012
Posts: 218
Looks like AMD's new Radeon 7 doesn't like it

Processing under YUV444P16 gives weird output, similar to the problems with Vega.
littlepox is offline   Reply With Quote
Old 26th February 2019, 12:21   #1338  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Tried with rtx2070 and I don't see any artifacts besides lost details from denoising: https://slowpics.org/comparison/ed6f...f-0a5f18a34bff
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 26th February 2019, 12:38   #1339  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Khanattila Last Activity: 26th October 2018 19:54
@selur maybe it would be better to open a github issue.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 5th March 2019, 21:01   #1340  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
@ChaosKing: Thanks for the heads-up.
-> https://github.com/Khanattila/KNLMeansCL/issues/42
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.