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 21st November 2018, 13:34   #1341  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,773
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   #1342  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 685
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
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 21st November 2018, 16:14   #1343  |  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   #1344  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 685
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.
__________________
Search and denoise

Last edited by ChaosKing; 22nd November 2018 at 00:26.
ChaosKing is online now   Reply With Quote
Old 15th February 2019, 03:24   #1345  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 584
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.
__________________
If I ask "How do I do X?" or "what happens if I do X?", and X is a very bad thing that no one would ever normally do, assume that I already know this, and that I have Katie reasons for asking anyway.

Last edited by Katie Boundary; 15th February 2019 at 03:31.
Katie Boundary is offline   Reply With Quote
Old 19th February 2019, 15:43   #1346  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 52
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   #1347  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,798
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   #1348  |  Link
littlepox
Registered User
 
Join Date: Nov 2012
Posts: 217
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   #1349  |  Link
DJATOM
Registered User
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 143
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 | My Telegram
DJATOM is offline   Reply With Quote
Old 26th February 2019, 12:38   #1350  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 685
Khanattila Last Activity: 26th October 2018 19:54
@selur maybe it would be better to open a github issue.
__________________
Search and denoise
ChaosKing is online now   Reply With Quote
Old 5th March 2019, 21:01   #1351  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,798
@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 13:52.


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