8mm Avisynth film restoring script
Moderator: Andreas Wideroe
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
8mm Avisynth film restoring script
Good morning everybody,
I have worked hard lately on an Avisynth 8mm film restoring script.
The script does the following:
- stabilizing both jitter and camera shaking
- removing flickering
- resizing/cropping
- subtile 3 step sharpening
- removing dirt spots etc..
- heavy degraining
- changing frame rate by interpolation
Example clip:
http://www.vimeo.com/13173031
Thread about the scipt:
http://forum.doom9.org/showthread.php?t=144271
Your feedback is most welcome,
Fred.
I have worked hard lately on an Avisynth 8mm film restoring script.
The script does the following:
- stabilizing both jitter and camera shaking
- removing flickering
- resizing/cropping
- subtile 3 step sharpening
- removing dirt spots etc..
- heavy degraining
- changing frame rate by interpolation
Example clip:
http://www.vimeo.com/13173031
Thread about the scipt:
http://forum.doom9.org/showthread.php?t=144271
Your feedback is most welcome,
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
Re: 8mm Avisynth film restoring script
Dear Freddy,
great work - and great improvements. Congratulations! schmalfilm already put some lines into the news section on www.schmalfilm.de with your example on vimeo.
Of course not everybody is interested in improving his film in this way - some may love grain and unsteadyness as this is typical for 8mm - but those may use the other parts of your skript to improve colors and sharpness.
Your're invited to write another article for schmalfilm magazine about your great work!
Juergen
great work - and great improvements. Congratulations! schmalfilm already put some lines into the news section on www.schmalfilm.de with your example on vimeo.
Of course not everybody is interested in improving his film in this way - some may love grain and unsteadyness as this is typical for 8mm - but those may use the other parts of your skript to improve colors and sharpness.
Your're invited to write another article for schmalfilm magazine about your great work!
Juergen
http://www.atollmedien.de
the books about all cameras and projectors ever built
the books about all cameras and projectors ever built
Re: 8mm Avisynth film restoring script
Hi. Yes, this really look great. Is this something for amateurs like me? or is this proff stuff?
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
Again, thank you Jürgen :oops:Juergen wrote:
great work - and great improvements. Congratulations!
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
I am an amateur myself! What you need is a good transfer machine (progressive, no interlacing!) and all the rest is freeware (Avisynth, VirtualDub etc..). And lots of time and experiments.superadio wrote:Hi. Yes, this really look great. Is this something for amateurs like me? or is this proff stuff?
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
- Andreas Wideroe
- Site Admin
- Posts: 2273
- Joined: Tue Apr 30, 2002 4:50 pm
- Real name: Andreas Wideroe
- Location: Kristiansand, Norway
- Contact:
Re: 8mm Avisynth film restoring script
Impressive Fred! Great work.
Can Avisynth handle 10bit files or other codecs like v210, blackmagic, aja or bluefish444? Do you know?
SD and HD?
Cheers,
Andreas
Can Avisynth handle 10bit files or other codecs like v210, blackmagic, aja or bluefish444? Do you know?
SD and HD?
Cheers,
Andreas
Andreas Wideroe
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
Thank you too Andreas!awand wrote:Impressive Fred! Great work.
Avisynth works with 8 bits internal. I guess it will be possible to open your 10bit files, but Avisynth will convert them to 8 bits, unfortunately. On the other hand, as you can see, my 8-bits files are still pretty good in quality. I'm not a big fan of heavy color corrections.Can Avisynth handle 10bit files or other codecs like v210, blackmagic, aja or bluefish444? Do you know?
The size of the frame can be anything, the used codec is another matter. But the Avisynth command 'DirectShowSource()' will open almost anything, if the codec is intalled on your system of cource.SD and HD?
But Christoph knows a lot more about all this.
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
Re: 8mm Avisynth film restoring script
i agree that this script is most likely the best source for those who want to improve their super8 transfers (myself i'm more of a soft, grainy guy ;).
avisynth works only in 8bit internally, but that's really not a problem for screen playback because a well done 8bit frame looks identical to the eye to a 10 or 16bit frame. actually everybody who uses a normal screen sees 8bit max anyway (more likely 6-7bit unless they spent a lot of money), and nearly all printers use 8bit color space.
you only need more then 8bit if the original transfer is way too dark or too high contrast, and even then it's only useful if the component used are of high quality (no use to record audio with 192kHz 24bit on a 200EUR device either).
most avisynth filters work only in YV12 mode (which is something like YUV 4:2:0).. that means color subsampling is not the best, but then again most people will watch it in this color space anyway in the end (mpeg2, mpeg4, h264, DV, DVD, Blu-Ray etc), so if carefully done you don't loose anything, and in HD this is a non issue anyway.
it is advisable to use an uncompressed or visual lossless codec on the original transfer and intermediate steps though for critical work.
anyway the proof is in the pudding - or in this case in fred's clip!
(btw, download the original avi file on vimeo for best quality)
also it's worth mentioning that the clip is only PAL sized, yet i dare any HD system to get more detail out of it (sorry couldn't resist ;)
++ christoph
avisynth works only in 8bit internally, but that's really not a problem for screen playback because a well done 8bit frame looks identical to the eye to a 10 or 16bit frame. actually everybody who uses a normal screen sees 8bit max anyway (more likely 6-7bit unless they spent a lot of money), and nearly all printers use 8bit color space.
you only need more then 8bit if the original transfer is way too dark or too high contrast, and even then it's only useful if the component used are of high quality (no use to record audio with 192kHz 24bit on a 200EUR device either).
most avisynth filters work only in YV12 mode (which is something like YUV 4:2:0).. that means color subsampling is not the best, but then again most people will watch it in this color space anyway in the end (mpeg2, mpeg4, h264, DV, DVD, Blu-Ray etc), so if carefully done you don't loose anything, and in HD this is a non issue anyway.
it is advisable to use an uncompressed or visual lossless codec on the original transfer and intermediate steps though for critical work.
anyway the proof is in the pudding - or in this case in fred's clip!
(btw, download the original avi file on vimeo for best quality)
also it's worth mentioning that the clip is only PAL sized, yet i dare any HD system to get more detail out of it (sorry couldn't resist ;)
++ christoph
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
I agreechristoph wrote: also it's worth mentioning that the clip is only PAL sized, yet i dare any HD system to get more detail out of it (sorry couldn't resist ;)
++ christoph
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
- Andreas Wideroe
- Site Admin
- Posts: 2273
- Joined: Tue Apr 30, 2002 4:50 pm
- Real name: Andreas Wideroe
- Location: Kristiansand, Norway
- Contact:
Re: 8mm Avisynth film restoring script
Hi Fred,
Just playing around with your script here and I've never used AVISYNTH before so here are 3 newbie questions:
1. If I want less contour correction/sharpening. What parameters do I play with?
2. How do I add a deinterlacer to the script so that interlaced video first is deinterlaced and what filter+settings do you recommend?
3. I have some 72op files I'd like to try. To get 16x9 aspect and 1280x720, do I only change this line? W=720 H=576 #final size after cropping
PS! It seems to open and work well with 10bit blackmagic files.
Cheers!
Andreas
Just playing around with your script here and I've never used AVISYNTH before so here are 3 newbie questions:
1. If I want less contour correction/sharpening. What parameters do I play with?
2. How do I add a deinterlacer to the script so that interlaced video first is deinterlaced and what filter+settings do you recommend?
3. I have some 72op files I'd like to try. To get 16x9 aspect and 1280x720, do I only change this line? W=720 H=576 #final size after cropping
PS! It seems to open and work well with 10bit blackmagic files.
Cheers!
Andreas
Andreas Wideroe
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
- Blue Audio Visual
- Posts: 794
- Joined: Fri May 05, 2006 7:40 pm
- Location: London
- Contact:
Re: 8mm Avisynth film restoring script
Hi Andreas,
You can use the deinterlace filter in Virtual Dub, but this will just replace an interlaced frame with frames before or after it.
I'm pretty sure you can download the same filter into AviSynth.
In AviSynth you can use the SelectEvery command, but this will depend on your pulldown pattern.
For instance in the case of a simple 18fps film transferred as if it was 16.666fps the pulldown might be Frame1, Frame2, 1/2 Frame2 + 1/2 Frame3, Frame 3, frame 4, 1/2 Frame4 + 1/2 Frame5, Frame5 etc. etc.
So it is increasing the frame rate of 16.66 to 25 by adding an interlaced frame every third frame.
In that case the AviSynth command would be SelectEvery(3,0,2), or SelectEvery(3,1,2), or SelectEvery(3,0,1) depending on where in the sequence the interlaced pulldown occurs.
If it is a more complex pulldown you'll need to come up with a different pattern.
Fred's script will then render it back out as 25fps using interpolation instead (depends on which version you are using?).
I've only played around with deinterlacing a little bit, so there may well be a better method.
You can use the deinterlace filter in Virtual Dub, but this will just replace an interlaced frame with frames before or after it.
I'm pretty sure you can download the same filter into AviSynth.
In AviSynth you can use the SelectEvery command, but this will depend on your pulldown pattern.
For instance in the case of a simple 18fps film transferred as if it was 16.666fps the pulldown might be Frame1, Frame2, 1/2 Frame2 + 1/2 Frame3, Frame 3, frame 4, 1/2 Frame4 + 1/2 Frame5, Frame5 etc. etc.
So it is increasing the frame rate of 16.66 to 25 by adding an interlaced frame every third frame.
In that case the AviSynth command would be SelectEvery(3,0,2), or SelectEvery(3,1,2), or SelectEvery(3,0,1) depending on where in the sequence the interlaced pulldown occurs.
If it is a more complex pulldown you'll need to come up with a different pattern.
Fred's script will then render it back out as 25fps using interpolation instead (depends on which version you are using?).
I've only played around with deinterlacing a little bit, so there may well be a better method.
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
Nice! You have the newest RemoveDirt version I hope?awand wrote:Hi Fred,
Just playing around with your script here and I've never used AVISYNTH before so here are 3 newbie questions:
Also, I suggest to use VDubMod because there's a build-in Avisynth editer.
Please try:1. If I want less contour correction/sharpening. What parameters do I play with?
PRE_sharp_ness =60
USM_sharp_ness= 30
last_sharp= 0.1
Or set all these parameters to zero and start with very low values. The first parameter is the most critical for halo's because the radius is bigger. You can also play with the radius and see what you get.
Deinterlacing is always very tricky, start with progressive files if possible. But there is a SmoothDeinterlacer.dll available. Load this dll in the script and add " .Smoothdeinterlace()" at the end of the "source1= Avisource....." line. But perhaps Barts method works better. I have very limited experience with deinterlacing because I always work with progressive files.2. How do I add a deinterlacer to the script so that interlaced video first is deinterlaced and what filter+settings do you recommend?
Yes, that's all. But for the correct 16x9 aspect ratio you might have to change the crop values too.3. I have some 72op files I'd like to try. To get 16x9 aspect and 1280x720, do I only change this line? W=720 H=576 #final size after cropping
Very good! I'm happy it works for you.PS! It seems to open and work well with 10bit blackmagic files.
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
- VideoFred
- Senior member
- Posts: 1940
- Joined: Tue May 25, 2004 10:15 am
- Location: Flanders - Belgium - Europe
- Contact:
Re: 8mm Avisynth film restoring script
Yes, but this can be disabled by setting play_speed and numerator to the same value. Denumerator must be set to 1 then. Rendering back to the needed FPS can be done with changeFPS() then. For those who do not like the interpolation artifacts.Blue Audio Visual wrote: Fred's script will then render it back out as 25fps using interpolation instead
Fred.
my website:
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
http://www.super-8.be
about film transfering:
https://www.youtube.com/channel/UC_k0IKckACujwT_fZHN6jlg
- Andreas Wideroe
- Site Admin
- Posts: 2273
- Joined: Tue Apr 30, 2002 4:50 pm
- Real name: Andreas Wideroe
- Location: Kristiansand, Norway
- Contact:
Re: 8mm Avisynth film restoring script
Fred and Bart,
Thanks for your replies. Will check it out further tomorrow at work if I find time for it.
Just one thing. I mostly work with 24fps and 25fps films. In the script I see that it's made for 16.666 and 18.75fps. If I want to render the final output file to Ie. 24fps or 25fps, what do I do then?
Cheers,
Andreas
Thanks for your replies. Will check it out further tomorrow at work if I find time for it.
Just one thing. I mostly work with 24fps and 25fps films. In the script I see that it's made for 16.666 and 18.75fps. If I want to render the final output file to Ie. 24fps or 25fps, what do I do then?
Cheers,
Andreas
Andreas Wideroe
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
Filmshooting | Com - Administrator
Please help support the Filmshooting forum with donations
- CineGuerrilha
- Posts: 97
- Joined: Thu Oct 25, 2007 11:14 pm
Re: 8mm Avisynth film restoring script
unbelievable. Now I can see that the idea that s8 can hold large resolutions is true. I am dumping my 35mm!