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 19th July 2019, 20:47   #1  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Correcting a film that was developed with a colour fault

Hello all,

First post - please be gentle...

I've been lurking on this forum for nine years now, lured in by videoFred's impressive early results. I want that, I thought, and got going getting my workflow together. Now, after many successfully restored super-8 films, I've run into the first clip that I can't get right whatever I do, and I'd appreciate help.

The clip concerned is an almost 40-second super-8 film scene with very little movement of either camera or subject, and with plenty of issues that I can work out - but one that I cannot. The original is here:
clip 1: original
http://www.vandoorn.tv/doom9/022.avi

The problem gets more pronounced after I run my usual set of correction tools over it. The original has a lot of yellow discolouration, for instance, and removing that alone already makes the problem more obvious. For the sake of completeness, this is the clip of the original and (currently) final versions side-by-side:
clip 2: original vs final
https://youtu.be/Zojgq3XvAMM

It seems like the sun appears and disappears several times. That, however, is not so. The change in colour from cold to warm and back affects the entire image; it's not as if clouds were moving. What happened is, in fact, an error during film development. I looking to even it out over the entire run. And I don't know how to go about it.

What follows is where I've come to (which may be a wrong way to go about it, but if it usable then I'm stuck anyway). My thinking was that I'd create a clip in parallel that contains an averaged-out colour (which I made in Photoshop). The changes in that average should then be a measure of the correction I need to apply. The average-clip was made in Photoshop, using the median noise-suppression filter with maximum radius (500) and some extra averaging and evening-out trickery. The result is here, next to the original:
clip 3: original vs average
https://youtu.be/7Mc_UM74DAI

I then asked a friend who is not (as I am) colourblind to choose a reference frame - he chose 831. Even though I'd have been happier with one from the non-sunny seeming range - but oh, well. I then made a second parallel (average) clip that contained just instances of frame 831 for the entire
length. Below: those averages next to one another. It seems that the colour problem (and, for that matter, the flickering in the original) are present in that new clip as I think I need them.
clip 4: reference average vs per-frame average
https://youtu.be/PYcsHdk4Eqc

From there, I was hoping that the following steps would be easy using the avisynth overlay function, but - no. What I tried with no luck at all was:
  1. create a clip with the difference between reference average and average
  2. invert the difference
  3. apply the inverted difference to the original
I won't bore you with all the things that went wrong, suffice to say: I got nowhere.

Anyone know how to make this work?
Anyone know a better way?

I have more clips with this type of problem, so I hope there's a method that can be automated (i.e. within avisynth/virtualdub(mod) in the versions I have and need - see below)!

Thanks for looking,
Wouter van Doorn

==============================
If it is of any interest, my setup is:
- Linux Mint 18.3-64 laptop Dell XPS13
- VirtualDub 1.10.4 (build 35491) 32 bit under Wine 1.6.2
* Plugin: DeShaker 3.1
- VirtualDubMod 1.5.10.2 (build 2542) 32 bit under Wine 1.6.2
* Plugin: DeShaker 3.1
- AviSynth 2.6 32 bit under Wine 1.6.2
* Plugin: deflicker
* Plugin: TCPDeliverffms2
* Plugin: ffavisynth
* Plugin: mvtools2
* Plugin: TTempSmooth
* Plugin: mvtools
* Plugin: ffavisynth
* Plugin: degrainmedian
* Plugin: mt-masktools-25
* Plugin: warpsharp
* Plugin: DirectShowSource
* Plugin: hqn3d
* Plugin: colors_rgb
* Plugin: despot
- Photoshop CS6 64 bit under PlayOnLinux 4.2.10
* Plugin: iCorrect EditLab Pro 6.0 plugin for colour correction
- ffdshow rev 4532
- ffmpeg 4.1.3-0york1~16.04
- xvid 1.3.2

Last edited by Doorn9; 6th August 2019 at 22:09. Reason: Link to non-youtube original for clip 1
Doorn9 is offline   Reply With Quote
Old 20th July 2019, 11:27   #2  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Hello Wouter and welcome here!

Please upload an original not manipulated example somewhere so we can download 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 20th July 2019, 14:12   #3  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Hi Fred,

The first link is the original. Nothing done to it at all.

Thanks for looking!
Wouter
Doorn9 is offline   Reply With Quote
Old 20th July 2019, 15:41   #4  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Could you identify which plugin is causing this color/brightness changes? A script would be good to reproduce the results...
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 20th July 2019, 17:09   #5  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
The problem is in the original. Cleaning the clip up makes it stand out more - the yellow cast on the original hides quite a bit of the issue. Remove that (I do that in Photoshop with the iCorrect EditLab 6 plugin, not with an avisynth script) and the *real* problem shows up.
Doorn9 is offline   Reply With Quote
Old 20th July 2019, 19:17   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by Doorn9 View Post
Hi Fred,

The first link is the original. Nothing done to it at all.

Thanks for looking!
Wouter
Uploading to YouTube will recompress it and possibly change the colour matrix - not by a great amount, but an unaltered cut from the original file may be preferable.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 20th July 2019, 19:53   #7  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Maybe AutoAdjust() with a high temporal radius could help https://forum.doom9.org/showthread.php?t=167573
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 20th July 2019, 20:44   #8  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Quote:
Originally Posted by Doorn9 View Post
Nothing done to it at all.
Uploaded to Youtube and nothing done to it at all are mutually exclusive realities.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 20th July 2019, 22:28   #9  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Quote:
Originally Posted by wonkey_monkey View Post
Uploading to YouTube will recompress it and possibly change the colour matrix - not by a great amount, but an unaltered cut from the original file may be preferable.
Ah. That shows what I know. I didn't care about the compression, but mucking about with the colours is exactly what I wouldn't want here. So this is the original - as far as we can speak of an original considering it's super-8!
https://www.vandoorn.tv/doom9/022.avi

Thanks for explaining,
Wouter

Last edited by Doorn9; 6th August 2019 at 22:09.
Doorn9 is offline   Reply With Quote
Old 20th July 2019, 22:29   #10  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Quote:
Originally Posted by Asmodian View Post
Uploaded to Youtube and nothing done to it at all are mutually exclusive realities.
Learning all the time!
http://www.vandoorn.tv/doom9/022.avi

Last edited by Doorn9; 6th August 2019 at 22:10.
Doorn9 is offline   Reply With Quote
Old 20th July 2019, 22:30   #11  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Quote:
Originally Posted by ChaosKing View Post
Maybe AutoAdjust() with a high temporal radius could help https://forum.doom9.org/showthread.php?t=167573
Something to look into; I do not know autoAdjust, so there's something to look at.

Thanks!
Wouter
Doorn9 is offline   Reply With Quote
Old 21st July 2019, 10:05   #12  |  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 Doorn9 View Post
Learning all the time!
http://www.vandoorn.tv/022.avi
The requested URL /022.avi was not found on this server.
Oops....... sorry now it works

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 21st July 2019, 11:20   #13  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
The original file is low resolution and low bitrate.(mpeg4). I see lots of block artefacts caused by compression. Is this how the original scans where delivered?

This is what I can make from it: stabilized, cleaned with RemoveDirtSMC(), Gammac() to remove the yellow cast, sharpened and finaly some minor RGB color correction (a bit less blue and a bit more red)

https://www.dropbox.com/s/fkeoi0bgoj...Doorn.avi?dl=0

But to have realy good results, you need a better scan from the original 8mm film.

PS: your corrected example is pretty good. The brightness change is probably caused by the borders.
This is why I have used a cropped clip for the Gammac detect 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

Last edited by videoFred; 21st July 2019 at 11:28.
videoFred is offline   Reply With Quote
Old 21st July 2019, 12:53   #14  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Ok, I was not awake this morning

The brightness change is on the original indeed.
Fortunately, Gammac() in modus -1 can deal with this:

https://www.dropbox.com/s/rh6gwq3qfj...rn_01.avi?dl=0

Please look at the histograms at frames 565, 572, 579 and 735.

I doubt ........ is this brightness change or compression block artefact change? Or both?

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; 21st July 2019 at 12:59.
videoFred is offline   Reply With Quote
Old 21st July 2019, 15:47   #15  |  Link
Doorn9
Wouter van Doorn
 
Doorn9's Avatar
 
Join Date: Jul 2019
Location: Central Scotland
Posts: 13
Hello videoFred!

I was already very impressed by the first effort (when you were asleep...??) because it was already a lot better. Then this one came along, and it seems you have simply completely solved the problem! At least to my not very colour-sensitive eyes it seems so. Anyway - SO much better than the original, that I will now have to find out all I can about this gammac thing - whatever it is - so I can build it into my workflow. I hope I can do it under Linux/wine (it can be tricky) but I'll give it the best go I can.

What's the best resource for me to visit for learning about installation, settings, function parameters and all that?

Wouter

PS: all those many years ago it was actually you who encouraged me to start looking into digital film processing with the huge script you then had on this forum. It was the basis for all I do now (so far: thirteen stages for a piece of super-8 film, soon to be fourteen I hope!). Glad of the opportunity to thank you very much for what you published then, in addition to your response here!

Last edited by Doorn9; 21st July 2019 at 15:49. Reason: Typo
Doorn9 is offline   Reply With Quote
Old 21st July 2019, 16:46   #16  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I thought that I had seen something about noisy 'sparkles' in this thread, maybe its was in some other thread, but anyway,
suggest do an eg Blur(0.2) on GamMac DC detect clip, just in case, no real downside to doing that.
__________________
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 21st July 2019, 18:56   #17  |  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 Doorn9 View Post
What's the best resource for me to visit for learning about installation, settings, function parameters and all that?
Hi Wouter,

Gammac thread:
https://forum.doom9.org/showthread.p...ghlight=gammac

And Johnmeyer has made a version of my film restoring script with Gammac included. You can do a search here for this.

Quote:
Glad of the opportunity to thank you very much for what you published then, in addition to your response here!
You are welcome!

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 21st July 2019, 18:59   #18  |  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
I thought that I had seen something about noisy 'sparkles' in this thread, maybe its was in some other thread, but anyway,
suggest do an eg Blur(0.2) on GamMac DC detect clip, just in case, no real downside to doing that.
Good idea as usual!

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 21st July 2019, 19:38   #19  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Hi Fred.
I'm still a bit stuck on AutoLevels, when I get the frame radius smoothing thing sorted out[well actualy that part pretty much done], I'll add it and scene change detection part to GamMac.

EDIT: Should not slow it down much, had it [AutoLevels] doing something like 560 FPS on STD Def clip on my crap machine. [Same clip with Autogain I was getting more like 68FPS].
__________________
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 2019 at 19:42.
StainlessS is offline   Reply With Quote
Old 22nd July 2019, 11:17   #20  |  Link
Bernardd
Registered User
 
Join Date: Jan 2012
Location: Toulon France
Posts: 249
Hi,

022.avi is better clip source.

I have try this source only with Automatic white balance with RGBAdapt plugin, post https://forum.doom9.org/showthread.p...04#post1878904

With only gain and contrast, we can get a readable white balance. Note this way have no issue with frame 102 with her big black dust. Two samples bellow.

Code:
AWB_Func(matrix="Rec601",show_scrutinized=false,x=0.04,y=0.04,w=0.04,h=0.04,threshold=0.1,show_info=false,
\ gain = truee, cont = true, g_c_decrease = 0.0, bias = false, rpow = false, spow = false, gamma_bias_mix = 0.5)
https://www.dropbox.com/s/5mxr9gwd5c...20min.mkv?dl=0

Code:
AWB_Func(matrix="Rec601",show_scrutinized=false,x=0.04,y=0.04,w=0.04,h=0.04,threshold=0.1,show_info=false,
\ gain = truee, cont = true, g_c_decrease = 1.0, bias = false, rpow = false, spow = false, gamma_bias_mix = 0.5)
https://www.dropbox.com/s/hc82aqn22k...20max.mkv?dl=0
Bernardd is offline   Reply With Quote
Reply

Tags
avisynth, colour-fault, super-8

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


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