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, 12:34   #1341  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,814
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, 13:30   #1342  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 828
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
ChaosKing is online now   Reply With Quote
Old 21st November 2018, 15: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 21st November 2018, 23:20   #1344  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 828
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.

Last edited by ChaosKing; 21st November 2018 at 23:26.
ChaosKing is online now   Reply With Quote
Old 15th February 2019, 02:24   #1345  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 590
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 02:31.
Katie Boundary is offline   Reply With Quote
Old 19th February 2019, 14:43   #1346  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 59
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, 14:30   #1347  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,822
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 15:04.
Selur is offline   Reply With Quote
Old 25th February 2019, 16: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, 11:21   #1349  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 152
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, 11:38   #1350  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 828
Khanattila Last Activity: 26th October 2018 19:54
@selur maybe it would be better to open a github issue.
ChaosKing is online now   Reply With Quote
Old 5th March 2019, 20:01   #1351  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,822
@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
Old 6th May 2019, 11:04   #1352  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 125
i recently upgraded to ryzen + radeon. i am getting weird frames while using knlmeans prefilter in smdegrain like this

https://i.imgur.com/YL2rHpH.jpg

it didnt happen in intel + nvidia... is there any solution ?
Natty is offline   Reply With Quote
Old 6th May 2019, 13:34   #1353  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 6,814
Try again with mod16 resolution (816p instead of 818p)
Atak_Snajpera is offline   Reply With Quote
Old 7th May 2019, 17:17   #1354  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 125
Quote:
Originally Posted by Atak_Snajpera View Post
Try again with mod16 resolution (816p instead of 818p)
thanks. didn't make any difference.
i also tried following things

lwlibav instead of ffmsindex

mkvtoolnix and eac3to instead of makemkv

in all cases same issue... in some blurays it works fine and in some it gives garbage output.

Last edited by Natty; 9th May 2019 at 13:19.
Natty is offline   Reply With Quote
Old 7th May 2019, 18:34   #1355  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,208
Quote:
Originally Posted by Natty View Post
thanks. didn't make any difference.
i also tried following things

lwlibav instead of ffmsindex

mkvtoolnix and eac3to instead of makemkv

in all cases same issue... in some blurays it works fine and in some (mostly too noisy) sources it gives garbage output.
It might be a silly question but you have tested the filter without SMDegrain, right?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 9th May 2019, 13:15   #1356  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 125
Quote:
Originally Posted by Groucho2004 View Post
It might be a silly question but you have tested the filter without SMDegrain, right?
yes i did

https://imgur.com/a/N1y9OwH

dark frame on direct knlmeans,

others are with smdegrain(prefilter=4)

edit : i was getting this issue when windows updated few things automatically, now i uninstalled graphics drivers, everything works fine now. sounds strange but results are impressive now, thanks everyone.

Last edited by Natty; 13th May 2019 at 20:37.
Natty 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 12:23.


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