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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd February 2023, 16:20   #281  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 53
Why am I getting this error?

Both clips should have the same colorspace!
(C:/Program Files (x86)lAviSynth+/plugins64+/TemporalDegrain-v2.6.4.avsi, line 441)
(C:/Program Files (x86)lAviSynth+/plugins64+/TemporalDegrain-v2.6.4.avsi, line 395)

Source: MPEG2, 720x576, YUV420

Full script:
Code:
video_org=FFmpegSource2("../00000.m2ts", atrack=-1)
	crop_left=12	# | rimozione esatta delle bande nere sinistra, sopra, destra e del disturbo sotto	
	crop_top=2	# | 720-(12+16)x576-(2+14)=692x560
	crop_right=16
	crop_bottom=14
video_org_crop=video_org.crop(crop_left,crop_top,-crop_right,-crop_bottom)

video_org_crop_adj=video_org_crop.ColorYUV(off_u=+12, off_v=-6)

### de-interlacing
deinterlaced=video_org_crop_adj.AssumeTFF().QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, tr1=2, tr2=1, NoiseTR=2, sharpness=0.1)

### convert to YV16
deinterlaced_yv16=deinterlaced.convertToYV16()

### denoising
denoised_yv16=deinterlaced_yv16.TemporalDegrain2(degrainTR=3)

### convert to YUY2
denoised=denoised_yv16.convertToYUY2()

### convert to YV12
denoised_yv12=denoised.convertToYV12()

### sharpening
sharpened_yv12=denoised_yv12.LSFmod(defaults="slow")

### convert to YUY2 with chroma from YUY2 color space
sharpened=sharpened_yv12.convertToYUY2().MergeChroma(denoised)

### add borders
video_restored=sharpened.addborders((crop_left+crop_right)/2,(crop_top+crop_bottom)/2,(crop_left+crop_right)/2,(crop_top+crop_bottom)/2)

return(video_restored)
rgr is offline   Reply With Quote
Old 22nd February 2023, 17:11   #282  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 53
Quote:
Originally Posted by ErazorTT View Post
Feb 11, 2023: v2.6.4
- always undot before postFFT stage, increasing FFT efficiency by quite a bit when degrain was disabled
- mention suggested settings inside the script file
In the new version I get this error:

Both clips should have the same colorspace!
(C:/Program Files (x86)lAviSynth+/plugins64+/TemporalDegrain-v2.6.4.avsi, line 441)
(C:/Program Files (x86)lAviSynth+/plugins64+/TemporalDegrain-v2.6.4.avsi, line 395)

Rolling back to 2.6.3 solves the problem.
rgr is offline   Reply With Quote
Old 24th February 2023, 19:24   #283  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
Yes, I just updated the file. Should be fixed now.
ErazorTT is offline   Reply With Quote
Old 25th February 2023, 21:22   #284  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
I found that there is a wierd inconsistent chroma shift for 420 sources. It can be upto half a pixel. Which means that when resized onto the luma, it will be twice of that.
From my investigation I found that it comes from mvtools MDegrain. I reported it here, you can take a look of the magnitue of the deviation there.

I thus decided to go back to a single degrain step for the chroma. I think this is the best compromise in total.
This halfs the shift introduced by mvtools, which I think is good enough. And it gives quite some speed increase, at the expense of a slightly less clean chroma.
For the paranoid among us, a complete the circumvention of the chroma shift bug can be enabled by the flag "degrainAvoidChromaShift", but that is relatively expense at 10% performance cost.

Also, if it is really necessary to clean the chroma more, which should be rather rarely, both degrains steps can be enabled for the chroma by the flag "degrainChromaTwoStep". This will however also enable the relatively expensive circumvention of the bug.

Last edited by ErazorTT; 28th February 2023 at 18:09.
ErazorTT is offline   Reply With Quote
Old 3rd March 2023, 01:58   #285  |  Link
karthauzi
Registered User
 
Join Date: May 2021
Posts: 3
thanks for v2.6.6! Can it ported in G41fun.py Vapoursynth? Its actually v2.6.3

I have abolutely no Idea how to do this, even with googling, maybe i only need to adjust some lines? they are very different AVS and VS codelines.

Can you have a look into my G41Fun.rar to show us how to adjust it, so i can use v2.6.6?

Im using Staxrip and i already just Copy & Pasted the entire TemporalDegrain2 code from another G41fun.py into this one and replaced it from an old v2.4.3?. Improvising


https://drive.google.com/file/d/1uPa...ew?usp=sharing


Greetings

Last edited by karthauzi; 3rd March 2023 at 02:08.
karthauzi is offline   Reply With Quote
Old 14th March 2023, 00:01   #286  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
I'm Trying the filter for the first time, i get an error (for a change) (tried v2.6.2 and v2.6.3 aswell)

Quote:
avisource
convertoyv12()
TemporalDegrain2("CUDA"=false)
script error expected a , or )
Mounir is offline   Reply With Quote
Old 14th March 2023, 00:09   #287  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Mounir View Post
I'm Trying the filter for the first time, i get an error (for a change) (tried v2.6.2 and v2.6.3 aswell)

Code:
avisource
convertoyv12()
TemporalDegrain2("CUDA"=false)
script error expected a , or )

CUDA=false , no ""

Code:
TemporalDegrain2(CUDA=false)
poisondeathray is offline   Reply With Quote
Old 14th March 2023, 03:29   #288  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by Mounir View Post
I'm Trying the filter for the first time, i get an error (for a change) (tried v2.6.2 and v2.6.3 aswell)



script error expected a , or )
Cuda parameter only use with postFFT=5. You can use without postFFT=5 but that parameter no meaning when don't set postFFT=5
kedautinh12 is offline   Reply With Quote
Old 25th September 2023, 02:34   #289  |  Link
Drommer
Registered User
 
Join Date: Jul 2023
Posts: 5
Hi. Is there any solution to the problem of color loss and artifacts when switching scenes? I saw in the manual about DCT, but it doesn't help and sometimes makes it worse.
I really like this filter. I have already found the optimal settings and transcode a few videos. Very reluctant to try anything else.
Drommer is offline   Reply With Quote
Old 25th September 2023, 05:06   #290  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by Drommer View Post
Hi. Is there any solution to the problem of color loss and artifacts when switching scenes? I saw it in the manual about DCT, but it doesn't help and sometimes makes it worse.
I really like this filter. I have already found the optimal settings and transcribed a few videos. Very reluctant to try anything else.
I think it's related to banding colors after denoising, I think you can try parameter postFFT=3 or 4 or 5 to avoid banding. If banding continues after use 3, 4, and 5, you can try debanding with neo_f3kdb or gradfun3plus with 16bit

Example:
Code:
* Denoiser scripts
ConvertBits(16)
GradFun3plus(thr=0.25, radius=10, mask=2, smode=0,UV=1)

Last edited by kedautinh12; 25th September 2023 at 05:16.
kedautinh12 is offline   Reply With Quote
Old 25th September 2023, 13:29   #291  |  Link
Drommer
Registered User
 
Join Date: Jul 2023
Posts: 5
Quote:
Originally Posted by kedautinh12 View Post
I think it's related to banding colors after denoising
No, it's not about banding. This problem was discussed two pages ago. The last frame of the previous scene and the first frame of the next scene have distorted colors and spots. In this case (screenshots below) both processed frames go to cold tones, the second frame also has a small pink spot right of the door that gets bigger as the grainLevel increases.

https://imgsli.com/MjA5MTQx
https://imgsli.com/MjA5MTQy

P.S. My line: grainLevel=0, meBlksz=4, postFFT=4. I have also tried postFFT=0 and other options, but it has no effect.

Last edited by Drommer; 25th September 2023 at 13:32.
Drommer is offline   Reply With Quote
Old 26th September 2023, 01:52   #292  |  Link
Drommer
Registered User
 
Join Date: Jul 2023
Posts: 5
Just in case, I checked the script version - everything is fine, 2.6.6. I also update all other components the script might depend on.

I went back to the discussion on the previous pages and noticed a post where the problem was solved by changing the values of ppSCD1 and thSCD2. This works, but I had to reduce the values to ppSCD1=2 and thSCD2=80. I think such an extremely low value would lead to false positives within the same scene. Am I the first to experience this problem after the fixes in version 2.3.3?

UPD 27/09. I did some more tests. I tried using the SceneCutSelectClip function, which (as I understand it) uses the same mechanism of searching and comparing frames. With default settings (thSCD1=400, thSCD2=130) scene change detection works correctly.

Last edited by Drommer; 27th September 2023 at 01:28.
Drommer is offline   Reply With Quote
Old 27th September 2023, 01:30   #293  |  Link
Drommer
Registered User
 
Join Date: Jul 2023
Posts: 5
I found a bug when using postFFT=4 (KNLMeansCL). The devId variable is ignored because it is not specified in the function call. It is necessary to fix line 513 as follows:
Quote:
output = KNLMeansCL(temp, a=a, d=d, h=strength, device_id=device_id, channels=channels)
Drommer is offline   Reply With Quote
Old 5th January 2024, 14:47   #294  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
So this is mainly visible on skin colors, right? This is at least what I get from your screenshots. I will try to find examples myself.

Concerning the SCD values. By driving them down you basically disabled the scene change detection for MVTools. This also suggests that it is an issue related to MDegrain. If thats the case, I fear there is not much that can be done, apart from informing the creators of MVTools.

Oh, and I pushed a new version which fixes the forwarding of the device_id for KNLMeans.
ErazorTT is offline   Reply With Quote
Old 29th February 2024, 13:19   #295  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 53
Are there any plans to fix issues like the one at the top of this screenshot?

rgr is offline   Reply With Quote
Old 1st March 2024, 03:25   #296  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 184
Quote:
Originally Posted by rgr View Post
Are there any plans to fix issues like the one at the top of this screenshot?

Uhm, you want to crop black bars before denoising...
takla is offline   Reply With Quote
Old 1st March 2024, 03:46   #297  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
That probably has more to do with QTGMC. Use border=true
poisondeathray is offline   Reply With Quote
Old 1st March 2024, 08:47   #298  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
Quote:
Originally Posted by rgr View Post
Are there any plans to fix issues like the one at the top of this screenshot?
Well, I‘ve never seen this before, and I myself am using this plugin on an almost daily basis. So, no until now it was not planned to fix this, since I was not aware of this issue.
Might that be the cause:
Quote:
Originally Posted by poisondeathray View Post
That probably has more to do with QTGMC. Use border=true
And if not, what kind of source is it? Is it interlaced and what other plugins are you using?
ErazorTT is offline   Reply With Quote
Old 1st March 2024, 11:55   #299  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 53
Quote:
Originally Posted by takla View Post
Uhm, you want to crop black bars before denoising...
Sometimes this is impossible (e.g. image with borders)

Quote:
Originally Posted by poisondeathray View Post
That probably has more to do with QTGMC. Use border=true
QTGMC is resistant to this (the problem appeared after adding TD2). I think I even saw a workaround for this in the QTGMC code, but I'm not sure.

Quote:
Originally Posted by ErazorTT View Post
Well, I‘ve never seen this before, and I myself am using this plugin on an almost daily basis. So, no until now it was not planned to fix this, since I was not aware of this issue.
Might that be the cause: (QTGMC)

And if not, what kind of source is it? Is it interlaced and what other plugins are you using?
Source: progressive(*), after QTGMC (InputType=1)

Last edited by rgr; 1st March 2024 at 14:46.
rgr is offline   Reply With Quote
Old 1st March 2024, 12:33   #300  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Quote:
Originally Posted by rgr View Post
Source: interlaced, after QTGMC (InputType=1)
InputType=x expects progressive input, it is not for deinterlacing.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Reply


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 17:07.


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