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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th September 2022, 22:58   #1581  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,027
As processing of noisy VHS captures shows the settings like MPBNumIt=2, MPB_SPC=1.5 may be too aggressive and leave too much noise too. So if the residual noise level is too high even with big enough tr and thSAD values may be good either to try lower like MPBNumIt=1, MPB_SPC=1.2 settings or even make some linear mix of 2 processed clips - with MPBNumIt > 0 and with 'old' standard blending mode with MPBNumIt=0 (default) to make balance between residual noise and possible keeping of details. The MPB_SPC may be lowered to about 1.02 and still produce visible difference. It should be > 1.0.
DTL is offline   Reply With Quote
Old 6th October 2022, 11:56   #1582  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Dogway how do I use dfttest as mode with the 3.5.5d version of SMDegrain properly? Any info on the possible parameters?

A lot of parameters cause errors. Right now I just managed to do a simple call like SMDegrain(mode="dfttest", tr=3).
I know tbsize needs to be odd so tr has to be too, I guess?
LeXXuz is offline   Reply With Quote
Old 6th October 2022, 12:51   #1583  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,133
Quote:
Originally Posted by LeXXuz View Post
Dogway how do I use dfttest as mode with the 3.5.5d version of SMDegrain properly? Any info on the possible parameters?

A lot of parameters cause errors. Right now I just managed to do a simple call like SMDegrain(mode="dfttest", tr=3).
I know tbsize needs to be odd so tr has to be too, I guess?
You can use with prefilter=4
https://github.com/Dogway/Avisynth-S...5.5d.avsi#L258
kedautinh12 is offline   Reply With Quote
Old 6th October 2022, 14:03   #1584  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by kedautinh12 View Post
That is NOT what I asked. Version 3.5.5d supports dfttest as a denoising mode not just as a prefilter.
LeXXuz is offline   Reply With Quote
Old 6th October 2022, 19:54   #1585  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
I didn't notice that requirement. Yes, to make it behave smooth add the next into the dfttest call:
Code:
,tmode=(tr-1)%2
What other settings are giving you issues?

By the way, I'm still finishing TransformsPack, just did an overall rehaul to Transfers module. Will focus now on Main module to solve for the chroma location. Chromatic Adaptation fix is reserved for the following (last?) RC version, technically 1.0 final.
ResizersPack will benefit a lot from these so an update is also on due.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th October 2022, 09:21   #1586  |  Link
madey83
Registered User
 
Join Date: Sep 2021
Posts: 136
Quote:
Originally Posted by kedautinh12 View Post
hi kedautinh12,

i did 3 tests:

#1) neo_f3kdb(preset="veryhigh/nograin", dynamic_grain=false, output_depth=10):
preset="veryhigh/nograin" == [y=80/cb=80/cr=80/grainy=0/grainc=0]
neo_f3kdb_8.30 fps_1858.66kbs_QP22.58

#2) GradFun3plus(thr=0.25, radius=10, mask=2, thr_det=2, elast=4, smode=2, UV=1):
GradFun3plus_5.17fps_1962kbs_QP22.42

#3) F3KDB_3(range=10, Y=100, Cb=48, Cr=48, grainY=80, grainC=80, sample_mode=2, dynamic_grain=false, opt=-1, keep_tv_range=true, output_depth=10, chroma=true):
F3KDB_3_8.03 fps_1957.32kbs_QP22.65


and i can see on my eyes that neo_f3kdb produced less details than F3KDB_3 and GradFun3plus.

Between F3KDB_3 and GradFun3plus i do not see any differents but speed is quit big.

i do not really know if this is correct comparision....
madey83 is offline   Reply With Quote
Old 7th October 2022, 11:12   #1587  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
I didn't notice that requirement. Yes, to make it behave smooth add the next into the dfttest call:
Code:
,tmode=(tr-1)%2
Thanks I'll add that.

Quote:
Originally Posted by Dogway View Post
What other settings are giving you issues?
Never mind that. I got confused with the parameters as I've been using neo_dfttest before which uses different syntax. Btw, you may consider using the neo-fork of dfttest. I've used that one with real.finders dfttestMC for quite a while and it was considerably faster than the original dfttest. Unless there has been a more speed optimized version since 1.9.7 in the meantime.

Quote:
Originally Posted by Dogway View Post
By the way, I'm still finishing TransformsPack, just did an overall rehaul to Transfers module. Will focus now on Main module to solve for the chroma location. Chromatic Adaptation fix is reserved for the following (last?) RC version, technically 1.0 final.
ResizersPack will benefit a lot from these so an update is also on due.
Very nice! Looking forward to it.

As a side note; I've encoded a film twice. Denoised with tr=6 and tr=12. Rest of the parameters identical.
(SMDegrain(mode="MDegrain", tr=6/12, thSAD=300, thSADc=200, contrasharp=true, LFR=true, DCTFlicker=true, refinemotion=true, truemotion=false, blksize=16, search=5, pel=2, subpixel=3, prefilter=3, chroma=true, plane=4))

The file encoded with tr=6 got smaller in total size than the version with tr=12. Not in a huge amount, but noticeably. Like 5.46GB vs 5.53GB for the entire film in 1080p.

I was wondering how to interpret this?
Would this mean the denoising with tr=12 kept more detail or interpreted less content as noise because of higher precision through the higher radius?
Since the tr=12 version took 2 hours longer to encode I was wondering if it's worth the time or merely just a waste?

Last edited by LeXXuz; 7th October 2022 at 13:46.
LeXXuz is offline   Reply With Quote
Old 7th October 2022, 11:42   #1588  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
neo_f3kdb produced less details than F3KDB_3
by default F3KDB_3 use neo_f3kdb(smode=4) also it use masking which the same used in GradFun3 (I think it also same in GradFun3plus)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th October 2022, 11:49   #1589  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
If you can run dfttest and neo_ benchmarks with different threads, and prefetch combinations I might consider it. When I benchmarked them last year speed difference was negligible (I think dfttest was a bit faster, not sure).

For the tr=12 case, it might be the case of ghosting probably? If not maybe the contrasharp is hitting back harder. You can test with a snippet with contrasharp=false.
For me personally I like keeping a half a second windows, tr=6 for a 24fps source, as it's not either too fast nor too slow for the eye to notice temporal denoising changes. It's a good pacing threshold to capture action.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th October 2022, 12:25   #1590  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,027
Quote:
Originally Posted by madey83 View Post
@anton_foy,

something like this:
https://imgur.com/9VoMBEv

King's face and clothes are clean and fairly sharp (forground), but background behing him is blurred ( i know this is related to camera and recording technics) and it is very clean, without noise.

Is there anything that could separate forground and background and specify different denoise values?
You can check the 'IVS-mask' feature of that release - https://forum.doom9.org/showthread.p...44#post1976044

It not directly about 3D space fore/back separation but tried to separate sharp detailed areas from flat non-detailed to apply 'anti-blur'/detail saving/restoration' processing only to detailed areas to save from increasing noise on non-detailed.
To generate this mask the property of motion search engines used:
1. At sharp detailed areas the MVs are typically stable enough and random component in MVs length and direction angle is low enough (in completely static areas with ideal search result all MVs = (0,0) so zero length and (zero ? assumed) angle.
2. At flat non scene-detailed but noise added areas the motion search engine typically output a sequence of random enough MVs (in theory the length of each MV may be limited only by search radius) and typical angle is very random too.
So current algo of IVS-mask (it is from 'Is Vectors Stable') calculates acceleration in the MVs from past to the future and angle difference and after multiplication creates some metric of MVs stability for current block to compare with user-provided threshold to make decision if this area are mostly noise without details (and typical degrain settings/processing may be applied) or it is possibly detailed area and details keepig/saving processing may be selected.
If this mask will be good for some other outside MDegrain scripting it may be added special mode of MDegrain to output only 2levels of greyscale mask from this algorithm. Currently it is used only for threshold adjustment and only assumed as detailed blocks are marked with zero-black (not any nice but quick method to mark something - slow but not used in production processing - only for params control/setup).
Currently the generated mask is not very precisely tracks the border between sharp and blurred areas may be because some motion-search engines trying to use area-adaptive methods of blocks tracking with inter-blocks dependencies (like truemotion=true in MAnalyse) so blocks MVs search are not completely independent. So for best results of IVS-mask it is recommended special inter-blocks-independent search mode of MAnalyse (like truemotion = false preset, zero penalties, may be lambda special adjustment too and so on) and seperate input in MDegrain provided if user want to use other search methods for main degraining work (like prefiltered clip for MAnalyse).

Last edited by DTL; 7th October 2022 at 12:33.
DTL is offline   Reply With Quote
Old 8th October 2022, 08:07   #1591  |  Link
madey83
Registered User
 
Join Date: Sep 2021
Posts: 136
Quote:
Originally Posted by DTL View Post
You can check the 'IVS-mask' feature of that release - https://forum.doom9.org/showthread.p...44#post1976044

It not directly about 3D space fore/back separation but tried to separate sharp detailed areas from flat non-detailed to apply 'anti-blur'/detail saving/restoration' processing only to detailed areas to save from increasing noise on non-detailed.
To generate this mask the property of motion search engines used:
1. At sharp detailed areas the MVs are typically stable enough and random component in MVs length and direction angle is low enough (in completely static areas with ideal search result all MVs = (0,0) so zero length and (zero ? assumed) angle.
2. At flat non scene-detailed but noise added areas the motion search engine typically output a sequence of random enough MVs (in theory the length of each MV may be limited only by search radius) and typical angle is very random too.
So current algo of IVS-mask (it is from 'Is Vectors Stable') calculates acceleration in the MVs from past to the future and angle difference and after multiplication creates some metric of MVs stability for current block to compare with user-provided threshold to make decision if this area are mostly noise without details (and typical degrain settings/processing may be applied) or it is possibly detailed area and details keepig/saving processing may be selected.
If this mask will be good for some other outside MDegrain scripting it may be added special mode of MDegrain to output only 2levels of greyscale mask from this algorithm. Currently it is used only for threshold adjustment and only assumed as detailed blocks are marked with zero-black (not any nice but quick method to mark something - slow but not used in production processing - only for params control/setup).
Currently the generated mask is not very precisely tracks the border between sharp and blurred areas may be because some motion-search engines trying to use area-adaptive methods of blocks tracking with inter-blocks dependencies (like truemotion=true in MAnalyse) so blocks MVs search are not completely independent. So for best results of IVS-mask it is recommended special inter-blocks-independent search mode of MAnalyse (like truemotion = false preset, zero penalties, may be lambda special adjustment too and so on) and seperate input in MDegrain provided if user want to use other search methods for main degraining work (like prefiltered clip for MAnalyse).


HI DTL, thank you for that, but to be honest this is to advanced for me. I think i'll stick with SMDegrain or try to learn more about MDegrainN and of course observe the discussion on this topic....
madey83 is offline   Reply With Quote
Old 8th October 2022, 18:48   #1592  |  Link
ENunn
Registered User
 
Join Date: Dec 2019
Posts: 67
I'm getting this error whenever I use QTGMC+ with AVISource. I started to get this error after updating it.


This doesn't happen when I load the video with LSMASH, but loading and scrubbing is just way too slow. Is there a fix?
ENunn is offline   Reply With Quote
Old 8th October 2022, 20:30   #1593  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
I don't recommend you loading interlaced with avisource since it doesn't index the frames.
You can try LSmash, FFMS2, DGIndex or DGDecNV. I prefer the later two because it will detect parity swaps on interlaced content.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th October 2022, 07:27   #1594  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
I get an error with NNEDI3 (pel=4 & subpixel=4 and set gpuid=-1), I can't pinpoint and need some help:



Furthermore with NNEDI3CL (set gpuid=0), I get the following error:


SMDegrain call:
Code:
SMDegrain(mode="MDegrain", tr=6, thSAD=600, thSADc=600, thSCD1=550, contrasharp=200, limitS=true, CClip=ORG, LFR=300, DCTFlicker=true, refinemotion=true, truemotion=false, pel=4, subpixel=4, gpuid=-1/0, prefilter=3, chroma=true, plane=4)

NNEDI3 v0.9.4.60 and NNEDI3CL 1.0.4.0 installed.
Source video is 720x576@25.

pel=4 & subpixel=1/2/3 is working without errors.
LeXXuz is offline   Reply With Quote
Old 10th October 2022, 08:33   #1595  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
Ok, I think it has to do with the slated updates on ResizersPack because it's working fine on my internal version.
I've been dawdling a bit but hope to release ASAP.

Currently I was testing the new modes in latest RIFE update, specially useful for the faster modes.
Does anyone got the halos_ghosts_judder clip? I want to pass it through FrameRateConverterMIX.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th October 2022, 10:34   #1596  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,503
@Dogway

Is there a way with the newer Asd-g filter such as RIFE (or anything else) to interpolate frames in reduced real frame material such as anime?

They usually have 23.976 stream fps but the frames are far less, often repeated.

I'd like to match stream fps with "real" frame fps, i.e. replace all duplicated frames with interpolated ones.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 10th October 2022, 10:54   #1597  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
Did you try with "RIFEAnime" preset? I haven't checked though, as I implemented as MysteryX dictated, but I'm currently testing with some live action samples and I don't like the masking logic.

The masking logic treats RIFE as a fallback for MFlowFps ver.1 and MFlowFps ver.2 difference mask. This means, if both match (regardless a match of crap blending or not) the ver.1 is chosen.

I'm now going to reformulate that to pass RIFE always on high motion areas with a motion mask, and then fallback to above logic where RIFE might also be used when both MFlowFps versions don't match.

I want to test this with the halos_ghosts_judder clip. But I think it might also work with Anime, I will give it a look.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 10th October 2022 at 11:19.
Dogway is offline   Reply With Quote
Old 10th October 2022, 12:40   #1598  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,133
Quote:
Originally Posted by Dogway View Post
Did you try with "RIFEAnime" preset? I haven't checked though, as I implemented as MysteryX dictated, but I'm currently testing with some live action samples and I don't like the masking logic.

The masking logic treats RIFE as a fallback for MFlowFps ver.1 and MFlowFps ver.2 difference mask. This means, if both match (regardless a match of crap blending or not) the ver.1 is chosen.

I'm now going to reformulate that to pass RIFE always on high motion areas with a motion mask, and then fallback to above logic where RIFE might also be used when both MFlowFps versions don't match.

I want to test this with the halos_ghosts_judder clip. But I think it might also work with Anime, I will give it a look.
If it's bug with live action, you can report to Asd-g
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 12:43   #1599  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
No, it was a problem with FrameRateConverter, but to be honest, I don't see a point on it anymore. RIFE is mostly always better than FRC, and when not the huge performance drop of FRC isn't worth it.

I made a wrapper for RIFE, will add soon to ResizersPack.

Code:
#
# OpticalFlowRIFE()
#
# Wrapper around RIFE port by Asd-g
#
# Dependencies:
#       RIFE
#       ExTools
#       TransformsPack
#
function OpticalFlowRIFE(clip a, int "model", int "FrameNum", int "FrameDen", bool "FrameDouble", bool "Anime", int "gpuid") {

    isy    = isy   (a)
    rgb    = isRGB (a)
    rgbp   = isPlanarRGB (a)

    numD   = Defined(FrameNum)
    denD   = Defined(FrameDen)

    num    = propNumElements (a,"_DurationDen") > 0 ? \
             propGetInt      (a,"_DurationDen") : FrameRateNumerator(a)
    den    = propNumElements (a,"_DurationNum") > 0 ? \
             propGetInt      (a,"_DurationNum") : FrameRateDenominator(a)
    fs     = propNumElements (a,"_ColorRange" ) > 0 ? \
             propGetInt      (a,"_ColorRange" ) == 0 : rgb

    pID    = color_propGet(a)
    bi     = pID[7]
    pri    = pID[2]
    mat    = "PC"+pri
    isHD   = (width (a)  > 1099 || height(a)  > 599)

    ver = VersionString()
    Assert(Eval(MidStr(ver,FindStr(ver,"(r")+2,4))>=Eval("3689"),"OpticalFlowRIFE: Update AviSynth+ version")

    num    = Default(FrameNum,     num)
    den    = Default(FrameDen,     den)
    md     = Default(model,         22)                        # model: 3 - for Anime or lineart, 17,6,22 - for photos or live action (in ascending order of qual/speed)
    fd     = Default(FrameDouble, !(numD || denD))
    an     = Default(Anime,      false)
    gid    = Default(gpuid,          0)

    ConvertBits(a, 32, fulls=fs, fulld=true)
    rgb ? rgbp ? last : ConvertToPlanarRGB() : isy ? MergeRGB(last,last,last) : ConvertToPlanarRGB(matrix=mat,chromaresample="lanczos4")

    RIFE(model=fd ? md : max(md,9), sc=true, skip=an, fps_num=fd ? Undefined() : num, fps_den=fd ? Undefined() : den, tta=false, gpu_id=max(0,gid), gpu_thread=isHD ? 4 : 2)

    isy  ? ExtractR()                                               : \
    !rgb ? MatchClip(a,matrix=pri,size=false,props=false)           : last
    fd   ? Interleave(a.propSet("_DurationDen",den*2), SelectOdd()) : last

    propCopy(a,true,props=["_DurationNum","_DurationDen","_PictType"], exclude=true) }
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 15th October 2022 at 22:34.
Dogway is offline   Reply With Quote
Old 10th October 2022, 13:38   #1600  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,503
Quote:
Originally Posted by Dogway View Post
But I think it might also work with Anime, I will give it a look.
Please keep us informed and, when ready, show us some script examples.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

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 09:23.


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