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 February 2017, 13:07   #1  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
The power of Avisynth: new 8mm film restoring examples

Hello everybody,

New film 8mm restoration examples on Vimeo and youtube:

https://vimeo.com/user678523/videos/all/sort:date

https://www.youtube.com/channel/UC_k...CujwT_fZHN6jlg

Please set Vimeo and Youtube player quality to HD if possible.

Used filter chain:

- RemoveDirtSMC()
- GamMac() (wonderful filter, thank you again Stainlesss)
- DePanStabilize()
- Tweak() (6x tweak() separate colors with starthue and endhue)
- RgbAdjust()
- McDegrainSharp()

- Special sharpening:
- UnsharpMask (from WarpSharp) radius 3
- blur
- Unsharpmask radius 2
- blur
- final: Sharpen()

It seems that adding blur between sharpening steps avoids halos.
I buy a Belgian Beer for someone who can show me halos on my example clips


I had to solve a few problems: the newest DePan.dll 1.13.1.0 is very good, no more issues at scene change. But it creates some kind of "raster" effect in the AvsPmod preview. In VDub however, this effect is not there.

After many testings, I discovered that MvTools2 2.5.11.22 (used both in McDegrainSharp and RemoveDirtSMC) was causing the problem. I replaced it with MvTools 2.4.2.0 and the "raster" effect in AvsPmod was gone.

Also, RemoveDirtSMC() was causing problems in AvsPmod when trimming. (frame read errors) This was solved by changing blksize to 16 in MAnalyse.

Anyhow, I'm pretty happy with the results.
Feedback and/or suggestions are welcome as usual

PS: the Vimeo clips can be downloaded in Xvid for further examination


Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 7th February 2017 at 13:13.
videoFred is offline   Reply With Quote
Old 7th February 2017, 14:02   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by videoFred View Post
- Special sharpening:
- UnsharpMask (from WarpSharp) radius 3
- blur
- Unsharpmask radius 2
- blur
- final: Sharpen()

It seems that adding blur between sharpening steps avoids halos.
I buy a Belgian Beer for someone who can show me halos on my example clips
After InGoldie supplication asking how to get rid of oversharpened artifacts, I nearly suggested (jokingly) something like "a bit of Blur might help", not knowing that I could have been absolutely correct.

Fred, can you try MvTools current ie "MvTools2 2.7.14.22 (20170206) with depans" Uploaded Yesterday, see if it displays the raster type effect described, thanx. (Maybe we can get it fixed if so)

I'll down all samples tomorrow, hope the XVid samples are without subs (Anything special you have to do to get the XVid samples ?, Never used Vimeo before)

EDIT:
Quote:
Maybe we can get it fixed if so
OK, looks like AvsPMod problem rather than MVTools, but might be nice to know if problem persists.
Also, What version AvsPMod affected, for devs ?

EDIT: Fred, is there a new version of your script somewhere, latest seems to be dated in 2012 ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th February 2017 at 15:11.
StainlessS is offline   Reply With Quote
Old 7th February 2017, 15:12   #3  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by StainlessS View Post
After InGoldie supplication asking how to get rid of artifacts, I nearly suggested (jokingly) something like "a bit of Blur might help", not knowing that I could have been absolutely correct.
Haha.. intuition doktorrr

Quote:
Fred, can you try MvTools current ie "MvTools2 2.7.14.22 (20170206) with depans" Uploaded Yesterday, see if it displays the raster type effect described, thanx. (Maybe we can get it fixed if so)
Uploaded? Where?

Quote:
I'll down all samples tomorrow, hope the XVid samples are without subs (Anything special you have to do to get the XVid samples ?, Never used Vimeo before)
Simple: just hit the "download" button
Sorry for the subs, I must protect my work.
But I could upload them without subs for you only


Quote:
OK, looks like AvsPMod problem rather than MVTools,
Yes

Quote:
Also, What version AvsPMod affected, for devs ?
2.5.1.0


many greetings,
Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 7th February 2017, 16:23   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Uploaded? Where?
In Avisynth Development, MvTools-PfMod (where current development is in rapid progress):- https://forum.doom9.org/showthread.p...69#post1796069

Quote:
But I could upload them without subs for you only
Yes please, if you would, I would like to reproduce results. [EDIT: I dont have much in the way of good test clips for eg GamMac.]

Quote:
many greetings,
And to you also sir.
Steve.

EDIT: I see that you like MCDegrainSharp, was just an daft idea to see if I understood how to use MvTools, but I use it all of the time now.
Do you use the update one with 'Precise' arg ? any improvement ? [EDIT: I usually dont bother]

EDIT: MCDegrainSharp:- https://forum.doom9.org/showthread.p...rp#post1508635
Precise version a few posts later.

This lot could probably be improved for Precise, (uses blksize=bs/2, overlap=bs/4 in all incantations)
Code:
    backward_vec3 = (Precise) ? MRecalculate(super, backward_vec3, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec3
    backward_vec2 = (Precise) ? MRecalculate(super, backward_vec2, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec2
    backward_vec1 = (Precise) ? MRecalculate(super, backward_vec1, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec1
    forward_vec1  = (Precise) ? MRecalculate(super, forward_vec1 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec1
    forward_vec2  = (Precise) ? MRecalculate(super, forward_vec2 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec2
    forward_vec3  = (Precise) ? MRecalculate(super, forward_vec3 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec3
EDIT: Maybe I should change Precise Bool to int 0->3 (could I suppose do it without breaking scripts, use Var instead of bool
and check internally for either bool or int(0->3) supplied, error if not, and convert bool true to 3 and false to 0)

EDIT: There were some comments later, maybe I also implement what master Feisty2 said.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th February 2017 at 16:47.
StainlessS is offline   Reply With Quote
Old 8th February 2017, 13:45   #5  |  Link
ingoldie
Registered User
 
Join Date: Sep 2014
Posts: 132
@videoFred

Can you post your script?
ingoldie is offline   Reply With Quote
Old 8th February 2017, 16:04   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Quote:
Originally Posted by ingoldie View Post
@videoFred

Can you post your script?
https://forum.doom9.org/showthread.php?t=144271
johnmeyer is offline   Reply With Quote
Old 8th February 2017, 16:17   #7  |  Link
ingoldie
Registered User
 
Join Date: Sep 2014
Posts: 132
I'm talking about script for this

Quote:
Originally Posted by videoFred View Post

Used filter chain:

- RemoveDirtSMC()
- GamMac() (wonderful filter, thank you again Stainlesss)
- DePanStabilize()
- Tweak() (6x tweak() separate colors with starthue and endhue)
- RgbAdjust()
- McDegrainSharp()

- Special sharpening:
- UnsharpMask (from WarpSharp) radius 3
- blur
- Unsharpmask radius 2
- blur
- final: Sharpen()
ingoldie is offline   Reply With Quote
Old 8th February 2017, 19:50   #8  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by ingoldie View Post
I'm talking about script for this
Yes, it's a new script, not ready for publishing. But if you are looking for a solution for your sharpening problem: try blur() between sharpening steps. This is not a joke, that's how I did it.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 9th February 2017, 22:50   #9  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by StainlessS View Post
In Avisynth Development, MvTools-PfMod (where current development is in rapid progress):- https://forum.doom9.org/showthread.p...69#post1796069
Ok, I have tested this version of MVTools and all issues are gone!
Thank you for the hint

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 31st October 2017, 00:30   #10  |  Link
EHarlen
Registered User
 
Join Date: Oct 2014
Posts: 34
Quote:
Originally Posted by videoFred View Post
Used filter chain:

- RemoveDirtSMC()
- McDegrainSharp()
There are two different types RemoveDirtSMC()...

http://forum.doom9.org/showthread.ph...46#post1559146

http://forum.doom9.org/showthread.ph...32#post1699132


and two different types McDegrainSharp().

https://forum.doom9.org/showthread.p...76#post1700776

https://forum.doom9.org/showthread.p...45#post1737045


What type of RemoveDirtSMC() and McDegrainSharp() do you use?


By the way, why do prefer RemoveDirtSMC() instead of RemoveDirtMC()?
EHarlen is offline   Reply With Quote
Old 31st October 2017, 11:10   #11  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Hello EHarlen ,

I have done so many testings in the past.... Probably RemoveDirtSMC() was giving better results than RemoveDirtMC().
But you can try them yourself and see what you get.

I am currently using these versions:

RemoveDirtSMC():

Code:
# FUNCTION RemoveDirtSMC
#============================================================================================================================================.

function RemoveTempGrain(clip clp, int "_mode")
{
  _mode = Default(_mode, 17)

  rg    = RemoveGrain(clp, mode=_mode)

  return TemporalRepair(rg, clp)
}





function RemoveDirtS(clip clp, int "limit", bool "_grey")
{
  _grey   = Default(_grey, false)
  limit   = Default(limit, 6)

  clensed = clp.Clense(grey=_grey, cache=4)
  alt     = clp.RemoveGrain(10)

  return (RestoreMotionBlocks(clensed, clp, alternative=alt, pthreshold=4, cthreshold=6, gmthreshold=40, \
                              dist=1, dmode=2, debug=false, noise=limit, noisy=16, grey=_grey))
}





function RemoveDirtSMC(clip clp, int "limit", bool "_grey")
{
  _grey  = Default(_grey, false)
  limit  = Default(limit, 6)

  super1  = MSuper(clp, pel=2, sharp=2)
  bvec1  = MAnalyse(super1, isb=true,  blksize=16, delta=1, truemotion=true)
  fvec1  = MAnalyse(super1, isb=false, blksize=16, delta=1, truemotion=true)
  backw1 = MFlow(clp, super1, bvec1)
  forw1  = MFlow(clp, super1, fvec1)

  clp    = Interleave(backw1, clp, forw1)
  clp    = clp.RemoveDirtS(limit, _grey).removetempgrain(10)
  clp    = clp.SelectEvery(3, 1)
 
 
  return clp
}
McDegrainSharp():

Code:
function McDegrainSharp(clip c, int "frames", int"strenght",float "bblur", float "csharp", bool "bsrch")
{ # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
  # Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580 
  # "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
  # In areas where MAnalyse cannot find good matches, the blur() will be dominant.
  # In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
  # when the pixel averaging is performed. 
	frames = default(frames, 2)
	strenght = default(strenght,400)
	bblur  = default(bblur, 1.0)
	csharp = default(csharp, 1.0)
	bsrch  = default(bsrch, true)
	
          blocks = 16
          overl = 8
	
	c2 = c.blur(bblur)
	super = bsrch ? c2.MSuper(pel=2, sharp=1) : c.MSuper(pel=2, sharp=1)
	super_rend 	= c.sharpen(csharp).MSuper(pel=2, sharp=1,levels=1)
	backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=blocks, overlap=overl)
	backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=blocks, overlap=overl)
	backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=blocks, overlap=overl)
	forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=blocks, overlap=overl)
	forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=blocks, overlap=overl)
	forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=blocks, overlap=overl)	
	(frames<=0) ? c :\
	(frames==1) ? c2.MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=strenght) :\
	(frames==2) ? c2.MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=strenght) :\
		      c2.MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=strenght)
	return(last)
}
Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 31st October 2017 at 11:18.
videoFred 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 01:00.


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