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 15th July 2019, 20:15   #1281  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by johnmeyer View Post
I was never able to get ANY positive results from Descratch...
Me neither.
manono is offline   Reply With Quote
Old 15th July 2019, 21:20   #1282  |  Link
bassquake
Registered User
 
Join Date: Jan 2007
Posts: 45
Attached 64bit version of Descratch in case want to try it in your 64bit workflow.
Attached Files
File Type: zip DeScratch64.zip (42.5 KB, 81 views)
bassquake is offline   Reply With Quote
Old 17th July 2019, 12:03   #1283  |  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 SnillorZ View Post
I had researched wetgate transfers for emulsion damage.
Only layer scrathes can be made (temporal) invisible with wetgate.
Unfortunately emulsion damage can not be fixed with wetgate.
(See also my turorial on Youtube)

However, if the emulsion damage change for frame to frame, then Removedirt() might remove it.

Otherwise you will have to look for other solutions.

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 17th July 2019, 21:27   #1284  |  Link
minusthebear
Registered User
 
Join Date: Oct 2018
Posts: 10
Quote:
Originally Posted by SnillorZ View Post
Looking to see what your performance numbers are?

e.g. from @Groucho2004's AVSMeter to compare the CPU based script & plugins vs GPU ones

Ok ill try that, but really, the biggest issue is that with 4k video the 32-bit version literally crashes, it fills up the 2gb of ram VirtualDub can access and creates a memory access violation.

Which isnt an issue with 64-bit.

The GPU helps a bit with speed but not much, ill post a comparison though.
minusthebear is offline   Reply With Quote
Old 9th August 2019, 13:22   #1285  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
Hi everyone,

I've only recently stumbled upon all the wonderful stuff you guys have created here when trying to restore some digitized Fuji Single 8 family movies. Unfortunately my dad threw away the original movies after he'd had them restored so I had to make do with the MPG files I extracted from the DVD. After removing duplicate frames and trimming some of the uglier splices I managed to get some pretty decent results with Fred's scripts to start out with and later on with John's scripts.

But of course I wouldn't be posting here if I didn't have any question. From what I read in the threads here GamMac is preferably used with a detect clip as this creates a more subtle / less harsh color correction. Unfortunately I've found that a lot of the movies I'm fixing have whites that are tinged pink-ish. GamMac without a detect clip seems to fix these fine:



with the detect clip the pink tinge remains although not a strong as before:



Of course the easy answer is to just go without the dc, but on some of the other scenes I find the color better with dc. Is this expected behaviour, or am I doing something wrong here? Or should I adjust my workflow and fix the movies scene by scene (not something I'm looking forward to tbh)

Cheers and thanks for creating all these great scripts!

Remco
rjansen1 is offline   Reply With Quote
Old 9th August 2019, 14:32   #1286  |  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 rjansen1 View Post
Hi everyone,
Hi Remco, welcome here

What DC clip have you used?

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 August 2019, 15:34   #1287  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
Quote:
Originally Posted by videoFred View Post
What DC clip have you used?
I used this one from John's version of your script:

Code:
Baseclip = PreBorderFrame.crop(borderV,borderH,-borderV,-borderH,align=true).bicubicresize(W,H)
blank_black = Blankclip(baseclip, width=autolev_bord1,height=autolev_bord1)
blank_white=  Blankclip(baseclip, width=autolev_bord1,height=autolev_bord1, color=$FFFFFF)
Average= baseclip.FredAverage().invert()
over1 = overlay(baseclip,blank_black, x=40,y=300) 
over2 = overlay (over1,blank_white, x=160, y=300) \
        .bicubicresize(width(baseclip)-(al2)*2,height(baseclip)-(al2)*2)
Detect = (al2 >1) ? overlay (Average, over2,x=al2,y=al2) \
         .converttoRGB24(matrix="rec709") : over2.converttoRGB24(matrix="rec709")
I initially left all the settings at their defaults: (Al2 = 20; autolev_bord1 = 50; borderV=10; borderH=10), but I've also experimented with a smaller border. This leaves less of the pink tinge, but it doesn't dissappear.

Cheers,
Remco
rjansen1 is offline   Reply With Quote
Old 9th August 2019, 15:55   #1288  |  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 rjansen1 View Post
I used this one from John's version of your script:
Hmmmm... yes, I must take a closer look at John's version.
Can you upload an example clip?

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 August 2019, 17:17   #1289  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
Quote:
Originally Posted by videoFred View Post
Hmmmm... yes, I must take a closer look at John's version.
Can you upload an example clip?
Yeah, sure. But will be on Sunday as I'm away tonight and tomorrow. What type of clip do you need: couple of seconds of the source AVI?

Cheers,
Remco
rjansen1 is offline   Reply With Quote
Old 10th August 2019, 00:56   #1290  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
There are many versions of "FredAverage" which is used to create the detect clip. This is the version I am using:

AVISynth FredAverage_26_dll_v0.01_20170414.zip

The DLL is dated 4/14/2017.
johnmeyer is offline   Reply With Quote
Old 10th August 2019, 11:45   #1291  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
Ok, found time to prepare two clips:

pink clip
purple clip

Both clips clean up to good white balance without using a DC, and keep the pink/purple tinge with DC.

I'm using FredAverage_25&26_x86_x64_dll_v0.03_20190115

Ciao,
Remco
rjansen1 is offline   Reply With Quote
Old 10th August 2019, 14:31   #1292  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by johnmeyer View Post
There are many versions of "FredAverage"
Not that many versions really,

Code:
FredAverage_26_dll_v0.01_20170414.zip
FredAverage_25&26_x86_x64_dll_v0.02_20190115.zip
FredAverage_25&26_x86_x64_dll_v0.03_20190115.zip

/*
    v0.01, First release. 2.60 only.
    v0.02, 15 Jan 2019. Moved to VS2008, Added Version Resource + v2.58 + x64.
            Added bool arg TV_YUV;
    v0.03, 15 Jan 2019. BugFix version, fixed TV_YUV rounding. # Same day fix
*/
EDIT: The only difference between first and current version (apart from being now v2.58 and x64 versions)
Code:
    TV_YUV,      Default false, If True(And YUV), then photo negative invert around TV levels mid Y(125.5), rather than 127.5.
Default TV_YUV false, same as original v0.01.

TV Levels Y Mid point = (16 + 235) / 2.0 = 125.5. [ Same as (235-16) / 2.0 + 16.0 = 125.5 ]

EDIT: So, for Avs YUV TV_Levels Invert() filter is really a bit wrong, as invert is around 127.5 [0->$FF, $FF->0, $7F->$80, $80->$7F].
Maybe Invert() Filter should have something like TV_YUV arg, default false. [ignored for RGB]

EDIT:
Code:
G1=BlankClip(Width=128,height=64,Pixel_Type="YV12",Color_YUV=$7F8080)
G2=G1.Invert
G3=G2.Invert
B=G1.BlankClip(height=8)
G1=G1.RT_Subtitle("$%02X",G1.RT_YPLaneMin(n=0))
G2=G2.RT_Subtitle("$%02X",G2.RT_YPLaneMin(n=0))
G3=G3.RT_Subtitle("$%02X",G3.RT_YPLaneMin(n=0))
StackVertical(G1,B,G2,B,G3)


Fred Average same as Invert
Code:
TV_YUV=False
G1=BlankClip(Width=128,height=64,Pixel_Type="YV12",Color_YUV=$7F8080)
G2=G1.FredAverage(Invert=true,TV_YUV=TV_YUV)
G3=G2.FredAverage(Invert=true,TV_YUV=TV_YUV)
B=G1.BlankClip(height=8)
G1=G1.RT_Subtitle("$%02X",G1.RT_YPLaneMin(n=0))
G2=G2.RT_Subtitle("$%02X",G2.RT_YPLaneMin(n=0))
G3=G3.RT_Subtitle("$%02X",G3.RT_YPLaneMin(n=0))
StackVertical(G1,B,G2,B,G3)


FredAverage Y=125($7D) TV_YUV=False (same as Invert) [For TV Levels is WRONG-ish]
Code:
TV_YUV=False
G1=BlankClip(Width=128,height=64,Pixel_Type="YV12",Color_YUV=$7D8080)
G2=G1.FredAverage(Invert=true,TV_YUV=TV_YUV)
G3=G2.FredAverage(Invert=true,TV_YUV=TV_YUV)
B=G1.BlankClip(height=8)
G1=G1.RT_Subtitle("$%02X",G1.RT_YPLaneMin(n=0))
G2=G2.RT_Subtitle("$%02X",G2.RT_YPLaneMin(n=0))
G3=G3.RT_Subtitle("$%02X",G3.RT_YPLaneMin(n=0))
StackVertical(G1,B,G2,B,G3)


FredAverage Y=125($7D) TV_YUV=true (TV mid Y = 125.5, 125[$7D]->126[$7E], 126[$7E]->125[$7D] )
Code:
TV_YUV=True
G1=BlankClip(Width=128,height=64,Pixel_Type="YV12",Color_YUV=$7D8080)
G2=G1.FredAverage(Invert=true,TV_YUV=TV_YUV)
G3=G2.FredAverage(Invert=true,TV_YUV=TV_YUV)
B=G1.BlankClip(height=8)
G1=G1.RT_Subtitle("$%02X",G1.RT_YPLaneMin(n=0))
G2=G2.RT_Subtitle("$%02X",G2.RT_YPLaneMin(n=0))
G3=G3.RT_Subtitle("$%02X",G3.RT_YPLaneMin(n=0))
StackVertical(G1,B,G2,B,G3)


EDIT: And just for good measure, (16=$10, 235 =$EB)
FredAverage Y=16($10) TV_YUV=true (TV mid Y = 125.5, 16[$10]->235[$EB], 235[$EB]->16[$10] )
Code:
TV_YUV=True
G1=BlankClip(Width=128,height=64,Pixel_Type="YV12",Color_YUV=$108080)
G2=G1.FredAverage(Invert=true,TV_YUV=TV_YUV)
G3=G2.FredAverage(Invert=true,TV_YUV=TV_YUV)
B=G1.BlankClip(height=8)
G1=G1.RT_Subtitle("$%02X",G1.RT_YPLaneMin(n=0))
G2=G2.RT_Subtitle("$%02X",G2.RT_YPLaneMin(n=0))
G3=G3.RT_Subtitle("$%02X",G3.RT_YPLaneMin(n=0))
StackVertical(G1,B,G2,B,G3)


EDIT:
Code:
    if(invert) {    // invert ?
        if(tvy) {
            ave = int(-(ave_D - 125.5) + 125.5 + 0.5);                              // TV_YUV Y mid = 125.5, invert, and Round
        } else {
            ave = int(ave_D + 0.5) ^ 0xFF;                                          // PC_YUV Y mid = 127.5, symmetrical about 127.5
        }
    } else {
For YUV,
Invert() filter + FredAverage(TV_YUV=false), both mid Y = 127.5, symmetrical about 127.5.
FredAverage(TV_YUV=True), mid Y = 125.5, symmetrical about 125.5.
__________________
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; 10th August 2019 at 16:10.
StainlessS is offline   Reply With Quote
Old 11th August 2019, 10:05   #1293  |  Link
Bernardd
Registered User
 
Join Date: Jan 2012
Location: Toulon France
Posts: 249
Hi Rjansen1,

An other way based on Stainlesss plugins.

I tried quickly my script on your videos. https://forum.doom9.org/showthread.p...28#post1881328

The first seem in accordance with default args :

https://i.postimg.cc/J4NWdYTV/frame-65.png

The secund need spimd args tune and manual spow action, thus with r_spmid = 0.2 , g_spmid = 0.5, b_spmid = 0.8 and g_spow = 0.8 :

https://i.postimg.cc/d07HgLqk/frame-45.png

Last edited by Bernardd; 11th August 2019 at 10:08.
Bernardd is offline   Reply With Quote
Old 11th August 2019, 12:28   #1294  |  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 rjansen1 View Post
Both clips clean up to good white balance without using a DC, and keep the pink/purple tinge with DC.
It is not mandatory (is this good English? ) to use FredAverage() on the DC clip. The idea of using a DC clip is to use a prepared clip before the Gammac analysis. For example, denoising/cleaning/cropping. Only in some cases, for example on scenes with water and blue sky, FredAverage() can help to avoid wrong Gammac() results.

So, in your case, I advice to use a DC clip without FredAverage().

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 11th August 2019, 12:31   #1295  |  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 Bernardd View Post
I tried quickly my script on your videos.
Good results Bernardd! Gammac() gives very similar results.

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 11th August 2019, 14:59   #1296  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
Quote:
Originally Posted by videoFred View Post
Only in some cases, for example on scenes with water and blue sky, FredAverage() can help to avoid wrong Gammac() results.

So, in your case, I advice to use a DC clip without FredAverage().
Thanks, that's good to know. And I think I've seen this on some scenes with water that seem to render better with FredAverage().

@Bernardd: I'll also give your script a go!

Greetings,
Remco
rjansen1 is offline   Reply With Quote
Old 11th August 2019, 15:16   #1297  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
It is not mandatory (is this good English? ) to use FredAverage() on the DC clip.
Just like a native speaker, perfectly good, Fred ol' chap
__________________
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 13th August 2019, 08:27   #1298  |  Link
rjansen1
Remco Jansen
 
Join Date: Aug 2019
Location: Netherlands
Posts: 15
@Bernardd: tried replacing Gammac with your script and found that it gives good results on some scenes, but then again worse results on others. Also it doesn't seem to work multithreaded. Is that correct?

I guess there's no magic bullit and in the end it's a matter of selecting the method that works good for 80% of the movie and fix the other bits using different methods. From what I read that's what you guys do as well

Cheers,
Remco
rjansen1 is offline   Reply With Quote
Old 13th August 2019, 13:23   #1299  |  Link
Bernardd
Registered User
 
Join Date: Jan 2012
Location: Toulon France
Posts: 249
@rjansen1, thanks for you feed back.
For multithread, i do not know.
Bernardd is offline   Reply With Quote
Old 13th August 2019, 13:24   #1300  |  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
Just like a native speaker, perfectly good, Fred ol' chap
Haha I do my best with a little help from.... my friends no I mean Google.

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
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 11:03.


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