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 27th July 2017, 13:05   #161  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Thank you StainlessS

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 22nd August 2017, 21:49   #162  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Here, attempt at implementing Dithering, not sure if I've done it correctly or not.

v1.10Beta:- LINK REMOVED

Someone wanna try it out, has not had much testing, and no idea if removes banding.
Will likely not be able to do anything for several days.

Added, arg to end of args list, ie Bool "Dither"=False.

~Not sure that I've understood how it is implemented in AVS v2.6 standard Levels (took as example).
Took - 127.5 in BLUE as some kind of combined subtract by 0.5 (in standard 8 bit range) and/or some kind of dither centering.
EDIT: Yep, think now some kind of dither centering. [EDIT: dither Biasing, ie dither both + and -, instead of just +)
Code:
void GamMac::SetDitherMap(int in_min,int in_max,int out_min,int out_max,double gamma,BYTE *map) {
    DPRINTF(("SetDitherMap IN"))

    const int scale_in_min = in_min * 256;
    const int scale_in_max = in_max * 256;

    const double orng  = ((double)out_max)-out_min;
    const double round = 0.5 + out_min;
    const int divisor = scale_in_max - scale_in_min + (scale_in_max == scale_in_min);
    const double igam = 1.0/gamma;
    for(int i=(256*256);--i>=0;) {
        double v = double(i - scale_in_min - 127.5) / divisor;
        v = pow(min(max(v, 0.0), 1.0), igam);
        v = (v * orng) + round;
        int val = int(floor(v));                    // Round towards -ve infinity
        if (val > out_max)      val = out_max;
        else if(val < out_min)  val = out_min;
        map[i] = val;
    }
    DPRINTF(("SetDitherMap OUT"))
}
the Dithering
Code:
    if(Dither && !raw_AllBad) {
        if(vi.IsRGB32()) {
            for(y=height;--y>=0;) {
                const int _y = (y << 4) & 0xf0;
                for(x=vi.width;--x>=0;) {
                    const int xx=x*4;
                    const int _dither = ditherMap[(x&0x0f)|_y];
                    dstp[xx+0] = map[2][srcp[xx+0]<<8 | _dither ];
                    dstp[xx+1] = map[1][srcp[xx+1]<<8 | _dither ];
                    dstp[xx+2] = map[0][srcp[xx+2]<<8 | _dither ];
                    dstp[xx+3] = srcp[xx+3];                // copy Alpha
                }
                srcp += pitch;
                dstp += dpitch;
            }
        } else {
            for(y=height;--y>=0;) {
                const int _y = (y << 4) & 0xf0;
                for(x=vi.width;--x>=0;) {
                    const int xx=x*3;
                    const int _dither = ditherMap[(x&0x0f)|_y];
                    dstp[xx+0] = map[2][srcp[xx+0]<<8 | _dither ];
                    dstp[xx+1] = map[1][srcp[xx+1]<<8 | _dither ];
                    dstp[xx+2] = map[0][srcp[xx+2]<<8 | _dither ];
                }
                srcp += pitch;
                dstp += dpitch;
            }
        }   
    } else {
        if(vi.IsRGB32()) {
            for(y=height;--y>=0;) {
                for(x=rowsize;(x-=4)>=0;) {
                    dstp[x+0] = lut[2][srcp[x+0]];
                    dstp[x+1] = lut[1][srcp[x+1]];
                    dstp[x+2] = lut[0][srcp[x+2]];
                    dstp[x+3] = srcp[x+3];              // copy Alpha
                }
                srcp += pitch;
                dstp += dpitch;
            }
        } else {
            for(y=height;--y>=0;) {
                for(x=rowsize;(x-=3)>=0;) {
                    dstp[x+0] = lut[2][srcp[x+0]];
                    dstp[x+1] = lut[1][srcp[x+1]];
                    dstp[x+2] = lut[0][srcp[x+2]];
                }
                srcp += pitch;
                dstp += dpitch;
            }
        }
    }
If someone tries it out, say if gets rid of banding, thanx.
EDIT: lut[256] is 8 bit, map[65536] is 16 bit dither.

EDIT: Finding gamma etc all done in 8 bit, only final rendering done via dither map[]'s, dither will likely be considerably slower,
has to be done [EDIT: map build] for all three channels and at every frame, not only once in constructor, as in eg Levels.

EDIT: Just tried with AVSMeter, on JohnMeyer Parade clip, single clip (ie not multi-stacked), and with metrics OFF.
Dither=False = 150FPS
Dither=True = 30FPS
On 2.4GHz Core2 Quad (~25% CPU, 1 core @~100.0%, either way).

EDIT: Seems to be doing something at least, but I dont have anything exhibiting banding, that I'm aware of.
Top=no dither, 2nd=dither, bot=difference:2nd-Top amplified


Or frame 0,
__________________
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; 15th June 2018 at 15:01.
StainlessS is offline   Reply With Quote
Old 24th August 2017, 01:21   #163  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
If I feed GamMac v1.10 Beta with an 8bit RGB input, it works, but if I try to feed it with 16bit stacked (Dither Tool) or 16bit interleave (HDR Core), it doesn't work.
I think you should add a few parameters, like in f3kdb:

input_mode=1 (stacked) 2 (interleave)
input_depth=8 (8bit) 16 (16 bit)
output_mode=1 (stacked) 2 (interleave)
output_depth=8 (8bit) 16 (16 bit)

Actually, afaik, GamMac supports GamMac(Dither=true) or GamMac(Dither=false), which is quite limiting because it accepts 8bit RGB only (no 16bit input) and outputs 8bit only (no 16bit output), so, even thought it does its calcs in 16bit, an 8bit output would nullify almost any advantage (and bring banding back).
Oh, of course, Dither Tool is the most common way to get 16bit (stacked) in Avisynth and pretty much no one uses HDR Core (16bit interleave), so I wouldn't spend time trying to support it. I think that something like:

input_depth=8 (8bit) 16 (16 bit stacked)
output_depth=8 (8bit) 16 (16 bit stacked)

would be more than enough.
Oh, and by the way, thank you for supporting XP.

Comparison between GamMac with Dither=true and Dither=false


EDIT: Crap, imgur converted it to jpg...
EDIT2: Used thumbsnap, which seems to preserve png.

Last edited by FranceBB; 24th August 2017 at 01:42.
FranceBB is offline   Reply With Quote
Old 24th August 2017, 20:30   #164  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Sorry, I use neither AVS+ nor dither stuff, and dont have any immediate intention of changing that.
The only intent of using dither here, is to not create any banding as a result of GamMac processing,
anyone is welcome to do a 8/16bit in/out mod, there is not really too much code in it really.
(As it currently stands, I did a pretty much complete re-write in about 2 hours [a few months back],
so should not prove too much a challenge).

Quote:
Oh, and by the way, thank you for supporting XP.
Yep, supporting XP is of paramount importance to me, mostly cos thats what I use

EDIT: The full source is supplied in the 1.10beta zip, I might want to make a small change or two but nothing too drastic.

EDIT: Any color (rather than gray) banding example ??? [EDIT: Banding created by GamMac, not banding previously present]
EDIT: Post all three samples, Pre-GamMac, NoDither result, and Dither result. (png please)

EDIT: So far as I know, nobody supports 16 bit Stacked RGB, (well except for my ClipBlend16 which was a mistake as I did not
know that nobody else supports stack16 RGB).
Somebody say if they know otherwise.

EDIT: For Pre-GamMac sample, please use one of below if adding titles, so can crop off text.

Code:
Function Sub(clip c,string Tit,Bool "ShowFrameNo",int "first_frame", int "last_frame",string "font",float "size",int "text_color",
    \ int "halo_color",int "align",int "spc",float "font_width",float "font_angle",Int "BackColor") {
    /*
        Stack Overhead Subtitle Text, with optional FrameNumber shown
        http://forum.doom9.org/showthread.php?p=1813402#post1813402
        Title bar is Round(size+2) pixels hi (default 20).
        Dont use align=4,5,6, better use 1,2,3,7,8,or 9.
    */
    ShowFrameNo=Default(ShowFrameNo,False)      first_frame=Default(first_frame,0)          last_frame=Default(last_frame,c.FrameCount-1)
    font=default(font,"Ariel")                  size=Default(size,18.0)                     text_color=Default(text_color,$00FFFF00)
    halo_color=Default(halo_color,$00000000)    align=default(align,7)                      spc=Default(spc,0)
    font_width=Default(font_width,0)            font_angle=Default(font_angle,0.0)          BackColor=Default(BackColor,$00000000)
    c.BlankClip(height=round(size+2.0),Color=BackColor)
    (ShowFrameNo)
        \ ? ScriptClip("""Subtitle(String(current_frame,"%.0f] ")+"""+Chr(34)+Tit+Chr(34)+String(first_frame,",first_frame=%.0f")+
        \       String(last_frame,",last_frame=%.0f,font=")+Chr(34)+font+Chr(34)+String(size,",size=%.3f")+String(text_color,",text_color=%.0f")+
        \       String(halo_color,",halo_color=%.0f")+String(align,",align=%.0f")+String(spc,",spc=%.0f")+String(font_width,",font_width=%.3f")+
        \       String(font_angle,",font_angle=%.3f)"))
        \ : Subtitle(Tit,first_frame=first_frame,last_frame=last_frame,font=font,size=size,text_color=text_color,halo_color=halo_color,align=align,
        \       spc=spc,font_width=font_width,font_angle=font_angle)
    Return StackVertical(c).AudioDubEx(c)
}
or
Code:
# Stack Overhead RT_Subtitle Text, with optional FrameNumber shown.
Function RtSub(clip c,string Tit, Bool "ShowFrameNo") {
    c.BlankClip(height=20)
    (Default(ShowFrameNo,False)) ? ScriptClip("""RT_Subtitle("%d] %s",current_frame,""""+Tit+"""")""") : RT_Subtitle("%s",Tit)    
    Return StackVertical(c).AudioDubEx(c) 
}
__________________
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; 9th September 2017 at 14:09.
StainlessS is offline   Reply With Quote
Old 7th September 2017, 20:46   #165  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Sub() from post #160 and above post #164, updated (added some more Subtitle args, requires RT_Stats).

EDIT: Added First_frame, Last_Frame args.
__________________
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 September 2017 at 23:08.
StainlessS is offline   Reply With Quote
Old 8th September 2017, 02:56   #166  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Answering post from GamMac predecessor thread:- https://forum.doom9.org/showthread.p...86#post1817786

Will be easier all around (until you become familiar with Avisyth) to convert mp4 to AVI.

CLIP_To_UT_YV12_AVI.cmd (requires Ut_video Codec installed, and FFMPeg, somewhere)
Code:
setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place output file, No terminating Backslash. "." would be same as .bat file
set OUTDIR="D:"

FOR %%A IN (*3gp *.h264 *.vob *.wmv *.asf *.mpg *.m2v *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.y4m *.yuv *.webm) DO (
  %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause
It dont like spaces in file names.

Using, GamMac v1.10Beta from post #164 (and slightly modded script)
Code:
Avisource("clip.mp4.avi")

ConvertToRGB24.KillAudio
#Spline36Resize(512,384)
O=Last
DC=Last

#DC=DC.Blur(1.0)                # Detection Clip (uses source clip if dc not supplied, Denoised or whatever)
#DC=DC.BilinearResize(320,240)  # Test DC not same size as source

LockChan = 1            # Chan for lock to Ave, 0=R, 1=G, 2=B
                        #    -1 = Use LockVal below.
                        #    -2 = LockVal=(RedAve+GrnAve+BluAve)/3.0 for LockVal.
                        #    -3 = LockVal=Median(RedAve,GrnAve,BluAve)
Scale=2
RedMul    = 1.0         # Required Ave multiplier for Red Channel, applied when requesting GuessGamma(reqAve*RedMul), Even applied when LockChan=-1.
GrnMul    = 1.0         #    Same for Green channel. GrnMul even applies when LockChan is Green Channel, etc for chans.
BluMul    = 1.0         #    Same for Blue channel.  Allows tinkering/fine tuning.
Th        = 0.0
LockVal   = 128.0       # Only valid if LockChan == -1
RngLim    = 11
GamMax    = 10.0
Show      = True        # Metrics
Verb      = 5           # Verbocity FULL
SHOWCOORDS= True        # Show Original with Coords
DITHER=FALSE
x =5                    # Coords (for dc Detection Clip)
y =5
w=-5
h=-5

omin=5                  # Output channels minimum (footroom for manual editing).
omax=250                # Output channels maximum (headroom for manual editing).

#Return GamMac(DC,x=x,y=y,w=w,h=h,Coords=True)    # Show Coords only

Scale=0
A_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
A=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
    \ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
    \ dc=DC,
    \ x=x,y=y,w=w,h=h,
    \ omin=omin,omax=omax,
    \ Show=Show,Verbosity=Verb,dither=DITHER)


Scale=1 BluMul=1.0
B_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
B=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
    \ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
    \ dc=DC,
    \ x=x,y=y,w=w,h=h,
    \ omin=omin,omax=omax,
    \ Show=Show,Verbosity=Verb,dither=DITHER)

Scale=2 BluMul=1.0
C_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
C=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
    \ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
    \ dc=DC,
    \ x=x,y=y,w=w,h=h,
    \ omin=omin,omax=omax,
    \ Show=Show,Verbosity=Verb,dither=DITHER)

COORDS=O.GamMac(dc=DC,x=x,y=y,w=w,h=h,Coords=True)
ODC=((SHOWCOORDS)?COORDS.Spline36Resize(width,Height):O)                    # Resize COORDS (Not necessarily the same sizse as source clip)
ODC_TEXT=(SHOWCOORDS)?"Detect Clip with Coords":"Original"
TOP=StackHorizontal(Sub(ODC,ODC_TEXT),Sub(A,A_TEXT))
BOT=StackHorizontal(Sub(B,B_TEXT),Sub(C,C_TEXT))
StackVertical(TOP,BOT)
return Last


# Stack Overhead Subtitle Text, with optional FrameNumber shown
Function Sub(clip c,string Tit,Bool "ShowFrameNo",int "first_frame", int "last_frame",string "font",float "size",int "text_color",
    \ int "halo_color",int "align",int "spc",float "font_width",float "font_angle") {
    /*   http://forum.doom9.org/showthread.php?p=1813402#post1813402
         Title bar is Round(size+2) pixels hi (default 20).
         Dont use align=4,5,6, better use 1,2,3,7,8,or 9.
    */
    ShowFrameNo=Default(ShowFrameNo,False)
    first_frame=Default(first_frame,0)          last_frame=Default(last_frame,c.FrameCount-1)
    font=default(font,"Ariel")                  size=Default(size,18.0)
    text_color=Default(text_color,$00FFFF00)    halo_color=Default(halo_color,$00000000)
    align=default(align,7)                      spc=Default(spc,0)
    font_width=Default(font_width,0)            font_angle=Default(font_angle,0.0)
    c.BlankClip(height=round(size+2.0))
    NSFN=(!ShowFrameNo) ? "" : RT_String(""" %s"),first_frame=%d,last_frame=%d,font="%s",size=%.3f,text_color=$%X,halo_color=$%X,
        \ align=%d,spc=%d,font_width=%.3f,font_angle=%.3f)""",
        \ Tit,first_frame,last_frame,font,size,text_color,halo_color,align,spc,font_width,font_angle)
    (ShowFrameNo)
        \ ? ScriptClip("""Subtitle(String(current_frame,"%.f]"""+NSFN)
        \ : Subtitle(Tit,first_frame=first_frame,last_frame=last_frame,font=font,size=size,text_color=text_color,
         \       halo_color=halo_color,align=align,spc=spc,font_width=font_width,font_angle=font_angle)
    Return StackVertical(c).AudioDubEx(c)
}
__________________
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; 5th October 2017 at 08:49.
StainlessS is offline   Reply With Quote
Old 9th September 2017, 13:44   #167  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Post #164, removed external requirements from Sub() Function. Added BackColor arg.

Code:
Function Sub(clip c,string Tit,Bool "ShowFrameNo",int "first_frame", int "last_frame",string "font",float "size",int "text_color",
    \ int "halo_color",int "align",int "spc",float "font_width",float "font_angle",Int "BackColor") {
    /*
        Stack Overhead Subtitle Text, with optional FrameNumber shown
        http://forum.doom9.org/showthread.php?p=1813402#post1813402
        Title bar is Round(size+2) pixels hi (default 20).
        Dont use align=4,5,6, better use 1,2,3,7,8,or 9.
    */
    ShowFrameNo=Default(ShowFrameNo,False)      first_frame=Default(first_frame,0)          last_frame=Default(last_frame,c.FrameCount-1)
    font=default(font,"Ariel")                  size=Default(size,18.0)                     text_color=Default(text_color,$00FFFF00)
    halo_color=Default(halo_color,$00000000)    align=default(align,7)                      spc=Default(spc,0)
    font_width=Default(font_width,0)            font_angle=Default(font_angle,0.0)          BackColor=Default(BackColor,$00000000)
    c.BlankClip(height=round(size+2.0),Color=BackColor)
    (ShowFrameNo)
        \ ? ScriptClip("""Subtitle(String(current_frame,"%.0f] ")+"""+Chr(34)+Tit+Chr(34)+String(first_frame,",first_frame=%.0f")+
        \       String(last_frame,",last_frame=%.0f,font=")+Chr(34)+font+Chr(34)+String(size,",size=%.3f")+String(text_color,",text_color=%.0f")+
        \       String(halo_color,",halo_color=%.0f")+String(align,",align=%.0f")+String(spc,",spc=%.0f")+String(font_width,",font_width=%.3f")+
        \       String(font_angle,",font_angle=%.3f)"))
        \ : Subtitle(Tit,first_frame=first_frame,last_frame=last_frame,font=font,size=size,text_color=text_color,halo_color=halo_color,align=align,
        \       spc=spc,font_width=font_width,font_angle=font_angle)
    Return StackVertical(c).AudioDubEx(c)
}
__________________
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; 9th September 2017 at 14:09.
StainlessS is offline   Reply With Quote
Old 13th September 2017, 19:25   #168  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I have a big film transfer project and figured it is time to finally add GamMac to my restoration script. I'm using the 5/19/2017 version of GamMac.

The problem is flicker. I saw the earlier post in this thread about flicker and have tried all the th, loTh, and hiTh settings, but they don't do enough. My "solution" at this point is to move the Deflicker plugin to the very end of my restoration chain. That seems to calm things down enough that I can proceed with this project.

These are the GamMac overrides that I feed to GamMac in both my film restoration script, and with the GamMac.avs script that comes with the plugin:

#GamMac Parameters
LockChan = 0
LockVal = 128.0
Th = 0.1
Scale = 1
RedMul = 1.0
GrnMul = 1.0
BluMul = 1.0

LockChan and Scale are the only two I have altered (I got better results working off the red channel).

Here is a link to a short test file that generates a fair amount of flicker on two different scenes:

Test Clip

I am probably missing some obvious setting.
johnmeyer is offline   Reply With Quote
Old 14th September 2017, 00:39   #169  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
John, LemMotlow seems less that enthused by the thing, perhaps also seek advise there.

Suggest that some kind of blur involved and also try whatever thresh, after that probably best guy is the guy, ie Frederick.

I've already stated that I aint got no idea when it comes to color correction, Ich bin ein shitbag @ der color correction.

For those that dont speak perfect high German, I aint too good.
__________________
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; 14th September 2017 at 01:41.
StainlessS is offline   Reply With Quote
Old 14th September 2017, 01:04   #170  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
StainlessS,

I think you may have gotten the wrong impression from my last post. To be clear: I am totally enthused by GamMac, and spent quite a bit of time today incorporating it into my film restoration script as a permanent replacement for the lousy auto-color I had before. No auto color is going to work all the time but, from my perspective, du bist ein wunderkind when it comes to auto color correction. This is the best auto-color plugin I've used.

I am still going to do two restorations: one with auto-color correction and one without, and then skim through the 5-10 hours of footage and cut between the two, as needed, using Vegas' multi-cam function. Every element of movie film restoration requires occasional manual overrides, and this is no exception. All I was hoping for was a way to diminish the amount of flicker I was getting, especially on scenes with moving specular highlights, like the harsh reflections of the moving water in the swimming pool. Other scenes have little or no flicker.

Maybe VideoFred has some ideas. I tried to read through all the posts he has made about his use of GamMac, but I may have missed a few things.
johnmeyer is offline   Reply With Quote
Old 14th September 2017, 01:27   #171  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Sorry John. been having to deal with people (well drunk scum much like me) in local boozer.
If flickering, then suggest Blur or denoise DC clip, should work well.
With Scale=2, any single extreme pixel could cause flicker, Blur would negate effect.
Scale=2 is extreme measure anyway, can produce good results but if noise pixels can also produce flicker.


Sorry, when I'm sober, I skim read and so sometimes make mistakes in understanding (crap eyes, hate reading), when drunk,
I hate it less, but still dont see any better (kinda used to it, expect it, and so less of a prob, however no fewer mistakes).

Fred will keep you right, I feel sure of that.

The guy from Gent is a gent from Gent, (almost poetic) and his name is Fred the Poet.

(Come on, Fred and Gent, some ammo there for one or two Limericks).

Gone to bed John, I'll see you in my deams , ta ta.
I have weird screwed up nasty dreams, and John, you are in all of them, go figure.
[I do wish RaffRiff would appear more in my dreams, (or at all), I'd love to give him a good slap, wipe that smug grin off of him face].
'Time for bed' said Florence, 'Boing' said Zebedee.
__________________
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; 14th September 2017 at 11:36.
StainlessS is offline   Reply With Quote
Old 14th September 2017, 02:30   #172  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Wow, sounds like you were on quite a pub crawl.

I'll try the blur or denoise on the clip, although it is already denoised via MDegrain and RemoveDirt, so the grain and dirt should not be the issue. As I said above, I think it has something to do with the specular highlights on the snow and swimming pool water. Other scene are pretty stable. I provided that 5-second clip (which has NOT been denoised) to see if perhaps it would provide a clue about what is going on.

Limericks are my favorite. I'l use your excellent opening line:
There once was a fine gent from Gent,
Whose passion was usually spent,
On film and restoring,
Which no one found boring,
Especially StainlessS from Kent.
Please move to Kent so my limerick makes sense.

Now I'll really be in your head. (heh, heh ...)
johnmeyer is offline   Reply With Quote
Old 14th September 2017, 11:21   #173  |  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
The guy from Gent is a gent form Gent, (almost poetic) and his name is Fred the Poet.

(Come on, Fred and Gent, some ammo there for one or two Limericks).
Haha working on it.....
__________________
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 14th September 2017, 11:38   #174  |  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 johnmeyer View Post
StainlessS,
This is the best auto-color plugin I've used.
Yes it is, I'm using it all the time now. Actualy it's a auto-levels plugin but because it works on R,G and B indiviual it's correcting colors too.

Quote:
All I was hoping for was a way to diminish the amount of flicker I was getting, especially on scenes with moving specular highlights, like the harsh reflections of the moving water in the swimming pool. Other scenes have little or no flicker.

Maybe VideoFred has some ideas. I tried to read through all the posts he has made about his use of GamMac, but I may have missed a few things.
I have solved this completely by creating a modified "detect" clip. On this clip, I have added a colored border. That color is created with FredAverage(). Another StainlessS brew

I'm not at home now, but I will post a few examples as soon as possible.

In the mean time, can you upload a few problematic scenes John?

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 14th September 2017, 15:03   #175  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Quote:
Originally Posted by videoFred View Post
...

I have solved this completely by creating a modified "detect" clip. On this clip, I have added a colored border. That color is created with FredAverage(). Another StainlessS brew ...

In the mean time, can you upload a few problematic scenes John?

Fred.
I did provide a link in #168 to a five second clip. Here is that link again:

Test Clip

I'll look and try to find the FredAverage() code and colored border. I did know that you were adding some sort of border, much as you did in your earlier scripts to keep Autolevel() from being fooled. However, I don't think I've seen your code for this particular fix. I'm pretty sure that my problem is the same as what you have already solved, so I'll try to, once again, duplicate your work.

[edit] I just found your original Average() code, but can't yet get it to work. It simply gives me a perfectly gray box, no matter what the input. I'm in YV12 colorspace at the point in the clip where I used it.

Code:
 Average = baseclip.ScriptClip(""" u=round(AverageChromaU()) v=round(AverageChromaV()) BlankClip(last, color_yuv=65536*128 + 256*u + v) """).invert()
I'll keep on working, although the Deflicker got me to the point where I can finish the current project, and I have a deadline, so I may not get back to this right away.

[edit2]Looks like FredAverage() is gone from StainlessS Sendspace downloads. I'll see if I can come up with something on my own. Your idea is a good one, but I can't get any of the code to work, and the custom DLL is gone.

Last edited by johnmeyer; 14th September 2017 at 15:28.
johnmeyer is offline   Reply With Quote
Old 14th September 2017, 17:15   #176  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
FredAverage upped to SendSpace, is always available on MediaFire (next to SendSpace link). SendSpace packages disappear
if not downloaded for 30 days.

x64 bit version available via Groucho2004 repository.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 14th September 2017, 18:35   #177  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Ah, you know I never noticed that they were two separate links. Perhaps the ::: should be and "or". I did see the 64-bit Groucho2004 version, but am not yet running AVISynth on my 64-bit O/S.

Thanks!
johnmeyer is offline   Reply With Quote
Old 14th September 2017, 19:58   #178  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Ahem
https://forum.doom9.org/showthread.p...37#post1743237

Added "AND/OR" between links as suggested, thank you.

The x64 comment was for anyone interested.
__________________
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; 14th September 2017 at 20:08.
StainlessS is offline   Reply With Quote
Old 14th September 2017, 22:05   #179  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Quote:
Originally Posted by StainlessS View Post
Well, some people can be taught ... apparently, I am not one of them.
johnmeyer is offline   Reply With Quote
Old 5th October 2017, 09:00   #180  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Anybody object to my removing Beta from v1.10 ?, then can update first post to that version with dithering.
Anybody any problems, anybody tried it ?
__________________
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 ???
StainlessS is offline   Reply With Quote
Reply

Tags
color cast, correction, fade, gamma

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 00:29.


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