I have AVISynth and AvsPmod, and I want to restore 16mm kinescopes, the source is DVD (someone's uploaded YouTube clip of the exact 16mm footage I'm trying to restore (Sorry it wont let me hyperlink for some reason: https://www.youtube.com/watch?v=GcL8yeFss0o)
Currently using FILM9 for Grain and Dirt Removal, but would be happy to move away from it.
I wish to do the following:
- IVTC correctly to get back the film frames from the Interlaced VOB's/Mpeg-2 on the DVD's (been playing around in VirtualDub but unsure if I'm doing correctly)
- Remove Grain and Dirt (currently done in FILM9)
- Remove Film Gate Weave (I've tried everything, including some AviSynth scripts, but they all have the same issue, if a person for example, moves of bobs up and down, it causes the stabilization to lock on to that and the whole picture moves, instead of getting rid of the gate weave.)
- Motion Interpolation/VidFIRE, been playing around with the script documented here: https://www.vegascreativesoftware.info/us/forum/24p-to-60i-kinescope-restoration-and-more--68296/ but that is for NTSC stuff. I thought I had got it to work with PAL, at least I did the other day by changing "source=assumefps(23.976).assumeframebased" to "source=assumefps(25.000).assumeframebased" which seemed to give me good results, but Tonight it doesn't seem to want to work, giving me a 29.97 result, which is causing interlacing issues when the saved avi from VirtualDub is in Sony Vegas (in the DV PAL mode), the encodes are not correctly interlacing for some reason, though it's been a long day and I'm tired, so I very well could work this issue out myself.
Currently a Bachelor of Information Technology student, in the beginnings of learning C#, so while this has helped me understand bits and pieces and for the first time try AviSynth (eg: recognising similarities with the scripts to aspects in C#), a lot of it's still confusing as heck to me, but I'm willing to learn if anyone can help.
I can provide video samples of issues I'm facing if needed. Thanks in advance for any help given, I'm a beginner, but really keen to delve into the power of AviSynth
+ Reply to Thread
Results 1 to 21 of 21
AviSynth based on mvtools and derivatives.
http://avisynth.nl/images/Stab.avsi , but I'm unsure where to link to my AVISource. The wiki: http://avisynth.nl/index.php/Stab gives me an example of:
Stab(range=1, dxmax=1, dymax=1, mirror=0)
But I'm not sure how I would place this into the script. Still learning this whole Script stuff, so just trying to figure things out.
No, no no! No IVTC! You are working with an Australian KINESCOPE (film shot from a video monitor) of a PAL (25fps) TV show, shot on 25fps film, transferred back, presumably, to PAL 25fps video. Everything should already be frame-by-frame, with no repeated frames. (I could not download the video to confirm the frame rate, but there is no indication that it went to NTSC.) You do not want a 60i output, but rather 50i, right? Unless you purposely want it for NTSC playback. (You were unclear on that. If that's the case, we'll go through better PAL to NTSC procedures.)
We're still waiting for a sample of the DVD MPEG 2 data.
I've done a lot of work with Kinescopes. If you look at the Wikipedia article about it you'll find out by reading what I have found out by experience: every Kinescope is different, and there is no single way to restore or improve them. Thus, the only way to provide any advice is to get 10-15 seconds (minimum) of original video, not YouTube and not a copy.
If you can get Film9 to work, more power to you. It would not be my first choice.
The most important thing is to make sure that all field repeats -- if they even exist -- are removed, and that any ghosting is reduced. IVTC may be the right tool for this, but it may be useless. Again, there are so many different ways that Kinescope was done that there is no hard and fast rule for dealing with this. I have a potential client who just sent me a Kinescope that is going to require all sorts of custom software to recover because there is a moving line that moves down the picture that is a discontinuity created during the blanking interval with at least two scan lines missing. I need to track the moving line, interpolate the missing fields, and insert them. I know how to do all those things, but it will be a challenge to write the software and make it work. However, the Kinescope is in really good shape and is a professional first-generation transfer, so the result will be gorgeous, if I can do it.
So, I cannot help you unless you can post a first-generation clip of the material you are trying to improve.
Here's a file.
It's PAL video, 720x576, 25 fps. There are no comb artifacts and every frame is already unique. So there's no need for any field matching or decimation.
That's a really nice, clean kinescope. Since it is 25 fps and since you will be creating a 25 fps result, this is very simple to deal with. You can use any of VideoFred's film restoration scripts (or my variations). They are posted at doom9.org in these two threads:
The power of Avisynth restoring old 8mm films
Capturing and restoring old 8mm films
Here is the result of running your clip through my heavily-modified version of VideoFred's original script:
I cropped the edges a little too much because I needed to crop before applying motion stabilization (to get rid of the film gate weave). It is possible to do the restoration without this excessive crop, but I didn't have time to re-write the code.
I was able to eliminate most of the dirt, and reduce the film grain, so that it looks more like video. I did not take the extra step of converting from 25p to 50i (i.e., back to PAL interlaced), but I could certainly do that. I could also change it to 50p (i.e., 50 full frames a second, non-interlaced). Either 50i or 50p would give it much more of a video "feel," and make it look much more like the original video broadcast.
The one thing I am not able to do is remove the scratches. Film scratches are very tough to deal with because, unlike dirt where each spot only happens on one frame, the scratches will often persist for dozens or hundreds of frames. If they stayed in exactly the same point, I still might be able to remove them but, unfortunately, they tend to wander back and forth. There are scratch removal filters for both VirtualDub and AVISynth, but in my experience they don't work well enough to make it worth the time to play around with them.
So, take a look at my result, and if you want to proceed to do something similar, skim through those two long posts. The answers to all your questions about film restoration will be answered there, but be prepared to spend some time reading.
Last edited by johnmeyer; 27th Mar 2017 at 18:24. Reason: Bad URL
A quick example:
Mpeg2Source("bandstand.demuxed.d2v", CPU2="ooooxx", Info=3) # deringing, no deblocking Crop(16,0,-0,-0) # remove some of the black border on the left RemoveDirtMC(16, false) # remove spots Stab(range=8, dxmax=4, dymax=4) # stabilize frame bounce a little GreyScale() # pure greyscale
Yeah, I'm not bothering with the film scratches either, all the things I've tried make it look worse. But that looks great.
With the interpolation outlined here how would I tweak this to work with 25fps, and is there any settings or particular encoder I need to set with VirtualDub before i output it? I put the finished results into Sony Vegas, tweak the gamma, cropping, Unsharp Mask (to gain back a wee bit of the orthicon tube look) then encode to high bitrate Mpeg-2.
On another note, how would I go with what was originally a PAL kinescope but on an NTSC DVD? (there are PAL VHS releases of the particular material I'm looking at, but the only digital release was in NTSC in America.)
And I'm also guessing the damage at the beginning of this Bandstand clip would be far too damaged for AVISynth to handle? (although there's much more detail in this one, although it can't be seen from that clip I linked to on YT, it's only linked the damage at the beginning anyway).
Last edited by goodiesguy; 27th Mar 2017 at 20:29.
I have some really advanced stuff that I created which takes too long to describe, but which I used when I transferred and restored some absolutely horrible Polavision film. This was Polaroid's instant movie film that was sold, briefly, from 1978 to 1981. The film was developed in the cartridge and then projected from the cartridge. As a result, the film has been sitting in the chemical residue for forty years, and huge chemical blotches started to grow. They cannot be removed with film cleaner. I developed semi-automated ways to take totally trashed frames and create good frames by using adjacent frames. I used the same motion estimation technology that is used to change frame rates. The results were still awful (you don't know how bad film can be until you've worked with Polavision), but infinitely better than the original.
Here is a before/after clip of normal Polavision film. It is pretty bad, but after applying a highly-modified version of my restoration script, it is watchable:
And here is the REALLY awful Polavision film that actually had entire sections of emulsion that popped off when the film was unwound from the cassette, creating a white-hot hole in the emulsion where the blotch separated from the backing, followed a few frames later by a huge black blotch which was where that emulsion decided to re-attach itself. It was this project that convinced me to never again do another Polavision project:
Here is another project where the film in the camera did not register properly, resulting in frames that were not registered properly. Normally you see this in a projector that has lost its loop, but this happened in the camera. I went through and manually market each jump frame, and then devised an AVISynth script that replaced each market frame with a frame synthesized from the adjacent frames. The results were darn near perfect:
One final thing. These examples appear to be from American Bandstand, the old Dick Clark show. While he let the acts play live in the first few years of the show, eventually all the acts were just lip-syncing. Therefore, when restoring these (I collect old rock performances) I just sync up the pre-recorded version of the song (i.e., the same thing they are lip-syncing to). Vegas makes this easy because you can stretch or shrink the audio so it conforms to any speed changes that might have been made. You can choose to adjust the pitch or keep it the same. Make sure to use the "Elastique" setting when stretching audio.
AviSynth?:. All my TV's can play any format fine, PAL, NTSC, SECAM etc.. Just speaking in AVISynth restoration scripts generally here. The NTSC sourced stuff is some 1950's/60's BBC era Benny Hill sketches, which of course were originally PAL Kinescopes, but when released on DVD in America were converted to NTSC (with the only PAL release being VHS in the early 90s)
With "manual" spot removal:
RemoveDirtMC(55, false) ReplaceFramesMC(32,2) ReplaceFramesMC(47) ReplaceFramesMC(57) ReplaceFramesMC(72,2) ReplaceFramesMC(78,1) ReplaceFramesMC(81,3) ReplaceFramesMC(85,2) ReplaceFramesMC(88) ReplaceFramesMC(90) ReplaceFramesMC(106) ReplaceFramesMC(131) ReplaceFramesMC(154,2) ReplaceFramesMC(157) ReplaceFramesMC(161,3) ReplaceFramesMC(167) ReplaceFramesMC(171) ReplaceFramesMC(173) ReplaceFramesMC(211,1)
I'm still having issues with this script it's outputting a 29.97 result (that's what the frame rate shows when I open it on VDub) and the saved uncompressed .AVI file shows up as not interlaced when I open it in Sony Vegas, and I'm unable to encode with the Interpolation intact correctly to 25fps PAL Mpeg2.
The script was designed to output 29.97 interlaced, so it is performing as I wrote it.
Uncompressed AVI may not have an interlaced flag. This is true of many formats. You can override that in Vegas. Just right-click on any event and change it, or change it in the media pool. I do it all the time.