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 7th May 2020, 00:28   #1  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
21 grams — Degraining challenge

This is really hard. The entire movie is a mess to degrain, with different films and so.

But this part is a real nightmare.

I went up to MDegrain9 and ThSAD 800 with really poor results.

I need your help.

Enjoy.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th May 2020, 01:45   #2  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Neatvideo is your friend
lansing is offline   Reply With Quote
Old 7th May 2020, 04:02   #3  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
I tried a few different scripts, resizing to 720p first to speed it up, but the scripts seemed to do better at 720p anyway. I don't know how you'd remove a lot of that noise without creating some degree of mush, but the best result was from QTGMC in progressive mode (I'm sure you'll be happy to hear that). I only played with QTGMC's presets, and for some reason slower NoisePreset settings than the default removed less noise. You might be able to improve on it if you mess around with QTGMC's noise removal options. I think this is the first time I've used a value greater than 4 for EzDenoise.

QTGMC(InputType=1, Preset="very slow", EzDenoise=12)

QTGMC InputType_1_ Preset_very slow_ EzDenoise_12 720p.mkv (1.7MB)

Last edited by hello_hello; 7th May 2020 at 04:13.
hello_hello is offline   Reply With Quote
Old 7th May 2020, 07:18   #4  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
Extreme source - extreme filters...

Here is my result:
https://www.sendspace.com/file/4cosmg

My filters (all very retro):
Quote:
RemoveGrain(mode=22)
degrainmedian(mode=2)
undot()
deen()
DenoiseSharpen(mode=22)
asharp(1,4)
RemoveGrain(mode=22)
degrainmedian(mode=2)
undot()
deen()
DenoiseSharpen(mode=22)
asharp(1,4)
Just 1 instance of the filter chain was not enough, so I repeated the whole chain. Doesn't look that bad to me...
manolito is offline   Reply With Quote
Old 7th May 2020, 07:36   #5  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
try STpresso/Spresso then denoise my help
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th May 2020, 08:12   #6  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by manolito View Post
My filters (all very retro):


Just 1 instance of the filter chain was not enough, so I repeated the whole chain. Doesn't look that bad to me...
And I thought I was at risk of causing tormento's head to spin by downscaling my encode to 720p.
hello_hello is offline   Reply With Quote
Old 7th May 2020, 08:18   #7  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Resizing is extreme ratio. On thousand of sources, I did it only twice, if I recall well.

Come on, you can do better than that.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th May 2020, 08:20   #8  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by manolito View Post
Just 1 instance of the filter chain was not enough, so I repeated the whole chain. Doesn't look that bad to me...
Good try but too many details lost.

SMDegrain on extreme settings can do better but not the best.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th May 2020, 08:25   #9  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by real.finder View Post
try STpresso/Spresso then denoise my help
Come on... you can do better than this. At least try some script out of your hat.
__________________
@turment on Telegram

Last edited by tormento; 7th May 2020 at 08:30.
tormento is offline   Reply With Quote
Old 7th May 2020, 08:40   #10  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
How about:
Code:
dfttest(sigma=400)   #try out different sigma, up to 800 …..
smdegrain(tr=9,thsad=1000)
MCDegrainSharp(frames=3)

Last edited by Sharc; 7th May 2020 at 08:58.
Sharc is offline   Reply With Quote
Old 7th May 2020, 08:46   #11  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
The grain is an artistic effect in this case, so I really wouldn't worry about downscaling to 720p if you already change the vision the director had

I challenge you to test if you can spot the difference between a properly downscaled (Bicubic parameters optimized by Zopti) and a non-downscaled version during playback on your TV. You'd be surprised how small or even negligible the difference is for many, many sources. The bitrate savings are quite big..
__________________
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
Old 7th May 2020, 08:46   #12  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Theoretically https://github.com/HomeOfVapourSynth...pourSynth-BM3D should give good results, but I don't get good results. Maybe it is only really good for noise but not for grain.

My try with MLDegrain+smdegrain
https://filehorst.de/d/deJciyII
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 7th May 2020, 08:53   #13  |  Link
SlowDelivery
Registered User
 
Join Date: Apr 2020
Posts: 17
I don't have much experience but recently I've tried a lot of different denoising filters and found MCTemporalDenoise to be good.
This is really slow but gave good results:
Code:
MCTemporalDenoise(settings="very high",thSAD=800,sharp=false,stabilize=false)
SMDegrain(tr=2,thSAD=800)
RemoveDirtMC(5,false)
Picture: https://ibb.co/rMCbMfS

If the above is too slow, perhaps you can try
Code:
MCTemporalDenoise(settings="high",thSAD=800,sharp=false,stabilize=false)
SMDegrain(tr=1,thSAD=800)
RemoveDirtMC(10,false)
Picture: https://ibb.co/K04YKYr
SlowDelivery is offline   Reply With Quote
Old 7th May 2020, 09:01   #14  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
Come on... you can do better than this. At least try some script out of your hat.
maybe later, but IIRC Didée did Degraining source like this before (I remember the video sample was of a man drinking with glass) but I don't know where the link for the post now , anyway IIRC it's done by mdegrain with some strong prefilter

Quote:
Originally Posted by ChaosKing View Post
Theoretically https://github.com/HomeOfVapourSynth...pourSynth-BM3D should give good results, but I don't get good results. Maybe it is only really good for noise but not for grain.

My try with MLDegrain+smdegrain
https://filehorst.de/d/deJciyII
isn't Theoretically BM3D mean MC + 3D Denoiser?
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th May 2020, 09:14   #15  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,729
Quote:
Originally Posted by real.finder View Post
maybe later, but IIRC Didée did Degraining source like this before
This is something that might be interesting. I remembered that he did some tricks with Aliens -- lots of grain but not excessive like 21 grams.
https://forum.doom9.org/showthread.php?t=161413
__________________
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
Old 7th May 2020, 10:31   #16  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
My last attempt:
PHP Code:
SMDegrain (tr=9thSAD=1000refinemotion=falsen16=truemode=0contrasharp=falsePreFilter=4truemotion=trueplane=4chroma=true
Results:

image

video

Quote:
Originally Posted by real.finder View Post
maybe later
I tried to use subpixel=3 option, that uses NNEDI3, but nothing happened. Can you check the SMDegrain script?
__________________
@turment on Telegram

Last edited by tormento; 7th May 2020 at 10:49.
tormento is offline   Reply With Quote
Old 7th May 2020, 11:04   #17  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Code:
Spresso(10,30).STpresso(10,30,4,22,8,49,1,mc=true) #last updates
SMDegrain (tr=6, thSAD=1000, refinemotion=false, mode=0, contrasharp=false, PreFilter=2, truemotion=true, plane=4, chroma=true)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th May 2020, 11:08   #18  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
I tried to use subpixel=3 option, that uses NNEDI3, but nothing happened. Can you check the SMDegrain script?
I don't think it's good to use it with your source, maybe that why it did nothing, anyway IIRC it's for better quality and less detail loss not for remove more grain, and it's seems do nothing for HD source since HD use pel=1 by default
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 7th May 2020, 11:10   #19  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,563
Quote:
Originally Posted by real.finder View Post
I don't think it's good to use it with your source, maybe that why it did nothing, anyway IIRC it's for better quality and less detail loss not for remove more grain, and it's seems do nothing for HD source since it use pel=1
I did not mean it does visually nothing, I mean it doesn't change fps or file size even of a byte, as if it wouldn't be enabled.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 7th May 2020, 11:18   #20  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
"subpixel=3" condition is
Code:
pelclip      = pel>1 && subpixel == 3
so pel needs to be > 1 to use nnedi. otherwise it does nothing, like you said.

see
https://github.com/realfinder/AVS-St...grain.avsi#L88
https://github.com/realfinder/AVS-St...rain.avsi#L212
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 7th May 2020 at 11:22.
ChaosKing 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 10:46.


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