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 4th July 2016, 14:54   #1  |  Link
~SimpleX~
Registered User
 
Join Date: Feb 2010
Location: Saint-Petersburg, Russia
Posts: 38
Help with deinterlacing

I have an anime video with hybrid interlace/telecine. Interlaced frames are somehow damaged and I don't know how to properly repair this.

Sample.

Please help. Vapoursynth or avisynth.
~SimpleX~ is offline   Reply With Quote
Old 4th July 2016, 20:03   #2  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 509
Take a look with AnimeIVTC Mod and mode = 4.
__________________
By law and justice!

Flea Market
GMJCZP is offline   Reply With Quote
Old 4th July 2016, 23:44   #3  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
Would've been nice of you to at least mention that your source is some kind of cheap animated porn.

Field stepping indicates that the actual problem with your sample is that it's 30 fps, but has a screwed up field order. If the rest of the source is telecined as usual, then the ideal way of handling this is to use VFR: use some IVTC filters for the telecined parts and splice the below script for the rest.

Code:
ffvideosource("O:\interlace.demuxed.m2v")

doubleweave().selectodd()
There also seems to be cross conversion artifacts, but I'm too lazy to figure out how best to deal with that.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 6th July 2016, 06:26   #4  |  Link
~SimpleX~
Registered User
 
Join Date: Feb 2010
Location: Saint-Petersburg, Russia
Posts: 38
Yes, this is some "cheap animated porn" aka hentai. I'm learning on this kind of material (a LOT of visual defects, a lot of filters required). I'm sorry I didn't mention that.

Quote:
Originally Posted by GMJCZP View Post
Take a look with AnimeIVTC Mod and mode = 4.
Nope, won't help. Thanks for suggestion!

It seems simple
Code:
tfm().vinverse().daa()
is "good" enough for combing removal (or maybe not, I actually use vapoursynth now, so it's vfm instead of tfm). I've tried QTGMC, tdeint, yadifmod, but they're definitely not applicable here.
Edges are somehow unstable after deinterlacing, which I don't know how to deal with. Also some ghosting around scene changes (can be removed with SMDegrain, but too much lost details in other scenes). Any thoughts?

Last edited by ~SimpleX~; 6th July 2016 at 06:38.
~SimpleX~ is offline   Reply With Quote
Old 6th July 2016, 22:10   #5  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 509
Try this version of DAA that I modded:

Code:
# Anti-aliasing with contra-sharpening by Didée (thanks to Didée, modded for this case with nnedi3)
# Is required VerticalCleaner
# Modded by GMJCZP
function DAAMod(clip c)
{
nn	= c.nnedi3(field=-2)
dbl = mt_average(selecteven(nn),selectodd(nn),U=3,V=3)
dblD = mt_makediff(c,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain((width(c)>1100) ? 20 : 14),U=3,V=3).verticalcleaner(mode=2)
DD = shrpD.repair(dblD,9)
return dbl.mt_adddiff(DD,U=3,V=3)
}
Sometimes can help.

Or try in detail Tfm-Tdecimate and vfr options (for example, for Tdecimate try mode = 3 and hybrid = 2).

Another home remedy: Here.
__________________
By law and justice!

Flea Market

Last edited by GMJCZP; 7th July 2016 at 00:46.
GMJCZP is offline   Reply With Quote
Old 7th July 2016, 07:45   #6  |  Link
~SimpleX~
Registered User
 
Join Date: Feb 2010
Location: Saint-Petersburg, Russia
Posts: 38
Thanks, took to my plugins. For this source daa3 (this version is ported to vapoursynth) is better. Yes, daa3 destroys small details, but DAAMod preserves line separation here (or how is it called?).

Btw, here is daamod for VS:
Code:
# Anti-aliasing with contra-sharpening by Didée (thanks to Didée, modded for this case with nnedi3)
# Is required VerticalCleaner
# Modded by GMJCZP
def daamod(c):
    core = vs.get_core()
    
    if not isinstance(c, vs.VideoNode):
        raise TypeError('daa: This is not a clip')
    
    nn = core.nnedi3.nnedi3(c, field=3)
    dbl = core.std.Merge(core.std.SelectEvery(nn, 2, 0), core.std.SelectEvery(nn, 2, 1))
    dblD = core.std.MakeDiff(c, dbl)
    shrpD = core.std.MakeDiff(dbl, core.rgvs.RemoveGrain(dbl, 20 if c.width > 1100 else 14))
    shrpD = core.rgvs.VerticalCleaner(shrpD, mode=2)
    DD = core.rgvs.Repair(shrpD, dblD, 9)
    return core.std.MergeDiff(dbl, DD)
~SimpleX~ is offline   Reply With Quote
Reply

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:01.


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