Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd April 2012, 20:59   #41  |  Link
henryperu77
Registered User
 
Join Date: Jun 2009
Posts: 49
Is this possible to use this on interlaced material? or i need to deinterlace and IVTC it first?
henryperu77 is offline   Reply With Quote
Old 3rd April 2012, 07:20   #42  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Hi henryperu77:

For my tests (for now) I have found it best to use DeCelluloid after IVTC (I have only tested for that case, anime content).
Otherwise one should use, I suppose, something like this:

AssumeTFF ()
SeparateFields ()
DeCelluloid ()
Weave ()
Somebody correct me if not for interlaced content.

In any case you should preview in VirtualDub how you remaining in both cases and make processing test with small pieces of video.
GMJCZP is offline   Reply With Quote
Old 15th January 2013, 02:41   #43  |  Link
Space Hopper
Registered User
 
Join Date: Mar 2002
Location: Denmark
Posts: 42
[EDIT FIXED]
Odd, I CANNOT get RemoveGrain to work anymore.
It used to work, and I can load the plugin with either LoadPlugin or just autoloading from the plugin folder - no apparent problems there.
However, a call to DeCelluloid complains about missing functions - like BackwardClense. It like RemoveGrainS.dll doesn't get loaded at all.

I need to fix some glue (or celluloid) in an old Anime.

This is on Windows 7 x64.
Anyone know what the problem could be?

Ps. Tried reinstalling Avisynth obviously. No luck.


[WHAT WAS WRONG]
I'm missing some DLLs, and I can't figure out which.
The wiki page (http://avisynth.org/mediawiki/Removegrain) contains broken links, and the info is pretty sparse (the RemoveGrain docs are no better).
I fixed it by getting the entire removegrain package, and only using the statically linked files (those ending on "S").

Note: I miss out on all the SSE3 optimizations though, which is a shame.

[EDITx]
Finally figured it out... was missing AvsRecursion.dll
I really really wish this was mentioned somewhere. Spent the better half of 12 hours looking trying to get it to work.
Oh well, all is good now.

Last edited by Space Hopper; 16th January 2013 at 06:37.
Space Hopper is offline   Reply With Quote
Old 17th January 2013, 01:43   #44  |  Link
Space Hopper
Registered User
 
Join Date: Mar 2002
Location: Denmark
Posts: 42
Quote:
Originally Posted by GMJCZP View Post
Formalizing the idea:

###
# Function DeCelluloid
###

# Eliminate garbage of top and bottom image of old videos.
# Low Gfactor values => larger detection, more probability appear artifacts
# High Gfactor values => minor detection, more safe.
# Thanks a Didée for the idea.
# Requirements: RemoveDirt 0.9
# Version 1.0, first attempt.

function DeCelluloid(clip source, float "Gfactor", bool "_grey" )
{
Gfactor=default(Gfactor, 5.0) # Garbage factor
_grey = default(_grey, false) # Source in Black and White
prev = BackwardClense(source, grey=_grey, cache=1)
next = ForwardClense(source, grey=_grey, cache=1)
h = height(source)
h_top = int(h*0.20)
h_top = (h_top % 2) == 0 ? h_top : h_top + 1
h_bottom = int(h*0.375)
h_bottom = (h_bottom % 2) == 0 ? h_bottom : h_bottom + 1
source.LetterBox(h_top,h_bottom).SCSelect(next,prev,source,dfactor=Gfactor)
}
Gave this a test on some old Anime, and it kinda introduces more artifacts that it fixes. This is on the default setting of 5. Also it misses a lot of scene changes.

I like the idea though. But I guess one has to face the fact that this is hard to fix automatically.
Space Hopper is offline   Reply With Quote
Old 17th May 2013, 23:58   #45  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Quote:
Originally Posted by Space Hopper View Post
Gave this a test on some old Anime, and it kinda introduces more artifacts that it fixes. This is on the default setting of 5. Also it misses a lot of scene changes.
Each video source has its peculiarities, so that the appropriate value for GFactor may vary for each case.

Quote:
Originally Posted by Space Hopper View Post
I like the idea though. But I guess one has to face the fact that this is hard to fix automatically.
This script is a start, there is still no magic formula for dealing with these cases.
GMJCZP is offline   Reply With Quote
Old 7th April 2018, 20:21   #46  |  Link
bryrabknowles
Registered User
 
Join Date: Jun 2017
Posts: 18
Just thought I'd throw out my concept for how to fix this. Needs someone more experienced than me to implement.

First, use scene change detection to define scenes - focus on the whole rather than just the separation point.

Ignoring the first 4 and last 4 frames of the shot, Average the remaining frames.

Compare the difference between the resulting "Average" and the Middle frame of the shot.

Set a maximum difference value (even better if you can find a way to only average static portions).

If the difference value is low enough, the shot is static. Otherwise, assume a pan.

On static shots, use the average found earlier. Working backwards, check the difference of frame 4 and 5. If 4 is a bad frame, use image registration to align. Otherwise skip to 3, etc.

When all 4 frames are checked and aligned, a small clip is created, essentially In frame order for that shot, 8,7,6,5,4,3,2,1,2,3,4,5,6,7,8 (provides continual motion to better calculate vectors.

Use this clip to generate the mask to be applied to the bad frames.

For Pans, the previous clip will be examined to determine whether it is static. If so, the final two frames of the previous shot will be run through QTGMC to generate 2 motion compensated extra frames.

If both shots are pans, the previous longer step will be applied to both.
bryrabknowles is offline   Reply With Quote
Old 8th April 2018, 03:36   #47  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Here's the detail: turn the theory into practice.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 25th May 2021, 18:09   #48  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Hi, I am having trouble with my DeCelluloid script (see post #40), some greenish frames appear, here is a sample:

Sample2

The culprit is RemoveDirt 0.9.3 and SCSelect, I had to reuse the old RemoveDirt SSE2 1.0
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 26th May 2021 at 14:08.
GMJCZP is offline   Reply With Quote
Reply

Tags
anime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.