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 17th June 2018, 08:04   #221  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Hi,

I use my own solution template ( same one i used for watermark2 plugin ) where i just compile for avisynth+ x64, for GamMatch 0.0.4 i just replaced the DDigit files and updated the compiler file, also had already the resources and versions infos done in my template but updated it and used the infos you provided in yours to credit you more properly than before .

Tested GamMatch quickly and it seems to do the job and gain a few FPS already, but will try to do like for WaterMark2 and try to boost a bit more the performances by training it a bit using PGO, might take a few days since i'm a bit busy with other stuff but I'll post the results here, might serve some others.

Haven't touched GamMac itself for now, the version i use until now is the one released by Groucho2k4, but it's now on my to do list when i will be done with GamMatch ( not sure if you will also port some of the changed code done on GamMac to GamMatch or it the things you modified are not code shared between the 2 plugins that does not need to be modified btw )

Again thanks a lot for all this.

Last edited by Yanak; 17th June 2018 at 08:06.
Yanak is offline   Reply With Quote
Old 22nd June 2018, 16:03   #222  |  Link
JoeSuper8
Registered User
 
Join Date: Aug 2017
Location: New York
Posts: 7
Thanks Fred and StainlessS!

I am going through the scripts linked by StainlessS https://forum.doom9.org/showthread.p...21#post1831521

I noticed two issues that I am having:
1. The text color of the FredFun metrics affects the dampening and resulting colors of the image in the comparison mode, as well as the rectangle colors at the bottom. I changed the color from the default to white and the colors of the image and topmost of three rectangles' color changed in windows 3 and 4 (the bottom half of the screen).

2. By setting FredFun show metrics to false, the dampening effect disappeared, the bottom rectangles disappeared, and the image matched window 2. Setting FINAL to True in FredDB.avs had the same effect where there is no more dampening effect, even if Show was set to True.
JoeSuper8 is offline   Reply With Quote
Old 22nd June 2018, 20:35   #223  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I'll take a peek when I get home.

EDIT: Sure sounds like something is terribly wrong.

EDIT: Might have to wait until tomorrow, I'm a bit dead on my feet.
__________________
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; 22nd June 2018 at 20:59.
StainlessS is offline   Reply With Quote
Old 26th June 2018, 12:11   #224  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
@ Fred,

I've been thinkin bout it a bit, and seems to me that the FredAverge(Invert=true) with overlay thing will
not perform as ideally required.

Firstly, if (as mostly expected) we are using LockChan=1 ie lock to Green channel, then DC green channel
average will be 'tickled' towards 127.5, (where green channel would not normally be touched when LockChan=1
and FredAverage not used), so green channel is actually changed where it would not normally be.

Is it intentional that FredAverage thing modify green channel when using LockChan==1 ???
(I presume that intent is to only dampen R and B modification when Lockchan==1).

EDIT: @ JoeSuper8, sorry for delay, have some difficulty getting time to fix this prob, and also a bit stuck as to how to.
(FredAverage thing will probably have to go and be replaced with something else, arg to GamMac).

EDIT: -ve LockChan complicates things further, kind of wish that they had not been implemented in the first place.

EDIT: Also, does FredAverage dampen only work [EDIT: nearly] properley when LockChan==1, my head hurts
(Green channel pays greatest contribution to luma value, ~59%)

EDIT: Take your time Fred, not expecting any immediate answer here
__________________
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; 26th June 2018 at 12:59.
StainlessS is offline   Reply With Quote
Old 27th June 2018, 17:08   #225  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Took me way longer than expected to test a few things, thanks to Open Office who crashed and never was able to re-open the sheet i had with alll stats collected after many tests... all lost while almost finished...

Anyways, results for this script : https://pastebin.com/AQLQ7AJS

Code:
Original GamMatch x64 :
FPS (min | max | average):      16.41 | 22.65 | 22.47
Time (elapsed):                 00:05:20.426

Recompiled GamMatch x64 :
FPS (min | max | average):      20.66 | 31.33 | 31.10
Time (elapsed):                 00:03:51.531
GamMatch_x64 (Not GamMac!) Dll download + source and solution for VS2017:
https://www67.zippyshare.com/v/5hOp8j4P/file.html

PGO don't bring very much here, Intel compiler can bring a very little plus, from 0.08 to 0.12 FPS on average only for this synthetic test script, but it's not worth it... maybe while activating some specific instructions for recent CPU's it could gain a bit more but I have only a Ivy Bridge CPU so...

Anyways quit happy with the boost, will need to find time to do all those tests again with GamMac_x64 and compare with Groucho's released x64 dll, i doubt there is any gain to get there, Groucho2k4 releases are quite optimized for what i could test before, probably will wait until you make some changes to your code before putting my head again into this
Attached Files
File Type: zip GamMatch_x64.zip (133.3 KB, 72 views)
Yanak is offline   Reply With Quote
Old 27th June 2018, 20:35   #226  |  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
@ Fred,

I've been thinkin bout it a bit, and seems to me that the FredAverge(Invert=true) with overlay thing will
not perform as ideally required.
Perhaps not ideal but I was looking for a solution for this problem:
https://forum.doom9.org/showthread.p...28#post1803528

Quote:
Is it intentional that FredAverage thing modify green channel when using LockChan==1 ???
(I presume that intent is to only dampen R and B modification when Lockchan==1).

No, not intentional, I was only looking for a solution for the R and B channels. I wanted less red and more blue.
Did not realize was a green channel modification too. Anyhow, it looks good by eye

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; 27th June 2018 at 20:53.
videoFred is offline   Reply With Quote
Old 28th June 2018, 05:18   #227  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
OK, F, I'll try get something working, dont hold your breath, (also try fix the original cause thing too).
__________________
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 July 2018, 21:27   #228  |  Link
color
Registered User
 
color's Avatar
 
Join Date: May 2016
Posts: 235
I try to save the script to GaMac.avsi but then I can not open the Avspmod. It says it wrong with the file on line 9, then it crash. Or am I doing it wrong?
__________________
Automatic Colorization
color is offline   Reply With Quote
Old 14th July 2018, 02:20   #229  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
It says it wrong with the file
Well at a guess, maybe should use avs not avsi (avsi for autoload plugins dir), maybe avsi messes up AvsPMod.
Code:
Imagesource("GreenChurch.png",end=0)
#Imagesource("Puppy.png",end=0)
#Imagesource("lennaRed.png",end=0)

ConvertToRGB24.KillAudio
#Spline36Resize(512,384)
O=Last
DC=Last
                           # LINE 9 is empty
#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

 ...
Is the line 9 an AvsPMod line number ?

Does it play in eg MPC-HC or VDub2 ?

Is it script supplied with GamMac_x86_x64_v1.10_dll_20180615 ? [as the snippet in code block above]

What is the exact error message ?
__________________
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 July 2018 at 02:27.
StainlessS is offline   Reply With Quote
Old 14th July 2018, 10:07   #230  |  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
Well at a guess, maybe should use avs not avsi (avsi for autoload plugins dir), maybe avsi messes up AvsPMod.
AvsPmod works fine with .avsi, so it must be something else.

Still holding my breath

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 July 2018, 16:30   #231  |  Link
color
Registered User
 
color's Avatar
 
Join Date: May 2016
Posts: 235
Quote:
Originally Posted by StainlessS View Post
Well at a guess, maybe should use avs not avsi (avsi for autoload plugins dir), maybe avsi messes up AvsPMod.
Code:
Imagesource("GreenChurch.png",end=0)
#Imagesource("Puppy.png",end=0)
#Imagesource("lennaRed.png",end=0)

ConvertToRGB24.KillAudio
#Spline36Resize(512,384)
O=Last
DC=Last
                           # LINE 9 is empty
#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

 ...
Is the line 9 an AvsPMod line number ?

Does it play in eg MPC-HC or VDub2 ?

Is it script supplied with GamMac_x86_x64_v1.10_dll_20180615 ? [as the snippet in code block above]

What is the exact error message ?
Oh, the dll....I must have missed to read the first post. I went to your plugin page and there it was. Okey It works. Thank youl.
__________________
Automatic Colorization
color is offline   Reply With Quote
Old 20th July 2018, 18:26   #232  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 114
A question on GamMatch

Newbie to video restoration, I have a question on GamMatch: why the plugin allows only to mask edges in reference video?

I need to match two video sequences, both having black borders (differing in size) on the edges and "vhs noise" (differing in size) on the bottom.

I thought that for GamMatch it would be better to work with the images exactly in the same position and then I shifted one of the 2, without
removing the noise at the bottom.

I used then the x/y/w/h options of GamMatch to remove borders and noise in reference video.

For a better behaviour of GamMatch, should I also remove noise and borders in the video to be matched, or the algorithm does not care? (in my
experiments I do not see a difference, but I may be wrong)

Thanks!
lollo2 is offline   Reply With Quote
Old 21st July 2018, 10:42   #233  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
NOTE, From Post #66 (where GamMatch first appeared),
Quote:
DC and DC_AVE derived from DC (Good color clip), all others from clip c (BAD color clip, Incl OUTAVE).
Having both clips spatially aligned is not absolutely necessary.
GamMatch only makes histograms similar, so cropping off borders (from both clips) stops those regions from producing messed up histograms.
A little noise reduction on detect clip [maybe eg Blur(0.2) would do], would also stop hi/lo 'sparkles' from taking part in DC histogram.

Best crop Source clip borders, to produce better histogram, but can use the x,y,w,h coords option (or crop, either would do), to eg avoid
some logo on DC clip that is not present in Source clip.

Have successfully used DC single frame (FreezeFrame) to match source clip to that single frame. (Where missing DC frames
compared to Source, but entailed lots of hand editing in script).

EDIT: Me also loves this little demo using both GamMac and GamMatch:- https://forum.doom9.org/showpost.php...&postcount=190


EDIT: And the original version without color cast correction via GamMac (result a bit red as original DC clip):
__________________
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; 21st July 2018 at 11:06.
StainlessS is offline   Reply With Quote
Old 21st July 2018, 13:20   #234  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 114
Thanks for your reply!

Quote:
Having both clips spatially aligned is not absolutely necessary
Right, sorry. I aligned the two clips because I have to replace in a video a bad sequence with a good sequence; I align and then "gammatch"
the good to the bad; I learned now I can do first the "gammatch" without impact.

Quote:
Best crop Source clip borders, to produce better histogram ...
Not sure I understand everyting here, I conclude that is better to crop (mask) also the video to be matched (Source)

Quote:
... Where missing DC frames compared to Source, but entailed lots of hand editing in script).
Yes! The Source is a capture from a damaged tape (lots of missing/inserted frames); DC is a capture of the same program from another
tape (GamMatch needed because different "look").

Matching DC frame by frame to Source to make GamMatch efficient was a nightmare.

In addition, I had to replace damaged frames in DC (i.e. big portion of the frame is white or black) causing GamMatch to fail, with a duplicate
of a good frame; another nightmare.

But the final overall result is good: thanks for your GamMatch plugin!

I also compared GamMatch versus MatchHistogram versus HistogramAdjust versus a Manual Brightness and Contrast Tweak and, in my case,
GamMatch produces the best results (I was not able to include ColourLike in the bench because I always have a Stack Overflow error)
lollo2 is offline   Reply With Quote
Old 21st July 2018, 14:05   #235  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Best crop Source clip borders, to produce better histogram ...
Quote:
Not sure I understand everyting here, I conclude that is better to crop (mask) also the video to be matched (Source)
I just meant that there are two histograms to consider, ie the DC dectection clip, and of the source clip, if source clip has lots
of eg black border, then the histogram is already screwed up, need to remove borders from source clip histogram, ie crop them off.
You can if necessary AddBorders() back again. [EDIT: with resulting borders being probably a better even black than original].

JFYI, Masking is not the same as cropping.
__________________
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; 21st July 2018 at 14:07.
StainlessS is offline   Reply With Quote
Old 21st July 2018, 14:14   #236  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 114
Clear explaination. Thanks!
lollo2 is offline   Reply With Quote
Old 21st July 2018, 16:01   #237  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 114
The results I obtained, FYI

original is the original damaged video
in replace_sequence I replaced the image from a clean video
in replace_sequence_gammatch I used GamMatch on clean video and then replaced the image

clean video is vhs, while damaged video is s-vhs (little little bit more details)



lollo2 is offline   Reply With Quote
Old 21st July 2018, 16:17   #238  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Not sure what you are telling me.
You seem to swap and change description,
Which one is the source that will be modified, and which is the good color clip (DC) which will be used to adjust source.

Judging by provided upper images, I'm guessin' that what you describe as Original is actually the DC clip, and Replace_Sequence is actually the Source clip.
With above interpretation, Note, that white crud at top of upper samples LEFT image (DC clip), will be making the result a little too light. [unless cropping off or using coords on that frame, is it damaged all through video ?].

EDIT: OK, I think I understood correctly.
'Replace_Sequence' frame [MIDDLE frame] is modified to color match 'Original' [LEFT frame] {hopefully not using cruddy area of Original} and then replaces the original 'Original' damage frame. 'Replace_Sequence_Gamatch', [RIGHT frame] is the color matched frame [MIDDLE frame, matched to LEFT frame] used to repair the damaged frame in the source clip.
__________________
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; 21st July 2018 at 16:59.
StainlessS is offline   Reply With Quote
Old 21st July 2018, 16:41   #239  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 114
I apologize: I was not clear, but you understood correctly.

The names and the videos I used are of the final files after replacement and eventually GamMatch operations.

original = damaged video = DC - this is the damaged file where I want to replace a sequence
replace_sequence = Source - this is at the same time the result of the replacement without using GamMatch
replace_sequence_gammatch = GamMatch output - this is at the same time the result of the replacement and the usage of GmaMatch

DC is unchanged in the comparison image, but it has been modified in the script to match frame by frame Source and to remove the
bad frames as the one you mentioned for proper GamMatch operations.

Last edited by lollo2; 21st July 2018 at 16:56.
lollo2 is offline   Reply With Quote
Old 21st July 2018, 17:01   #240  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I thinks we gots it, thanx Commander Straker
__________________
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; 21st July 2018 at 18:59.
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 05:18.


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