Log in

View Full Version : Ocassional Aliasing


Monkeylord
1st August 2012, 21:48
Hopefully someone can recommend a good method to help me out here.

I'm currently processing my anime DVD's (the bane of many people's existence), and I've come across a problem with "Ikki Tousen" where, maybe once an episode at most, I'm getting the ocassional bit of aliasing amongst the otherwise decent picture. It only lasts a few fields, but it's enough to notice (and drive me nuts every time).

Here's a screencap for now. I'll post a clip if anyone's interested.

http://i.imgur.com/yONt5.jpg

I've seen it appear at least once in 3 or 4 episodes so far so I'm kinda convinced that it's going to be present in pretty much all of them. I've noticed the exact same thing with "Metalocalypse; Season 1" too, and it definitely happens in every episode for that series.

I've managed to get it to look presentable with the following script:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\DGDecode.dll")
DGDecode_mpeg2source("F:\Ikki Tousen\Ikki Tousen D1\VTS_01_1.d2v", info=3)

LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
AssumeTFF()
QTGMC(Preset="Slower", EdiMode="NNEDI3")
merge(SeparateFields().SelectEven().eedi2(field=1),SeparateFields().SelectOdd().EEDI2(field=0),0.5)
srestore(23.976)

Unfortunately, despite working, it is kicking my desktops arse. I manage to process 3 episodes max (takes 1hr without the bolded AA code, and 1hr30mins with) before Virtualdub suffers a lock.

Here's the result of the script;

http://i.imgur.com/x1pXm.jpg

Not bad (although a few frames before and after that one still shows enough signs of aliasing to produce brief shimmers, especially where lines are present like the thin double lines where her underwear meets her leg), but it's killing my PC (PhenomII X6, 8GB RAM).

Can anyone recommend anything that's more usable on a regular basis? (or even one that provides better results). I don't mind this one for a one-off, but if I have to use it every episode of a series (up to 26 episodes or more) and it results in crashes every 3 eps, I'm gonna go nuts.

if a sample is needed I'll be happy to provide one, although it may take a while as I'm in the middle of using the above script and don't want to provoke a crash.

Reel.Deel
2nd August 2012, 02:38
Hi Monkeylord, post a small sample of the problem. For the mean time you can try Dogways updated LSharpAAF (http://doom10.org/index.php?topic=2202.0), it contains about 15 + some anti-aliasing scripts.
You can also try 06_Taro TAA/MCAA (http://www.mediafire.com/?gfvlpplt03rmm#i4tg5hhbhazb6) scripts. Lasty you can try Didée's anti-aliasing script (http://forum.doom9.org/showthread.php?p=1571490#post1571490), it works wonders on poorly deinterlaced material. Hopefully on these suggestions will help out. Good luck!

Monkeylord
2nd August 2012, 03:04
Here you go:

http://www.mediafire.com/?tarrez3plsq4ha6

It's only about 15secs long, but includes the above example and a couple of upward pans (which always come out jerky[/tip_begging]). Hopefully it's enough. If more is needed let me know.


I'll have to try those options you posted tomorrow. It's 3am now, and my bed beckons. Once I get home from work tomorrow I'll get stuck in.

Thanks for a starting point :)

Reel.Deel
2nd August 2012, 03:35
From my eyes it looks like all you need to do is simply IVTC.
I hope I'm right.:p
mpeg2source("Ikki Tousen Sample.demuxed.d2v")
TFM()
TDecimate(Mode=1)

Monkeylord
2nd August 2012, 21:11
From my eyes it looks like all you need to do is simply IVTC.
I hope I'm right.:p
mpeg2source("Ikki Tousen Sample.demuxed.d2v")
TFM()
TDecimate(Mode=1)

Nope, that didn't work... and neither did the other suggestions :(

After encoding the offending episode, it seems that the shimmer that the script I used only appeared bad in Virtualdub. On playback it's there but can't last much more than a frame or 2 so I doubt I'd ever notice it.

So, it seems that so far the script in use does the best job of cleaning up. Has anyone got any suggestions as to why it's killing my PC after 3 episodes?

Currently I'm processing with Avisynth, encoding to a Lagarith lossless AVI with Virtualdub, and finally compressing to WMV with the WME command line.

I'm adding everything to the job queue in Virtualdub and then go to bed. After I get to work I keep checking on progress using Teamviewer from my mobile, and when it's all finished I run one of several batch scripts (depending on aspect ratio and audio channels needed) and leave WME to process the whole folder.

Having to keep resetting everything after 3 episodes isn't doing me any favours, lol. If there's something I can change that someone can recommend, I'm all ears.

Reel.Deel
2nd August 2012, 21:18
Hmmm, it seemed to work flawlessly on the sample you posted. :confused:

Monkeylord
2nd August 2012, 21:35
I did it on the full D2V, and it left 2 instances in during the slow pan.

How odd!

**EDIT**


Sunuva... I tried again, this time simply adding "AssumeTFF()" in front of the IVTC, and not only did it work perfectly, but it also fixed the incredibly janky motion I always seem to suffer on virtical pans!!!



You have NO idea how stupid I feel right now. *sigh*

Thanks so much for the help!

lansing
2nd August 2012, 22:10
your source is a japanese anime, which means 99% of the time it was a telecined source. What Reel.Deel said is all you need.

Monkeylord
2nd August 2012, 22:52
your source is a japanese anime, which means 99% of the time it was a telecined source. What Reel.Deel said is all you need.

Yup... today I finally learnt the hard way about the importance of "AssumeTFF()", hahaha.

librarian
3rd August 2012, 09:56
Yup... today I finally learnt the hard way about the importance of "AssumeTFF()", hahaha.
What is your source filter?

DGIndex and FFMS2 correctly flag this video as TFF (no need of AssumeTFF), DirectShowSource and FFMS don't (and you have to add AssumeTFF).

Monkeylord
3rd August 2012, 16:06
What is your source filter?

DGIndex and FFMS2 correctly flag this video as TFF (no need of AssumeTFF), DirectShowSource and FFMS don't (and you have to add AssumeTFF).

"DGDecode_mpeg2source"

librarian
3rd August 2012, 19:35
"DGDecode_mpeg2source"

DGdecode should pass the right flag to AviSynth.
You can verify playing with this little function:

path = "C:\Script Avisynth\Ikki Tousen Sample.demuxed"
ext = ".m2v"

SMFRP(path, ext, test="13")

#Show media filter reported parity
#By default this function will check all the proposed media filter.
#The (optional) parameter "test" let you choice one or more decoder:
#ALL select all decoder
#0 to deactvate all proposed decoder (you MUST set your own decoder in this case!)
#1 select DGDecode_Mpeg2Source
#2 select FFMS2
#3 select DirectShowSource
#4 select FFmpegSource
#E.g. to select only DGDecode_Mpeg2Source and FFMS2 test="12" or, if you prefer for sake of clarity, test="1,2"
#You can enter another decoder (as string) in the parameter mydec.
#Of course it will always be checked. You can specify the extension
# that your decoder requires (by default it is the extension of
#the file, already specified).
#You can set (as a string) the parameter(s) for your decoder (default:none).

Function SMFRP(string path, string ext, string "test", string "mydec", string"ext2", string "params")
{
test = Default(test, "all")
ext2 = Default(ext2, ext)
params= Default(params, "")
params= params=="" ? params: ", "+params
Assert( (Findstr(test, "0")<>0 && defined(mydec)) || Findstr(test, "0")==0, "Preset decoders deactivated and no custom decoder chosen: Function terminated!")
Assert( Findstr(test, "all")>0 || Findstr(test, "0")>0 || Findstr(test, "1")>0 || Findstr(test, "2")>0 || Findstr(test, "3")>0 || Findstr(test, "4")>0 ,"Test may be only: All, 0,1,2,3,or 4")
m2s = Findstr(test, "all")>0 || Findstr(test, "1")>0 ? DGDecode_Mpeg2Source(path + ".d2v"):nop
flag1 = Findstr(test, "all")>0 || Findstr(test, "1")>0 ? Getparity(m2s) ? "TFF" : "BFF" :""
txt1 = Findstr(test, "all")>0 || Findstr(test, "1")>0 ? "DGDecode_Mpeg2Source reports this video as: "+ flag1 :""
ffm2 = Findstr(test, "all")>0 || Findstr(test, "2")>0 ? FFvideoSource(path + ext):nop
flag2 = Findstr(test, "all")>0 || Findstr(test, "2")>0 ? Getparity(ffm2) ? "TFF" : "BFF" :""
txt2 = Findstr(test, "all")>0 || Findstr(test, "2")>0 ? "FFMS2 reports this video as: "+ flag2 :""
dss = Findstr(test, "all")>0 || Findstr(test, "3")>0 ? DirectShowSource(path + ext) : nop
flag3 = Findstr(test, "all")>0 || Findstr(test, "3")>0 ? Getparity(dss) ? "TFF" : "BFF" : ""
txt3 = Findstr(test, "all")>0 || Findstr(test, "3")>0 ? "DirectShowSource reports this video as: "+ flag3 : ""
ffm = Findstr(test, "all")>0 || Findstr(test, "4")>0 ? FFMpegSource(path + ext) : nop
flag4 = Findstr(test, "all")>0 || Findstr(test, "4")>0 ? Getparity(ffm) ? "TFF" : "BFF" :""
txt4 = Findstr(test, "all")>0 || Findstr(test, "4")>0 ? "FFmpeg reports this video as: "+ flag4 :""
mydek = defined(mydec) ? eval(mydec+"("+chr(34)+ path + ext2 + chr(34) + params+ ")"): nop
flag5 = defined(mydec) ? Getparity(mydek) ? "TFF" : "BFF" : ""
txt5 = defined(mydec) ? Mydec + " reports this video as: "+ flag5 : ""

txt = Findstr(test, "all")>0 || Findstr(test, "1")>0 ? txt1 + "\n" : ""
txt = Findstr(test, "all")>0 || Findstr(test, "2")>0 ? txt + txt2 + "\n" : txt + ""
txt = Findstr(test, "all")>0 || Findstr(test, "3")>0 ? txt + txt3 + "\n" : txt + ""
txt = Findstr(test, "all")>0 || Findstr(test, "4")>0 ? txt + txt4 + "\n" : txt + ""
txt = txt + txt5

Blankclip(length=1,width=640,height=480,color=$011970).
\ Subtitle(txt,halo_color=$082012, align=5, font="Garamond", size=32, lsp =64)

}