Log in

View Full Version : Suggestion to Improve/Denoise a grainy VOB?


yunapolaris
29th March 2012, 04:57
Hi guys,
I'm trying to learn some scripts to improve videos which is very grainy from the source (DVD)
Here is an sample of the VOB ripped from DVD:
http://www.mediafire.com/?sk60eas7tsroajw

I tried with this script: (I skip the 'Loadplugin...' part to shorten the scrip to post in here)


ColorMatrix(hints=true, threads=0)
#deinterlace
#denoise

ConvertToYV12

FFT3DFilter(sigma=6,plane=3,bw=32,bh=32,bt=3,ow=16,oh=16)

DeBlock(quant=35)

DeGrainMedian(LimitY=5,LimitUV=7,mode=0)

aWarpSharp(depth=16,cm=1)

DeHalo_Alpha()

dull=last
sharp=dull.LimitedSharpenFaster(SMode=4,Strength=150)
Soothe(sharp,dull,25)
crop( 0, 56, 0, -48,align=true)

LanczosResize(720,400) # Lanczos (Sharp)

ChangeFPS(29.97)
Tweak(hue=0.0,sat=1.2,bright=0.0,cont=1.0)
Levels(16, 1, 235, 0, 255, coring=false)

However:
The dehalo_alpha : error "there is no function named 'expand' " <<< I put the masktool.dll into System32 folder, it still didn't work. All of the masktool are up to date.
LimitedSharpenFaster <<< didn't work at all.
I wanted to try the MCTemporalDenoise but it returned the "syntax error" , I have no clue how to fix that :(

I must have done something wrong since the script wasn't working, but I can't figure it out by myself, I'm so lost right now :-s

Hope to have some advices & suggestion from you guys,
Thank you in advance! :thanks:

manono
29th March 2012, 08:55
You don't need the ColorMatrix line as you're not going Std-Def<->Hi-Def.
You don't need the ConvertToYV12 line as it's already in YV12.
I see no blocks at all so why use Deblock?
I see no edge enhancement/halos, so why (try and) use DeHalo_Alpha?
You don't need the ChangeFPS line as it's already 29.97fps.
The Levels filter used that way instantly crushes all the blacks and blows out the whites. The levels are already kind of 'iffy' and you made them exponentially worse.

Do you have any idea what these filters do and when they should (and should not) be used?

The rest of the stuff is kind of subjective, but I kind of like the grainy appearance and believe it was probably intentional on the part of the creators. I believe you have 'filteritis' (the tendency of new encoders to overfilter everything).

canuckerfan
29th March 2012, 09:13
^agreed. your source is already pretty good. only thing I would consider doing is some light denoising and light sharpening. that's it.

Taurus
29th March 2012, 11:12
^agreed. :p:p
Just a little degraining (dfttest ?) and some sharpening
and it will look like a young baby popo :D

yunapolaris
29th March 2012, 22:02
You don't need the ColorMatrix line as you're not going Std-Def<->Hi-Def.
You don't need the ConvertToYV12 line as it's already in YV12.
I see no blocks at all so why use Deblock?
I see no edge enhancement/halos, so why (try and) use DeHalo_Alpha?
You don't need the ChangeFPS line as it's already 29.97fps.
The Levels filter used that way instantly crushes all the blacks and blows out the whites. The levels are already kind of 'iffy' and you made them exponentially worse.

Do you have any idea what these filters do and when they should (and should not) be used?

The rest of the stuff is kind of subjective, but I kind of like the grainy appearance and believe it was probably intentional on the part of the creators. I believe you have 'filteritis' (the tendency of new encoders to overfilter everything).
^ For the ColorMatrix, it was there because I was trying to do a 1280x720, instead of the original resolution, but I gave up on that since it's pointless & forgot to delete the line :P
And I'm not gonna lie, I don't know a whole lot about all of the lines, I combine them from here & there in the posts from the other in order to degrain & sharpen the video.
The deblock I always add it on when I work with VOB :") (again, I picked it up from some where), and for De_Halo, since I thought I was doing sharpening & degrain-ing, and from a site I read, there must be some halo appeared, so... ^^"
So I will take out all of the unnecessary lines you pointed out, and you think the Levels is not needed there either? You have some suggestion to improve the 'iffy' levels?
And I thought of the grainy was the intention of the creator too!! but I thought it was just me :o. since not all of the video was grainy, just the part where the singer on the colorful stage. So should I just keep it that way?

^agreed. your source is already pretty good. only thing I would consider doing is some light denoising and light sharpening. that's it.
^ Would you suggest some certain filter to use?

^agreed. :p:p
Just a little degraining (dfttest ?) and some sharpening
and it will look like a young baby popo :D
You have some details of settings I should use for dfttest? I'm kinda still in the dark of which level I should use, since like manono said above, I have the tendency of overdoing things :-s

Thank y'all for all of the advices so far, I do appreciate them since I'm still learning.

manono
29th March 2012, 22:21
You have some suggestion to improve the 'iffy' levels?
I might raise the brightness and lower the contrast a very little bit (followed by some fresh black borders), something like:

Tweak(Bright=2,Cont=0.97,Coring=False)
Crop(0,48,0,-44)
AddBorders(0,48,0,44)

As for the denoising, I admit to being fond of the FFT3DFilter, but at way lower settings for the Sigma, maybe something like shown in the included doc:

FFT3DFilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16)

If your intent is to totally eliminate the noise, you'll need either the stronger settings or a different temporal denoiser. And as you've seen, others prefer different denoisers.

nibus
29th March 2012, 22:35
For light denoising I like using MDegrain via this handly little script:

http://doom10.org/index.php?topic=2178.0

For usage I would suggest starting with:
SMDegrain(tr=1, thSAD=400, blksize=8, RefineMotion=true, Contrasharp=true, overlap=2, pel=1)

If you need stronger denoising, change tr=1 to tr=2 or tr=3. You can also raise thSAD.
If you need a speed boost, change RefineMotion=true to RefineMotion=false.

The ContraSharp option will help retain the details while eliminating grain.

alexx7777
2nd April 2012, 19:08
Hello, Nibus. Please tell me, which means that the parameter "tr"

nibus
2nd April 2012, 21:42
Hello, Nibus. Please tell me, which means that the parameter "tr"

tr
[int: 1, 2, "3", 4, 5, 6, ...]

Temporal radius. Select between MDegrain 1, 2, 3, 4, 5 or 6. Higher is better, but also much slower and improvements get less drastic.
This can be considered the strength of the denoising. tr 4, 5 and 6 (limit is tr=128 for non-interlaced) require Dither's MVTools2 mod.

Basically the higher the number the higher the denoising strength. I like tr=2 for medium-heavy grain.

alexx7777
2nd April 2012, 22:31
Thank you, Nibus

yunapolaris
7th April 2012, 05:57
I've been caught up too much in work to do anything, but I am making progress and trying all of your suggestion above. So far I like what I see with manono's suggestion.
I will keep reporting back .
Thank you very much for all of your help!

yunapolaris
11th April 2012, 05:01
For light denoising I like using MDegrain via this handly little script:

http://doom10.org/index.php?topic=2178.0

For usage I would suggest starting with:
SMDegrain(tr=1, thSAD=400, blksize=8, RefineMotion=true, Contrasharp=true, overlap=2, pel=1)

If you need stronger denoising, change tr=1 to tr=2 or tr=3. You can also raise thSAD.
If you need a speed boost, change RefineMotion=true to RefineMotion=false.

The ContraSharp option will help retain the details while eliminating grain.
Hi nibus,
I finally get to try your script today with the SMDegrain. However, I got an error in MeGUI "no function named mt_lut" , I'm not sure how to fix that :scared:

nibus
11th April 2012, 10:00
Make sure you have these two plugins:

MaskTools2 (v2a48 or higher) http://forum.doom9.org/showthread.php?t=98985
MVTools2 (v2.5.11.3 or higher) http://avisynth.org.ru/mvtools/mvtools-v2.5.11.3.zip