Go ahead and try the descratch filter, but don't expect much. The only way I know to remove scratches is the tried-and-true old-fashioned way, which is to put special solution on the film prior to transfer, and transfer it "wet." This is called "wet gate" transfer, and you can Google it to find out more.
Scratches are much more difficult than dirt because they more or less persists from frame to frame, whereas a dirt spot only exists on one frame, and then is gone from that spot in both adjacent frames. If the scratch stayed in the same place, you could perhaps use a blur filter. However, scratches usually tend to "wander" back and forth slightly, so that approach doesn't work. Also, the scratches often persists for 10-15 seconds and then disappear, or get bigger or smaller.
I have never found a good software solution, although perhaps one exists.
So, like I already said, try out jababo's suggestion, and perhaps you can get it to work for your film.
+ Reply to Thread
Results 181 to 210 of 253
-
-
Gentlemen,
During the last 10 days I have been experimenting with John's script on various problematic, even severely damaged material. In all cases the script performs sheer wonders.
Once again, THANK YOU ALL!
Even though it is not supposed to do so, the script even reduces lengthwise scratches, especially where they move horizontally, thanks to the (probably cheap) projector with poor film transport that caused the scratches..
Then, I have to confess I underestimated the effect of stabilization. It makes all the difference and you get such a rock steady picture in return for a minor sacrifice in image area that I intend to use it on all my films.
So far so good.
Now I am at the stage where I wish to import the resulting avi in Premiere.
MediaInfo specifies my original scans as follows:
In order to change as little as possible I set VirtualDub to 'Direct stream copy'. Apparently AviSynth has changed a lot. Anyway, too much for Premiere, since it does not accept the resulting 2.5GB avi.
Then, I tried a 2 pass XVID compression (at max. bitrate: 4369Kbps!). Only the second pass resulted in something useful as it was accepted by Premiere, but only 93MB in size which is too little and visibly so. Further specs: MPEG4 visual, YUV, Lossy, Progressive.
The first pass resulted in a useless avi file of only 111 kB.
By the way, the 2 passes were not performed automatically as I expected and resulted in 2 separate avi's.
Now my question is whether, from your vast experience you could advise me on how to get an avi out of VirtualDub that stays as close to the original specifications (and size) as possible. -
Your problem with Premiere has nothing whatsoever to do with the script, but instead is caused by the codec you use. Some editing programs won't import certain codecs.
HuffYUV, Lararith, or MagicYUV are lossless codecs, and if you have the disk space, those are the best choices, and I think you can get most editing programs to accept video encoded by these.
Since you started out using a DV codec, it would be easiest to stay with that. I use the MainConcept DV codec. I forgot how much I paid for it. You used to be able to download a DV codec made by Panasonic. Google that, and perhaps you can find it somewhere.
If you use the DV codec, it is hard-wired to encode the video as interlaced. Don't worry, this won't hurt your captures. However, when you edit the result, you'll have to override the interlace setting and tell your editor that the video is progressive. I only use Vegas, so I don't know how to do this in Premiere.
XVid, MP4, X.264, and MPEG-2 are all lousy format for editing and I would not recommend using those. They are great formats for delivery, but not for editing. -
I would avoid using the DV codec for your intermediate unless you need that much compression. There's no need to introduce DV artifacts (however light) after your careful filtering.
The output of your AviSynth script is YV12. When you set VirtualDub to Direct Stream Copy the resulting AVI file will be marked as using a YV12 codec (though in this case it's not really a codec but the AVI file has to identify what form the video is in). I don't use Premiere but the problem is probably that it doesn't understand what the YV12 codec is. You probably need a VFW or DirectShow YV12 codec. Try using ffdshow and enabling its YV12 "decoder". Or you can use one of the lossless codecs that work in YV12. Like Lagarith or UT.Last edited by jagabo; 5th Mar 2015 at 20:52.
-
His original capture was done using the DV codec, according to the information he posted. So, any subsequent use of the DV codec will not introduce any noticeable artifacts, or introduce any further color errors. The big problem with DV is the 4:1:1 color space. As far as compression artifacts, it is actually amazingly good. We did tests, a dozen years ago, using the DV codec in Sony Vegas. We created ten generations, and most people could not spot any difference between the original and the tenth generation. This mirrors my own experience as well.
So, given that he started with the DV codec, which put the video into the 4:1:1 color space, staying with that codec will do no further harm.
The DV codec is perhaps the easiest codec to edit with, and I think is the ideal codec for this job, although you do have to tell your editing program that the material is progressive, because the DV codec is hard-wired to report its content as interlaced.
Here's a link to the old DV tests done in the Sony Vegas forum:
DV Tests -
Nonsense. He's extensively filtering his video so it's essentially a new video. Using DV will just add another round of DCT blocking and ringing artifacts, and another damaging YUV 4:2:0 to 4:1:1 conversion. And likely another damaging YUV 4:1:1 to 4:2:0 conversion at the final encoding.
-
Re: #183
OK John, I realize it has nothing to do with your fine script, other than that Vdub turns it into
an 'YV12-ish' type of AVI, which Premiere cannot handle.
According to Adobe the only Avi's Premiere accepts are these:
AVI (DV-AVI, Microsoft AVI Type 1 and Type 2) However there is quite a list of other file formats it does accept, here:
http://help.adobe.com/en_US/PremierePro/4.0/WSf52ca809ac8f6c7135876f961243120b72d-8000.html
Since MPEG4 is also mentioned, I did comparisons on the same 3minute clip:
A) the 2nd pass XVID MPEG4 avi mentioned in #182 (size only 93 Mb)
B) an uncompressed VDub avi which turns out to be in RGB format (size approx 5Gb!)
C) MagicYUV had a recent update. It created a file size of 1.84 Gb which is quite acceptable for short clips.
D) Panasonic DV compression produces a 600 Mb avi, exactly the same as the original scan.
Main conclusions:
- all can be edited in Premiere, in spite of the general belief that XVID avi's cannot
- in spite of the huge difference in size B) is only marginally better (sharper) than A)
- C) is of the same quality as B) but considerably smaller.
- D) quality is compable to A)
I think I shall stick to C) the lossless MagicYUV codec, in spite of the unwieldy file sizes for 30 min. films..
In case there would be alternatives resulting in smaller files without affecting the quality I shall be pleased to try them.
Re: #184 jagabo
Although ever so slight, there seems to be some deterioration, after using the Panasonic DV codec. And indeed I would prefer to do justice to the perfect results achieved with John's script !
You are right in assuming Premiere does not understand YV12. It does offer an option to 'adapt' but the result is a horrible, jerky mix of different sometimes discolored scenes from the clip. Unusable.
I did not follow your suggestion to install alternative codecs for Premiere; a) because I have no idea of how to do that and b) because I saw Adobe somewhere advising against installing foreign codecs. -
Windows provides two video libraries, Video For Windows (VFW) and DirectShow (DS), that can decompress video. A program can ask Windows to decompress a video using one of those two libraries or it can use its own code. VFW and DS are extensible. Anybody can write their own codec for VFW or DS. Once the codec is installed any program that uses VFW or DS can decompress videos compressed with that codec.
Since Premiere can edit AVI files compressed with Xvid and MagicYUV it's probably using the VFW library to decompress AVI files.
Since you have MagicYUV (a lossless codec), and it supports YV12 (according to their web site), you might as well use that -- if you can afford the disc space for your intermediate files. -
Dear john meyer. I got your script working on my MacPro med 2009 using VMWare. And at last de MT mode is also working with Avisynth 2.6. FPS speed around 6FPS. I'm a happy man
! One problem Some objects in the film are being removed see attachment. Ok I read in your script increase thSAD and I did but it did not solve the problem. I set the dirt_strenght on lower value it works a little. What other parameters can I change to get the wheel round in the picture. Also the picture is to dark I will lift the gamma or are there other solutions in your fantastic script
-
Last edited by jagabo; 6th Apr 2015 at 12:50.
-
RemoveDirt and the RemoveDirtMC function that calls it are almost certainly the culprit. Some day I need to go back to that DLL and that function and see if I can come up with a way to provide a "dirt size" parameter that will limit the size of the object removed, similar to what you can do with Despot.
In the meantime, lower the dirt strength parameter (found in the parameters section at the front of the script). I too have seen objects removed. I usually find that setting the remove dirt parameter to something from 1-13 usually keeps most wanted objects, although the amount of dirt removed decreases.
For critical work, I create two files, one with the remove dirt parameter set high, and the other with it set to zero. I line up the two videos in my NLE, with the "clean version" set to be what shows most of the time. I scrub the timeline, and when I see something being removed, I substitute the version that has all the other restoration steps applied, but which has no dirt removed.Last edited by johnmeyer; 7th Apr 2015 at 12:36. Reason: typos
-
You can select between two filtered versions within AviSynth using ReplaceFramesSimple(). For example:
Code:WhateverSource() light = LightlyFiltered() HeavilyFiltered() ReplaceFramesSimple(light, Mappings="[0 99] [2000 2099]")
-
I set the dirth_strenght to 13 and no missing objects now. The film is critical work so I will follow your workflow Johnmeyer. Jagabo I get only errors on your code. Can you explain some more to get it working. And of course thank all for your help.
-
My script was pseudo code. Replace WhateverSource() with whatever source filter you're using, AviSource(), ffVideoSource(), DirectShowSource(), etc. Replace LightlyFiltered() and HeavilyFiltered() with whatever filter sequences you are using. Then change the arguments in ReplaceFramesSimple() to suit your video. ReplaceFamesSimple() is part of RemapFrames package available here: http://www.avisynth.nl/users/stickboy/
-
Hi there,
You may remember the lengthy thread on my efforts to get johnmeyer's perfect script running..
Thanks to your help, I succeeded and I'm still amazed about the results!
As I said in my last posting #190, for the resulting avi I decided to stick to MagicYUV since this is a lossless format, which is probably beneficial during further processing in Premiere.
However, to my regret I found that MagicYUV changes the
Display Aspect Ratio to 5:4 (1,25) instead of 4:3 (1,33) and the
Pixel Aspect Ratio to 1.00 instead of 1.07.
The result is that the image becomes slightly stretched vertically: heads e.g. are somewhat egg-shaped.
Could somebody tell me how to correct this in Magic YUV?
Meanwhile, I have also done numerous experiments with XVID but there too the problem is persistant.
Thus far, only the Panasonic DV Codec produces a 4:3 image, but it is a lossy format and the quality is slightly less than the results with Magic YUV.
Just a thought: could it be a NTSC vs. PAL issue in the script?
Many thanks for your help! -
You don't "fix" the AR issue in the codec. You fix it by telling the final encoder the pixel aspect ratio or display aspect ratio of the intermediate video. Or you resize the frame to an appropriate size for square pixels. Like 720x540 for PAL video. The latter doesn't work for DVD since the frame must be 720x576 for PAL DVD.
-
Thanks jagabo, as a direct result of your comment I found that possibly the cause lies in Premiere.
This is what I did.
Premiere contains a 'leader' used by Universal in the old days in front of every reel of film. The important thing is that it contains a perfect circle.
The project monitor in Premiere displays this as indeed a perfect circle in a frame with an aspect ratio of 1.37 : 1 (!)
Part of this clip I exported as an avi and now the aspect ratio is 1.33 :1 which represents the normal 4:3 ratio. However, as you may see, the circle now has become slightly egg-shaped.
This is part of the Mediacoder report.
Everything here looks in accordance with the standard, but it is annoying seeing e.g. the cars in my movies having egg-shaped wheels..
Of course I can reduce the image height in Premiere but then I am left with black bars above and below the picture.
The whole thing seems illogic. I realize being off-topic with this question but I would be most grateful for any comment you may care to make! -
The difference you are seeing is the difference between ITU and MPEG 2 aspect ratios.
With ITU video capture (almost universally used by video capture devices) the 4:3 image is contained in a ~702x576 portion of the frame. A few extra pixels are usually captured at the left and right edges in case the capture is slightly off center, giving you a 720x576 frame. That full 720x576 frame represents ~1.37:1 display aspect ratio.
The DVD spec refers to the MPEG 2 spec regarding aspect ratios. The MPEG 2 spec only includes a display aspect ratio flag. That flag can only have a few values indicating: square pixel, 4:3 DAR, 16:9 DAR, and 2.21:1 DAR. That DAR is for the entire 720x576 frame, not a 702x576 portion.
In my experience, most professionally produced DVDs ignore the difference between the two specs. When DVDs are made from analog tape captures the aspect ratio isn't corrected to compensate for the slight difference between the two specs. DVD players are schizophrenic in this respect. They follow the ITU spec at the SD analog output, the MPEG 2 spec for upscaled digital output. -
Many thanks for your clarification.
Am I right in assuming that this cannot be repaired? -
You can usually override what a program thinks of the aspect ratio of a source. Typically by right clicking on the video in the time line and selecting source properties, aspect ratio, or some such.
-
OK, after right-clicking the time line in Premiere, this is what I see
Nothing can be changed here. That is possible only in the Export window where I can choose from different codecs:
However, this is what I described in #197. In some of these codecs there is an option to change the AR. I have tried that in all available codecs, but with no result. Even if I chose 4:3 (1,33) the egg shape is still there.. -
-
Thanks jagabo, this looks quite promising. I shall try it over the weekend.
-
Thank you again for the excellent tutorial by Andrew Devis. Unfortunately, it did not help in getting a better result. Premiere does allow a change in Pixel Aspect Ratio, but not in the desired direction, since I could only change PAR from 1.09 to 1.0 i.e. square pixels:
Nevertheless, I tried the 1.0 square pixel ratio and then funny things occurred!
Left you see the default 1.09 avi which (as reported earlier) has a slight vertical egg shape. In the right picture (PAR 1.0) one would expect an even stronger egg shape, but that does not happen; the circle's dimensions are exactly the same as those in in the left picture. In the right picture only the frame is somewhat narrower.
However, purely by accident, I found that in a different part of exactly the same clip a different circle did become more egg shaped:
1. How this could occur in one and the same clip, only seconds apart from each other is an absolute riddle to me. I do hope it gives you a clue as to how the original problem could be solved i.e.
2. The slight but disturbing egg shape as in the left pictures above.. -
-
Thanks manono.
1. I did not realize it is an existing standard. Thus far, I only used 1.25 and 1.33. Therefore 1.37 (which I measured on the screen using a simple ruler) looked funny to me and hence the exclamation mark etc.
2. You hit the nail on the head: " Just make sure the output is the same, without any added black bars or cropping." My problem is exactly that. Although things are fine in the Premiere project monitor, the resulting avi is not, being slightly stretched vertically. If you could advise me on how to solve this, I would be most grateful.
3. In #206 I mentioned that in one and the same clip, only seconds apart from each other there are 2 different circles. One is displayed slightly egg-shaped (as mentioned before) but the other is strongly distorted.
Any idea how this could happen? -
Your method of comparison may be flawed. The AVI container doesn't really flag pixel or display aspect ratio. Some codecs do internally but players may or may not respond to the flags. And even when players do respond they may not do so accurately. For example, with DV the codec can specify 4:3 or 16:9 DAR. But unless a program knows that DV uses a rec.601 pixel aspect ratio (where the DAR is contained in a 704x480 or 704v576 portion of the 720 pixel wide frame) it may play the video incorrectly. For example, as 1.33 DAR, not ~1.36 DAR (1.33 * 720 / 704).
This should not happen. Are you sure you didn't apply different filters or something? Try creating the video again from scratch. -
I've no idea as I don't use Adobe Premiere. Ordinarily, Academy Ratio films on DVD fill the whole 720 width of the DVD with active video (no black bars on the sides at all). That's still no guarantee it'll be played properly but it's about the best you can do short of adding slight letterboxing.