Quantcast AviSynth Descratch Filter Help Needed - digitalFAQ Forum
  #1  
04-03-2010, 12:34 AM
Derek Gee Derek Gee is offline
Free Member
 
Join Date: Apr 2010
Posts: 5
Thanked 0 Times in 0 Posts
Hello,

I'm trying to use the Descratch AviSynth filter to reduce/remove some vertical scratches, and having a terrible time getting it to do anything except blur the images. I'm using VirtualDub and calling the following AviSynth script:

Code:
AviSource("G:\Video Editing Projects\United Cinema\CM 2009 Final DNR.avi")
LoadPlugin("C:\Program Files\AVISynth 2.5\Plugins\descratch.dll")
ConvertToYV12(Interlaced=true)
DeScratch(mindif=1, mindifuv=5, modev=3, maxwidth=3, mark=false, maxgap=255, minlen=10, blurlen=70, keep=10, border=0, maxangle=5)
I've tried manipulating every variable in the above script. I've tried using a simplified script based on the one on Fisik's webpage:

Code:
AviSource("G:\Video Editing Projects\United Cinema\CM 2009 Final DNR.avi")
LoadPlugin("C:\Program Files\AVISynth 2.5\Plugins\descratch.dll")
ConvertToYV12()
DeScratch(mindif=2)
When I run the side by side comparison, nothing seems to change. I can get it show what scratches it is detecting in debug mode. But I can't get it to reduce or remove the scratches in any way.

Any thoughts as to what I might be doing wrong?

Derek
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
04-03-2010, 09:01 PM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,364
Thanked 593 Times in 440 Posts
Let's back up further, and take a look at your video/image that needs repairing. This approach you've taken might not even be the best option. While Avisynth does have several great filters, don't mistake it as being the "best" filtering program. VirtualDub has many filters, as do other encoders and editors.

Post a sample image/video (attach to this forum!) and then I'll take a look at it.

All of this said, remember that many noise removal techniques involve hiding an error, and not necessarily removing it. When it comes to certain noise issues, blurring can be a side effect, be it intraframe (within 1 frame) or interframe (temporally across several frames) blurring.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #3  
04-04-2010, 02:56 PM
Derek Gee Derek Gee is offline
Free Member
 
Join Date: Apr 2010
Posts: 5
Thanked 0 Times in 0 Posts
OK, here's a few framegrabs for your evaluation. Thanks for your time!

Derek

Scratched 1.jpg

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


Scratched 2.jpg

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


Reply With Quote
  #4  
04-05-2010, 03:17 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,364
Thanked 593 Times in 440 Posts
The video looks to be a typical home-shot 8mm film. It's just barely in the realm of being in focus and sharp. Any slight noise reduction easily knocks it into the realm of soft and blurry. I hate working with footage like this. You'll want to experiment with adding sharpness filters. This is one of the few cases where I think leaving the inherent film grain is allowed, because it adds the false perception of sharpness. This looks to have been filtered for grain already, either in the hardware or in earlier software processing.

The width of those scratches in frames 3-4 is so wide, that I'm not surprised you got really blurry results. If those are constant scratches, I'd be surprised if removal were possible. Only if the scratches come and go, would removal be possible, using a frame averaging from nearby frames.

Every now and then, VirtualDub doesn't seem to display Avisynth corrections as it should. In those cases, I've used another GUI, but I can't remember the name of it, as it's been at least 2-3 years since I had that problem.
  • I don't think it's Avidemux, although that may be another option.
  • Another option is AvsP, although I've not used it yet. This one looks to have the most potential, I'd try it first.
I don't readily see anything wrong in your script, although I won't promise I'm not missing anything. While I hate to refer to other sites instead of being able to provide the answers here, I want to be sure this gets solved. Therefore, you may want to open some concurrent threads at:
Refer back to this original thread, if needed, as needed.

Regardless of where you get answers, be sure to come back here and post your resolution, if you're able to get one. Post links to those new posts here, so myself and any future readers can keep track of all the discussions on the problem.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #5  
04-06-2010, 11:22 AM
Derek Gee Derek Gee is offline
Free Member
 
Join Date: Apr 2010
Posts: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by admin View Post
The video looks to be a typical home-shot 8mm film. It's just barely in the realm of being in focus and sharp. Any slight noise reduction easily knocks it into the realm of soft and blurry. I hate working with footage like this. You'll want to experiment with adding sharpness filters. This is one of the few cases where I think leaving the inherent film grain is allowed, because it adds the false perception of sharpness. This looks to have been filtered for grain already, either in the hardware or in earlier software processing.
Well, it is what it is. The footage was soft as shot, but grainy. I did reduce the grain without removing the detail, as there wasn't much detail there in the first place. I'm reluctant to start applying any sharpening tools to the film for fear of bringing back the grain, but I'm willing to try some edge-sharpening to see what happens.


Quote:
Originally Posted by admin View Post
The width of those scratches in frames 3-4 is so wide, that I'm not surprised you got really blurry results. If those are constant scratches, I'd be surprised if removal were possible. Only if the scratches come and go, would removal be possible, using a frame averaging from nearby frames.

Every now and then, VirtualDub doesn't seem to display Avisynth corrections as it should. In those cases, I've used another GUI, but I can't remember the name of it, as it's been at least 2-3 years since I had that problem.
I'm glad you mentioned that sometimes VirtualDub just doesn't work with AviSynth. That's exactly what I'm experiencing. The only thing I can make Descratch do is show me what it's detecting, or blur the whole frame into a smudge. This means either:

1) I'm doing something wrong.
2) Descratch doesn't work as advertised
3) The VirtualDub/AviSynth combo has problems.

While the scratches may be unable to be removed with Descratch, there are tools out there that can detect and remove them. The problem is their high cost. I was disappointed that the FilmFix plug-in for After Effects (by Red Giant Software) did not attempt to remove vertical scratches, only horizontal ones. They have since discontinued this plug-in for revamping, and have not determined a date for when a new version might appear.

I'll do as you suggest and start some threads at the forums you listed.

Quote:
Originally Posted by admin View Post
Regardless of where you get answers, be sure to come back here and post your resolution, if you're able to get one. Post links to those new posts here, so myself and any future readers can keep track of all the discussions on the problem.
I will! If the free tools are unable to remove or better mask the scratches, I may contact the folks at http://www.digitalfilmrestoration.net/ to see how many hours of work (at $ 12.20 per hour off-shore rate) it would take to clean up the scratches using M.I.R. and Diament. I could afford a couple of hundred bucks to fix up my film...

Thanks for your advice!

Derek
Reply With Quote
  #6  
04-08-2010, 08:44 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,364
Thanked 593 Times in 440 Posts
I'm not familiar with digitalfilmrestoration.net, but I checked out their site, and they didn't say anything stupid on it. That's a good sign. If I had a project that needed film restoration, I'd consider them for a test reel. There's several companies out there claiming to use the same processes, using the software from http://www.hs-art.com
Dustbuster has a demo. Maybe you can try it out for yourself, see what may or may not work?

This is some interesting stuff.

Another suggestion...
If the original film is still available, optical scanning hardware (using features like ICE) will probably yield a better transfer, as compared to a software-only fix from latter-generation transfers. I work with 35mm slide/film scanning and restoration, and the techniques for motion film scanning are based on the same principles -- there's just more of it to scan.

I wish you much luck on this project, I'd love to hear how it gets fixed, if you're able to fix it. If I come across some new information, or have a new idea to share with you, I'll be sure to come post it. I may see if any of my film-work peers have that software.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #7  
04-09-2010, 11:39 AM
Derek Gee Derek Gee is offline
Free Member
 
Join Date: Apr 2010
Posts: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by admin View Post
Dustbuster has a demo. Maybe you can try it out for yourself, see what may or may not work?
Interesting, I had missed that demo version. Not sure how well it will run on my WinXP with 1GB RAM 'puter, but I'm only working in standard def, so it might work. The license fee is probably like $10,000 though...

Quote:
Originally Posted by admin View Post
If the original film is still available, optical scanning hardware (using features like ICE) will probably yield a better transfer, as compared to a software-only fix from latter-generation transfers. I work with 35mm slide/film scanning and restoration, and the techniques for motion film scanning are based on the same principles -- there's just more of it to scan.
The original film is available, but since the transfer was done as a wet-gate on a Rank/Cintel with Super-8 gate, I don't think it will improve much more. I can go back to the final edit of the film without the DNR applied (a noise-reduction filter in Corel's VideoStudio). That may help Descratch pick up the scratches. I can try to use a VirtualDub or AviSynth grain reduction filter on the film afterward.

Progress report - I've started to use AvsP instead of VirtualDub, and the video preview function now works! I can see subtle changes occurring as I adjust the parameters. The bad news is it only softens/removes the lightest scratches. The darkest black and blue scratches are hardly touched. It seems to me that the Descratch filter's limit of 3 pixels width (maxwidth) is too narrow for my purposes.

The documentation for the filter doesn't always tell me what the parameter really does either. For example, exactly what "processing" occurs when you use the modey/modeu/modev parameters? I can see results, but I don't know what it did to get there.

I'll probably try starting some new threads at the other sites you suggested and see if anyone there has had better luck with Descratch.

Quote:
Originally Posted by admin View Post
I wish you much luck on this project, I'd love to hear how it gets fixed, if you're able to fix it. If I come across some new information, or have a new idea to share with you, I'll be sure to come post it. I may see if any of my film-work peers have that software.
I did check with one of my friends who works in making commercials, and his shop has a big server farm with lots of cool imaging tools, but no restoration tools. (Which makes sense as they shoot everything new.) He offered to see if they could maybe get a trial version of some software, but that never seemed to go anywhere and I didn't want to press the issue.

I promise I'll keep checking back!

Derek
Reply With Quote
  #8  
04-11-2010, 05:38 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,364
Thanked 593 Times in 440 Posts
I kind of figured Descratch would only take you so far. Most of what I see on your film is more advanced than the typical definition of a "scratch". However, I still think you should look into added advice from the sources I mentioned above, both at Doom9 and VH. If nothing else, I think it'd be good to get a confirmation on these limited abilities.

I would start with the pre-Corel VS filtering, yes. Fix the major issue first, and the smaller issues later. Grain is a small issue. That's a general rule of restoration. It's not ALWAYS 100% EVERY TIME true, but generally it is. This is one of those times.

I find it interesting that Sonic Foundry (former owner of Vegas) is a long-time customer of Diamant. I wonder what (if anything) was incorporated into the abilities of Vegas Video. Hmmm..

There's no harm in contacting one of the resellers, like http://www.atomicfilm.com, and asking what the cost is. Better to know it's out of reach, than to guess. Right? I'd ask myself, but don't have that much research time available just this moment. You'll probably get around to it faster.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #9  
04-12-2010, 11:39 AM
Derek Gee Derek Gee is offline
Free Member
 
Join Date: Apr 2010
Posts: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by admin View Post
I kind of figured Descratch would only take you so far. Most of what I see on your film is more advanced than the typical definition of a "scratch". However, I still think you should look into added advice from the sources I mentioned above, both at Doom9 and VH. If nothing else, I think it'd be good to get a confirmation on these limited abilities.

I would start with the pre-Corel VS filtering, yes. Fix the major issue first, and the smaller issues later. Grain is a small issue. That's a general rule of restoration. It's not ALWAYS 100% EVERY TIME true, but generally it is. This is one of those times..
Yeah, I figured it would easier to add the grain reduction after the scratch filters after I thought about what the NR might be doing to the scratch recognition.

Quote:
Originally Posted by admin View Post
I find it interesting that Sonic Foundry (former owner of Vegas) is a long-time customer of Diamant. I wonder what (if anything) was incorporated into the abilities of Vegas Video. Hmmm..
I've got an older version of VV from just after Sony took over (version 5 or 6), and I don't recall any sophisticated video filtering there, but I suppose it's worth a look.

I don't use VV much, as I find its interface just too clunky. It's what happens when you try and broaden a sound editor into a video editor and use the same interface.

Quote:
Originally Posted by admin View Post
There's no harm in contacting one of the resellers, like http://www.atomicfilm.com, and asking what the cost is. Better to know it's out of reach, than to guess. Right? I'd ask myself, but don't have that much research time available just this moment. You'll probably get around to it faster.
A friend of mine is at NAB right now, and HS-ART has a booth there. I sent an email to him and asked him to stop by and find how their software costs. No guarantee he'll have time to do so, but it's worth a shot.

Given how much these tools tend to cost, I seriously doubt I can afford to buy a license. It's likely cheaper to farm it out to the Digitalfilmrestoration.net folks, or to see if I can find a local shop with the software and rent (or beg) time on their system.

Derek
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Color laser printer needed for business use admin Computers 1 03-02-2010 10:25 AM
Help needed regarding CD/DVD media manufactured in India admin Blank Media 0 11-16-2009 05:29 PM
Burner advice needed dannyboy Blank Media 4 02-07-2008 01:07 PM
Baywatch Menu needed ninjastriker Author, Make Menus, Slideshows, Burn 7 01-14-2006 05:00 AM
Avisynth filters, correct tape drop-outs admin Restore, Filter, Improve Quality 0 02-15-2005 05:07 AM

Thread Tools



 
All times are GMT -5. The time now is 03:43 AM