View Full Version : The power of Avisynth: restoring old 8mm films.
Undead Sega
21st February 2012, 04:43
But wouldnt that be done manually?
johnmeyer
22nd February 2012, 00:19
But wouldnt that be done manually?Yes, if it were possible (and I don't think it is) to create color masks in order to separate layers, it would certainly be a manual process. However, I'm pretty sure this sort of thing is not possible without having access to the three B&W separation prints, something that doesn't usually exist, even for many Hollywood films, and certainly not for anything that any of us ever have access to.
So, it is an interesting restoration story, but unfortunately not one that suggests any technique that we might be able to adapt and use with the tools available for AVISynth.
Abyssal
23rd February 2012, 01:12
Edit:
I have had countless amount of errors but it seems I solved them on my own so a tip - if you get any errors - is to replace the AviSynth.dll file in System32/SysWOW64 (I have 64bit Win7 Ultimate so my old AviSynth.dll file was in SysWOW64 and NOT in System32) with the other one. Personally I forgot this but I didn't find it at first either since it wasn't supplied with the .zip file but the one you need is supplied with the MT zip so get that one and pull the modified AviSynth.dll file out of the zip and replace your old one in System32/SysWOW64.
http://avisynth.org/mediawiki/MT
(Some of you might find this stupid but hey, someone might have done the same as me)
videoFred
25th February 2012, 09:35
New before/after examples on Vimeo:
http://vimeo.com/37394781
http://vimeo.com/37393841
Please download the XVid source files, they are much better than the Vimeo files.
For some reason XVid to Vimeo is reducing sharpness.
Fred.
rubento
26th February 2012, 23:12
Fred,
I have seen your new Super 8 restored footage on vimeo and it looks better than ever. Is the script you used the same posted here or has it been updated?
Thank you!
Undead Sega
27th February 2012, 02:42
Yes, if it were possible (and I don't think it is) to create color masks in order to separate layers, it would certainly be a manual process. However, I'm pretty sure this sort of thing is not possible without having access to the three B&W separation prints, something that doesn't usually exist, even for many Hollywood films, and certainly not for anything that any of us ever have access to.
So, it is an interesting restoration story, but unfortunately not one that suggests any technique that we might be able to adapt and use with the tools available for AVISynth.
Hmmm, I do understand where you are coming from, but I think theoretically this can be possible, like if there was somesort of reference frame (with all the colour layers) which can be used to help interpolate the missing colour, i.e. creating the missing or faded film layer.
I found some papers on people trying to do so but I need to do more research, but at the moment I stumbled something interesting:
(3rd post) http://www.apug.org/forums/forum40/75771-restoring-faded-transparency.html
Apprantly, this guy says soaking the right type of film in ferricyanide would restore the Cyan layer. Does anyone have any knowlege on this?
videoFred
27th February 2012, 07:26
Fred,
I have seen your new Super 8 restored footage on vimeo and it looks better than ever. Is the script you used the same posted here or has it been updated?
Thank you!
Hello Rubento,
The script is updated. I will upload it as soon as possible.
Fred.
rubento
27th February 2012, 17:31
Thank you Fred! Your work is awesome!
TheoRI
28th February 2012, 07:14
Dear Fred, I saw the new super8 16:9 conversions and they look very nice. Can you please provide the settings for each edit and the output you used for each (I am talking of result1, result2, result3, or result4 of the original script) and then the settings for color, sharpening etc?
Once again great work! Looking forward to the updated scripts!!
Theo
videoFred
28th February 2012, 07:27
Hi Theo,
It makes no sence to give you those settings because all sources are different.
many greetings,
Fred.
Gargamel
2nd March 2012, 10:31
Hello Fred,
"Bravo" again for your last two clips ++, terrific for regular 8mm.
- A first question: while processing, were your settings the same, all along each clip, or were they different from a scene to another one ?
- A second (more general) one: to interpole, did you test InterFrame-1.13 instead of MFlowFps ? In some quick moving scenes, sometimes InterFrame seems to be interesting... Yesterday, Bernard launched that idea in a thread about "L'interpolation des images", on "Le Transfert Pellicule".
videoFred
2nd March 2012, 15:37
Hello Fred,
"Bravo" again for your last two clips ++, terrific for regular 8mm.
- A first question: while processing, were your settings the same, all along each clip, or were they different from a scene to another one ?
Hello Gargamel,
Settings like sharpness, grain reduction etc. where all the same. On some scenes I had to change the gamma a bit.
- A second (more general) one: to interpole, did you test InterFrame-1.13 instead of MFlowFps ? In some quick moving scenes, sometimes InterFrame seems to be interesting... Yesterday, Bernard launched that idea in a thread about "L'interpolation des images", on "Le Transfert Pellicule".
No, I have never tested Interframe and I will have a look at it.
many greetings,
Fred.
Gargamel
2nd March 2012, 18:22
OK, thank you Fred !
Many greetings,
Andre.
TheoRI
5th March 2012, 01:37
Dear Fred,
While waiting for the new version of your scrip I had a couple of questions:
1) Have you thought of creating the script in a format that is compatible with AvsPmod that uses sliders and maybe section toggles
2) What are your thoughts on using SmoothAdjust plug in for color correction (http://forum.doom9.org/showthread.php?t=154971)
3) Any thoughts of integrating a tool like SmoothGradationRGB for color correction? (http://forum.doom9.org/showthread.php?p=1530964#post1530964)
4) Any thoughts on the interpolated portion using the Interframe vs the MflowFPS scripts
Kind Regards,
Theo
johnmeyer
5th March 2012, 01:52
While waiting for the new version of your scrip I had a couple of questions:
1) Have you thought of creating the script in a format that is compatible with AvsPmod that uses sliders and maybe section toggles
2) What are your thoughts on using SmoothAdjust plug in for color correction (http://forum.doom9.org/showthread.php?t=154971)
3) Any thoughts of integrating a tool like SmoothGradationRGB for color correction? (http://forum.doom9.org/showthread.php?p=1530964#post1530964)
4) Any thoughts on the interpolated portion using the Interframe vs the MflowFPS scriptsGood suggestions, but why not just try it yourself? You'd only have to replace one or two lines of code for each of these changes. If you do try any of these things, I'd be interested in the results.
TheoRI
5th March 2012, 08:00
John,
I tried converting videoFred's script to be AvsPMod compatible (see http://forum.doom9.org/showthread.php?p=1563069#post1563069)
However I have issues with AvsPMod being stable to process and adjust settings.
I also tried out integrating the smoothadjust plugins but have major issues with AvsPMod. It does not want to stay up and process much.
:(
rubento
13th March 2012, 13:18
Fred,
I am anxiously awaiting your new script...
Regards!
videoFred
13th March 2012, 13:26
John,
I tried converting videoFred's script to be AvsPMod compatible (see http://forum.doom9.org/showthread.php?p=1563069#post1563069)
However I have issues with AvsPMod being stable to process and adjust settings.
:(
I guess the grain reduction is to slow for AvsPMod. It takes several second to reload the script after modifying.
However, my script works fine with VirtualDubMod and the build in Avisynth editor.
Fred.
egrimisu
16th March 2012, 21:02
Hey guys,
i have tried to use the destrobing efect and get an error:
rest=last
calm = rest.temporalsoften(1,255,255,32,2).merge(rest,0.25)#.repair(rest,1).removegrain(11)
calm = calm.temporalsoften(1,255,255,16,2).merge(calm,0.25)
LOP = calm.bicubicresize(180,144).bicubicresize(720,576,1,0)
HIP = rest.bicubicresize(180,144).bicubicresize(720,576,1,0)
HIP = mt_makediff(rest,HIP)
mix = LOP.mt_adddiff(HIP,U=2,V=2)
sup1=rest.msuper(levels=1)
sup2=mix.removegrain(11).msuper()
bv2=sup2.manalyse(isb=true, delta=2,blksize=16,overlap=8,DCT=5)
bv1=sup2.manalyse(isb=true, delta=1,blksize=16,overlap=8,DCT=5)
fv1=sup2.manalyse(isb=false,delta=1,blksize=16,overlap=8,DCT=5)
fv2=sup2.manalyse(isb=false,delta=2,blksize=16,overlap=8,DCT=5)
rest.mdegrain2(sup1,bv1,fv1,bv2,fv2,thSAD=640)
return(last)
and error:
mdegrain2 : wrong source or super frame size
anyone know what this is ? Thanks in advance
Solved it:
LOP = calm.bicubicresize(180,144).bicubicresize(720,576,1,0)
HIP = rest.bicubicresize(180,144).bicubicresize(720,576,1,0)
should contain the input resolution on the second bicubic resize and at the first bicubic resize, the second/4. Ibelieve :)
librarian
16th March 2012, 23:12
A better way :
rest=last
w=rest.width()
h=rest.height()
calm = rest.temporalsoften(1,255,255,32,2).merge(rest,0.25)#.repair(rest,1).removegrain(11)
calm = calm.temporalsoften(1,255,255,16,2).merge(calm,0.25)
LOP = calm.bicubicresize(w/4,h/4).bicubicresize(w,h,1,0)#gaussianblur(4)#
HIP = rest.bicubicresize(w/4,h/4).bicubicresize(w,h,1,0)#gaussianblur(4)#
HIP = mt_makediff(rest,HIP)
mix = LOP.mt_adddiff(HIP,U=2,V=2)
sup1=rest.msuper(levels=1)
sup2=mix.removegrain(11).msuper()
bv2=sup2.manalyse(isb=true, delta=2,blksize=16,overlap=8,DCT=5)
bv1=sup2.manalyse(isb=true, delta=1,blksize=16,overlap=8,DCT=5)
fv1=sup2.manalyse(isb=false,delta=1,blksize=16,overlap=8,DCT=5)
fv2=sup2.manalyse(isb=false,delta=2,blksize=16,overlap=8,DCT=5)
return rest.mdegrain2(sup1,bv1,fv1,bv2,fv2,thSAD=640)
As to downsize 1/4 --> upsize 1 see here (http://forum.doom9.org/showthread.php?p=568119#post568119)
stoffal
18th March 2012, 19:32
Wonderful new clips, Fred! Quality work made in Flanders =)
I can't wait to see the updated script... Cheers!
Chris
phate89
18th March 2012, 19:55
Hello Rubento,
The script is updated. I will upload it as soon as possible.
Fred.
Great... I'm starting now for the first time to play with your script... But at this point i'll wait the version with updated plugins and script..
Thanks!
Boffee
21st March 2012, 15:46
I am trying Fred's script but now get error in Line 229:-
StackHorizontal:image heights do not match. I have tried changing the values from 28 to 32 but no differerence. Anyone help
videoFred
21st March 2012, 15:55
I am trying Fred's script but now get error in Line 229:-
StackHorizontal:image heights do not match. I have tried changing the values from 28 to 32 but no differerence. Anyone help
Hello Boffee,
What is the size of the source file?
Fred.
Boffee
21st March 2012, 18:48
Hello Fred
According to gspot it is 720 x 576 which was taken with a camcorder and a condensor lens, I have tried the script on another video taken from a CCTV camera pointing at the gate of a projector, which is 640 x 480 but I get the same error. I have changed your degraining/sharpening part to that as posted in post #37 as i get error "illegal instruction line 161" if I leave it as original. Don't think my single core pc will run MVDegrainMulti for some reason although I have all the plugins in the script and plugins folder.
videoFred
22nd March 2012, 07:31
Hi Boffee,
Your single core pc should run MVDegrainMulti and this has nothing to do with the StackHorizontal error.
Please upload a clip and send me the script you are using, I will take a look at it.
Fred.
Boffee
22nd March 2012, 12:50
Thanks for your help Fred. Video is at http://vimeo.com/39078729. I have send a copy of the script which causes error on line 160. Only difference is SETMTMODE is disabled as far as I can see.
egrimisu
22nd March 2012, 22:20
A better way :
rest=last
w=rest.width()
h=rest.height()
calm = rest.temporalsoften(1,255,255,32,2).merge(rest,0.25)#.repair(rest,1).removegrain(11)
calm = calm.temporalsoften(1,255,255,16,2).merge(calm,0.25)
LOP = calm.bicubicresize(w/4,h/4).bicubicresize(w,h,1,0)#gaussianblur(4)#
HIP = rest.bicubicresize(w/4,h/4).bicubicresize(w,h,1,0)#gaussianblur(4)#
HIP = mt_makediff(rest,HIP)
mix = LOP.mt_adddiff(HIP,U=2,V=2)
sup1=rest.msuper(levels=1)
sup2=mix.removegrain(11).msuper()
bv2=sup2.manalyse(isb=true, delta=2,blksize=16,overlap=8,DCT=5)
bv1=sup2.manalyse(isb=true, delta=1,blksize=16,overlap=8,DCT=5)
fv1=sup2.manalyse(isb=false,delta=1,blksize=16,overlap=8,DCT=5)
fv2=sup2.manalyse(isb=false,delta=2,blksize=16,overlap=8,DCT=5)
return rest.mdegrain2(sup1,bv1,fv1,bv2,fv2,thSAD=640)
As to downsize 1/4 --> upsize 1 see here (http://forum.doom9.org/showthread.php?p=568119#post568119)
Thanks for the script, strobes are removed but also alot of grains, is there a way to preserve the grains, i mean as much as possible. Also shadow are inserted like blending can this be fixed?
librarian
23rd March 2012, 02:22
Thanks for the script, strobes are removed but also alot of grains, is there a way to preserve the grains, i mean as much as possible. Also shadow are inserted like blending can this be fixed?
That script is essentially a degrainer (and temporal stabilizer).
Save grain (before the script):
grain=mt_makediff(removegrain(4))# any degrainer you like
reinsert grain (after the script):
mt_adddiff(grain)
In addition you can try to:
use mdegrain1 (and may be to lower blksize to 8 and overlap to 4),
and/or reduce the thresholds in temporalsoften,
but both operations may lessen the desired effects.
egrimisu
23rd March 2012, 11:40
That script is essentially a degrainer (and temporal stabilizer).
Save grain (before the script):
grain=mt_makediff(removegrain(4))# any degrainer you like
reinsert grain (after the script):
mt_adddiff(grain)
In addition you can try to:
use mdegrain1 (and may be to lower blksize to 8 and overlap to 4),
and/or reduce the thresholds in temporalsoften,
but both operations may lessen the desired effects.
Thanks, some of the grains are kept, much better than without it.
My last and more important concern is that the wholse script introduces blending, is this something that can be fixed?
TheoRI
31st March 2012, 16:25
Dear Fred,
I am waiting for the new script you mentioned earlier in the month and was wondering when you could upload it.
Kind Regards,
Theo
GMJCZP
1st April 2012, 05:54
Same here, heh, heh.
I like the work of videofred and tried to use part of your script into other applications. Now I would like to learning and use the stabilization.
I had problems with Deshaker and Depan package :helpful:, so I'd like to stabilize some videos with slight movement.
Thanks a lot.
TheoRI
14th April 2012, 15:07
Fred,
Is there any news on the new version of the script?
Kind Regards,
Theo
Emulgator
18th April 2012, 23:26
I had problems with Deshaker and Depan package :helpful:, so I'd like to stabilize some videos with slight movement.
Thanks a lot.
A simple Stab() works wonders sometimes.
GMJCZP
10th May 2012, 15:48
A simple Stab() works wonders sometimes.
Thanks Emulgator. I'll try.
GMJCZP
12th May 2012, 06:39
It works very well, I activate the mirror option for to fill the black parts. Thanks.
Just noticed that sometimes the right side of the image does not fill it, it will be offset = -1?
Honeyko
20th May 2012, 08:19
///Warning: total Avisynth newb///
- - - -
I have:
1. Installed Avisynth (v2.5; it's in my Program Items folder).
2. Installed VirtualDub-1.9.10
3. Downloaded Fred's stuff.
4. Have a file ready to process ("abc.avi") in C:\test
....what do I next?
Note: I don't want to change a thing as far as the basic settings of Fred's script go; it looks like he's done a phenominal job of tweaking the heck out of it.
stoffal
20th May 2012, 09:52
Hello Honeyko,
welcome to this forum and to digital film restauration...
If you have downloaded the latest version of Fred's script, you can unpack the zip file. Here you will find some help files explaining what to do with the files. After setting up everything, you will need to adapt the avisynth script to your needs. Open it and read through it, modify it so it works with your file. It is really no "one click solution" -- you will need to understand what the script does, but then you have it all in your hands ! It might help you to take a look at the Avisynth website and go through some tutorial scripts there. Hope it helps!
Honeyko
20th May 2012, 10:04
Hello Honeyko,
welcome to this forum and to digital film restauration...
If you have downloaded the latest version of Fred's script, you can unpack the zip file. Here you will find some help files explaining what to do with the files. After setting up everything...That's the tricky part. Just setting everything up is about as obtuse as it could possibly be. (By "total newb", I meant exactly that. I.e., how do you even open a script in Avisynth? -- There certainly seems to be a lot of other software which calls Avisynth, but using it straight-up is something I've never done.)
I'm trying to avoid massive duplication of learning-curves here. A link to a simple 1-2-3 guide would be handy here.you will need to adapt the avisynth script to your needs. Open it and read through it, modify it so it works with your file. It is really no "one click solution"....Well, actually, there should be, *in this case*. My file is a plain vanilla progressive XviD avi, already cropped, mod16, yadda yadda. XviD is installed. x264 is there as well (if that's used). I don't need to worry about audio, resizing, combing or anything at all other than modifying path names to point to it.
If the input is better handled as mpeg2 or something else, I can easily convert it ahead of time.
videoFred
20th May 2012, 10:39
how do you even open a script in Avisynth?
This is not the thread to discuss this. Learn the Avisynth basics first and then come back here. ;)
Fred.
01010001
17th June 2012, 00:15
First off -- THANK YOU SO MUCH videoFred for making this available to us! :D It's simply amazing. Also thank you to anyone else who contributed to its development.
I keep reading about a new version, but I don't see videoFred making any comments about it. Is a new version coming out soon? I'm preparing to convert dozens of my family 8mm films sometime within the next week.
videoFred
18th June 2012, 07:38
I keep reading about a new version, but I don't see videoFred making any comments about it.
Send me a PM.
Fred.
videoFred
20th June 2012, 14:01
OK, new version of the script is uploaded, see first page of this thread.
Fred.
01010001
20th June 2012, 18:59
OK, new version of the script is uploaded, see first page of this thread.
Fred.
Thanks Fred. :)
Boffee
23rd June 2012, 12:56
Could I ask a question please? My cine transfer system consists if a c mount CCTV camera with a macro lens pointing at the gate of a cine projector. I am doing a frame by frame transfer using a hall effect transistor within the projector to give a pulse on each frame to trigger the mouse on my capture program. As the output of the CCTV camera is interlaced but I am making a progressive avi from the individual frames, do I need to de-interlace before using Fred's scripts?
videoFred
23rd June 2012, 13:00
As the output of the CCTV camera is interlaced but I am making a progressive avi from the individual frames, do I need to de-interlace before using Fred's scripts?
If there is no difference between fields, I don't think you will have to deinterlace. Try it and see what you get.
Fred.
johnmeyer
23rd June 2012, 16:14
You most definitely do not need to deinterlace IF the two fields come from the same moment in time. If you point two cameras at a completely stationary scene, with no motion occurring, with one camera shooting interlaced and the other progressive, the results from the two cameras will be the same. (And this, of course, is one of the reasons we have adaptive de-interlacers ...).
If you are unsure as to whether you are really getting two fields from the same moment in time, just run the output from your transfer through a one-line AVISynth script that just contains a single "separatefields()" statement. You should see pairs of fields with absolutely zero horizontal motion between them, but between those same pairs you will see a slight up or down motion due to the fact that they represent a slightly different spatial location. If you see something else, then your capture system is not doing what you think it is.
P.S. What speed (fps) does your transfer system operate?
Boffee
24th June 2012, 13:00
Thank you Fred and John. I have tried the new scripts and all seems OK. Had to change the MVtools.dll for another version as received illegal instruction error on AVIsynth. My PC is quite old but runs Windows 7 OK. My transfer system uses a Eumig 610D set on 3FPS. Anyway, thank you both for the clarification.
stoffal
24th June 2012, 14:04
Thank you Fred! Will try out the new script on this rainy sunday =)
millercentral
30th June 2012, 21:29
So I've been working with some very old 8mm reels - some as early as 1940...
Some of the reels are seriously degraded, to the point that some of the oldest film is quite brittle and breaks easily. I'm building a scanner based capture solution, and trying to make the film path as straight as possible, but does anyone know any tricks to reduce the brittleness of this old film?
I've heard suggestions like heating it, or wetting it, but haven't found any specific guides or techniques. Does anyone here have any tips to extract just a little more life out of this film in order to capture it safely?
Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.