Log in

View Full Version : AnimeIVTC() - All-in-one solution for interlacing and blending - v2.00 [2010-01-07]


Pages : 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Nightshiver
26th January 2009, 22:10
You are correct. Both are DHT.

thetoof
28th January 2009, 03:04
Actually, no. And it's my fault for making the docs not informative enough (well, they reflect my level of knowledge at the moment I wrote them).

This is actually a case of "hard telecined before editing" or "bad telecine" since the pattern is not constant, but (and that's the most important element) there is never more than 2 interlaced frames in a row, meaning it can be treated as telecined.
Another indicator that it's not DHT is that there is no constant patterns in the back and front parts of the frame. More info here : http://forum.doom9.org/showthread.php?p=1221663#post1221663
You can get the samples in that thread and match it with what was discussed to understand more about DHT. btw, the clip in that thread will be used as reference material in the upcoming guide mentioned here (http://forum.doom9.org/showthread.php?p=1236982#post1236982).

edit: hmmm, second one looks like double chroma field blended. I'll ask MOmonster's help on this one.

McCauley
28th January 2009, 23:23
Added to the wiki (http://avisynth.org/mediawiki/External_filters#IVTC_.26_Decimation).
Why don't you post your guide in the wiki?

Regards
McCauley

thetoof
29th January 2009, 00:56
wiki - Thanks, but don't add any other info since the next version will have quite a few changes (external and internal), so I'll make sure to add the proper explanations myself.

guide - We'll see about that... I'll take neuron2's hosting offer and maybe add a link to it in the "Some guides explaining the basic possibilities of AviSynth:" section of the main page.

Actually, for both the guide and the wiki, I was waiting to reach an acceptable level of knowledge regarding the many possible issues involved in the "I want to get the original framerate back!" process, which I think I have now thanks to the many user samples I was able to see and experiment things on.
My work rush is just about to end, so expect news about all that... *I won't say soon since every time I said that it ended up being weeks*

RsVolcom
29th January 2009, 11:47
aa=4 is amazing!!!

I hope you can solve my chroma issue soon!

[P]ako
29th January 2009, 14:17
But how to load cpu closer to 90-100% ?

I have an idea to start 3 processes at once with different episodes :)

That'd be a way to take advantage of your CPUs. It would be better if you have more than one hard drive.

Anyway, I think HUFFYUV is a single threaded codec.

stpdrgstr
30th January 2009, 04:08
thetoof, I've got a question.

We know that the mode=7, when doing dedup, dedups all the episode section that's detected as 24p. Thus, producing some sections at 17 fps or lower, depending on motion I guess.

But let's say I wanted to specify the sections that will be deduped (as for example, I want all the opening at 24p, without it doing dedups to sections of lower frame rate, so it stays at 24p, but then the episode section would be deduped as normal).

I know that I can solve it with just decimating the opening with tdecimate, fdecimate or decimate to 24p, trim it and only do the dedup process to the episode and credits, but it would be a pain to edit the timecodes later.

It would be nice to be able to specify sections to be deduped inside the AnimeIVTC function in mode 7, I wonder if it's possible :).

thetoof
30th January 2009, 04:30
mode=7 is currently meant for vfr decimation on the undecimated rendering pass.

If you want to remove duplicates and create a vfr clip depending on motion, you should apply dedup() (some info: http://avisynth.org/mediawiki/VFR + ctrl F dedup) on the ivtced clip (can be vfr or cfr, see dedup's guide for more info).

About dedupping some sections and some not.... I guess you can simply ajust the threshold to make sure nothing is removed when there is genuine movement.

stpdrgstr
30th January 2009, 17:26
Uhm, actually what I meant was, when I do a mode=7, I end with a timecode that uses 24 fps, or 17 fps. That's why I though this used dedup. What I wanted was to get a certain section at 24 fps without any frame or bunch of frames in that section going 17 fps. And then, getting other section with those 24 fps - 17 fps changes.

thetoof
1st February 2009, 03:41
To be honest, I never understood why some sections were decimated to 17fps with Tdecimate's VFR decimation.

stpdrgstr
1st February 2009, 03:49
Then, is that some sort of bug?

thetoof
1st February 2009, 04:10
Maybe. Check the corresponding sections of the decimated clip and the original and if there is motion loss, it is.
You can read thoroughly Tdecimate's docs to see if it is mentioned somewhere (I don't recall seeing it).

Any further discussion about this issue should be dealt with in the TDeint and TIVTC thread (http://forum.doom9.org/showthread.php?t=82264).

Codex0nz
2nd February 2009, 12:18
http://img160.imageshack.us/img160/6376/helpkk0.jpg

I kee pgetting that randomly at the end of any encode i do using animeivtc :S what am i doing wrong

works fine on one of my computers, but not the one i want to encode on :S used to be fine

anyone know?

McCauley
2nd February 2009, 12:46
Hi thetoof,


sorry for hijacking your thread , but i don't want to open a new one.
I'm currently trying to add various things (http://forum.doom9.org/showthread.php?p=1242377#post1242377)to the wiki.

I noticed that there doesn't seem to be an up to date version of an andvanced linedarkener (toon.dll is fairly new, but obviously not very tweakable...), so i thought i could suggest the development of an up to date Linedarkener/warpsharp/whatever thingy. Probably one would just have to collect all the scripts like mftoon (which still uses masktools1.xx), vmtoon (see this (http://forum.doom9.org/showthread.php?t=115040) post) and toon.dll and take the best parts out of them.

I'm not into anime, so i'm suggesting this just because i think that there would an audience and that maybe you or another member might be interested in developing it.

Regards
McCauley

thetoof
2nd February 2009, 17:59
works fine on one of my computers, but not the one i want to encode on :S used to be fineSince it used to be fine... I guess you changed something. I don't have the slightest idea of what it could be, so you'll have to wait to see if this remains with 1.07, as I rewrote and restructured most of the script.

I noticed that there doesn't seem to be an up to date version of an andvanced linedarkener
I'm not into anime, so i'm suggesting this just because i think that there would an audience and that maybe you or another member might be interested in developing it.Since I don't even have the time to properly maintain AnimeIVTC up to date, developping a line darkener isn't something I want to get into. However, you could see SharpAAMC(mod) as a "new" line darkener since it uses edge masking to apply tweakable warp sharpening, "normal" sharpening and line darkening with optional temporal stabilization of these edges... So since you can decide how thin, dark, sharp and stable the lines are...

btw, thanks for your work on the wiki.

Codex0nz
3rd February 2009, 09:24
when will that be released toof :) im all excited now :D

jason288
4th February 2009, 05:10
Can anyone tell me what I should be using for this mess: http://www.mediafire.com/download.php?itmminhzm4m

I have tried mode=1 and mode=2 but it doesn't get rid of the ghosting.

Thanks

McCauley
6th February 2009, 01:25
Since SharpAAMCmod is a separate function that can be used alone i added it to the wiki (http://avisynth.org/mediawiki/External_filters#Anti-aliasing).

Regards
McCauley

thetoof
6th February 2009, 05:22
when will that be released toof :) im all excited now :D1 - Glad to see you're interested in it
2 - Issues are still piling up
3 - I need to take a little bit of time when I'm not too tired to properly script double chroma blending correction (see latest posts in srestore's thread)
4 - Even if the guide won't be ready soon, I need to at least update the manual to match the many external changes
Conclusion - One day.

Can anyone tell me what I should be using for this mess: http://www.mediafire.com/download.php?itmminhzm4m

I have tried mode=1 and mode=2 but it doesn't get rid of the ghosting.

ThanksThis beyond screwed up. You could try asking for help in MOmonster's another restore function thread, but I sincerely doubt (and I'd be totally amazed of the opposite) that even he could do anything for this.

Since SharpAAMCmod is a separate function that can be used alone i added it to the wiki (http://avisynth.org/mediawiki/External_filters#Anti-aliasing).

Regards
McCauley
Thanks. However, I'm at not (at all) the sole author of the script. Everyone who participated in the "fine anime antialiasing thread", as well as the many AA scripts floating around that inspired them has much more credits than me for the script.
All I did was renaming the parameters, disabling filters when settings = 0 (idea of a poster in this thread), MT MVTools and MVT2 (1.07) compatibility (to properly work with animeivtc) and give another AA option (use EEDI2 instead of Sangnom)

jason288
6th February 2009, 05:35
@thetoof

Thanks I will ask over there and see if there is anything that can be done. Thanks for taking a look.

BTW also looking forward to the new version.

Codex0nz
7th February 2009, 10:47
1 - Glad to see you're interested in it
2 - Issues are still piling up
3 - I need to take a little bit of time when I'm not too tired to properly script double chroma blending correction (see latest posts in srestore's thread)
4 - Even if the guide won't be ready soon, I need to at least update the manual to match the many external changes
Conclusion - One day.

:D :D :D

/lights self on fire in excitement

Get sick or something :P we need this :D

If this is such a major rewrite of the script shouldn't you name it v2?

If ya need a logo or something graphic wise for the manual flick me a pm :D

thetoof
7th February 2009, 17:11
Get sick or something :P we need this :DThat's the problem... I was actually sick last month and now I have to catch up for the work undone.
If this is such a major rewrite of the script shouldn't you name it v2?I thought a bit about it and all the previous versions should've been 0.something or alphax and this one the first v1... so I'll just leave it at that.

If ya need a logo or something graphic wise for the manual flick me a pm :DIf you feel like doing something like this, have fun! I'll be happy to use it in the next release.

jason288
8th February 2009, 00:15
OK I have another messed up clip. Its from the new Powerpuff Girls DVD release. The first 12 episodes only had some dot crawl (a little tcomb took care of that for me) but there is something very messed up with the 13th episode.

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

Basically it looks like there is so much ghosting that IVTC cant match frames. Any ideas I can try with this one?

Havarth
8th February 2009, 21:56
I apologies for this rather newb question. Currently, I’m using ‘TIVTC’ with no problem. I’d like to start using AnimeIVTC, but I’m not sure what I’m supposed to load. I assume I'm supposed to load every dll and avsi. When I try to, I get an error about missing the file “MSVCP71.dll” several times (seems to be with VirtualDub, but only occurs when trying to load AnimeIVTC), then an error that my plugins can’t be loaded.

When loading everything (dll/avsi files), I get errors for the following plugins:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\avsfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LoadPluginEx.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ReduceFlicker.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ReduceFlickerSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ReduceFlickerSSE3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\warpsharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")

When attempting without them, I get an error about "ReduceFlicker" in the "AnimeIVTC - v1.06.1.avsi" file, line 164. I'm looking at 'AvsRecursion.dll' in my system32 folder as I type, which has been the problem for others. Obviously, ReduceFlicker is one of the needed dlls. Still, trying to load with or without above plugins presents problems.

The plugins I have been using up to now still work. I use other apps to encode, but VirtualDub for testing. Also, I'm running Vista if that matters. My laptop with XP needs a new power cord.

---

I typed the above 5 days ago (had to wait before I was allowed to post). Since then my problem has changed a little. I don’t see how, as I haven't changed anything. I now get this error (no “MSVCP71.dll” error at this time):
http://i258.photobucket.com/albums/hh270/Havarth/error-images/dual_avserror.jpg
Line 41 is "avsfilter.dll"

Thanks in advance for the help.

Nightshiver
8th February 2009, 23:54
Your not supposed to load every dll..... Just put them in your plugins folder for avisynth and they will autoload. Also, have you downloaded the package at the beginning of this thread containing all the needed avs and dll files?

jason288
9th February 2009, 01:05
@Havarth
You may also need the MSVCP71.dll in your system32 folder as well. Do a google search and download it, drop it in your system32 folder and if you follow what Nightshiver said you should be all set.

Havarth
9th February 2009, 01:08
Your not supposed to load every dll..... Just put them in your plugins folder for avisynth and they will autoload. Also, have you downloaded the package at the beginning of this thread containing all the needed avs and dll files?
Yes I have downloaded it. I thought you always had to load the files you wanted to use. As I said before:
but I’m not sure what I’m supposed to load
Wasn't aware I didn't have to load them. Thanks for the help.

yup
9th February 2009, 14:57
My sources is hard telecined PAL field shifted or not (mainly not), which I captured from old VHS. I need only remove jaggies. Please advice script.
I try see Your AnimeIVTC() it is very long and complex for me. I think I do not need all AnimeIVTC().
Yup.

thetoof
9th February 2009, 17:03
there is something very messed up with the 13th episode.I have something for it thanks to MOmonster's good tips, but I'm looking into how it could be automated to become a viable solution.

My sources is hard telecined PAL field shifted or not (mainly not), which I captured from old VHS. I need only remove jaggies. Please advice script.
I try see Your AnimeIVTC() it is very long and complex for me. I think I do not need all AnimeIVTC().
Yup. As you know, a sample would be best for any advice.

yup
9th February 2009, 18:41
Sample:


http://img522.imageshack.us/my.php?image=jagieshb3.png
yup.

Nightshiver
9th February 2009, 21:21
That's not a sample, that's a picture. Give us a sample of video, meaning a few seconds of video.

jason288
10th February 2009, 03:36
@thetoof
Thanks for taking a look. I will wait to see what you can come up for this.

yup
10th February 2009, 06:53
No problem!
100 frames nonprocessed huffyuv encoded video.
http://www.sendspace.com/file/w5zur9
yup.

Kurtnoise
10th February 2009, 14:15
Hey,

I'm not familiar with anime contents, especially such one (http://www.mediafire.com/?5mc2azmekjn). That's why I need some advices.

I tried this:
MPEG2Source("E:\CONAN_SCN\Opening\VTS_01_1.d2v")
LoadCPlugin("C:\Program Files\Avisynth 2.5\plugins\yadif.dll")
Crop(10, 2, -10, -2)
AnimeIVTC(mode=2, aa=2, precision=3, edimode="yadif", degrain=1, iregion="PAL", oregion="PAL")
Lanczos4Resize(688,512)


but I get that:

http://uppix.net/e/8/2/9f9661a24ae29a87ea64ec3012d2d.png (http://uppix.net/e/8/2/9f9661a24ae29a87ea64ec3012d2d.html)

tried also yadif vs eedi2 vs nnedi but same result. So, how to remove such things ?

:thanks:

thetoof
10th February 2009, 16:52
No problem!
100 frames nonprocessed huffyuv encoded video.
http://www.sendspace.com/file/w5zur9
yup. Will have a look tonight or tomorrow.

So, how to remove such things ? You have the "chroma swap" problem that chroma_rep should restore (I can't look at your video sample to confirm it, but judging from the image, it seems to be the case)
Try:
#bobber of your choice (I'd go for tempgaussmc_beta1mod())
chroma_rep(cache=10) #found in srestore's thread
tdecimate(1,3,5)

MOmonster
10th February 2009, 19:11
@thetoof
You have seen the chroma swap but you advised chroma_rep. This function is only for chroma blending with a dupped blend and a missing clear field.

@Kurtnoise
I don't know the reason for this chroma problem, it's not in the source, has to be something inside the function. Using a bobber + srestore seems to work (don't tested your whole sample). I will test AnimeIVTC later to see if I can reproduce this behaviour.

Kurtnoise
10th February 2009, 19:55
nope...that doesn't help either.

Tried:

MPEG2Source("E:\CONAN_SCN\Opening\VTS_01_1.d2v")
Crop(10, 2, -10, -2)
TempGaussMC_Beta1mod()
SRestore()
Lanczos4Resize(688,512)

Nightshiver
10th February 2009, 21:41
Oddly enough, a simple animeivtc(mode=2, aa=0, iregion="PAL", oregion="PAL") didn't produce that strange chroma problem in your picture. Perhaps it's because of you using aa, degrain, precision or a combination of those. You also use yadif instead of the regular bobber. If all else fails, VFR could save it.

thetoof
11th February 2009, 05:45
@thetoof
You have seen the chroma swap but you advised chroma_rep. This function is only for chroma blending with a dupped blend and a missing clear field.
Wohohow, now I'm lost. Regardless of however I called it before, this problem is indeed chroma swap between fields. You say that chroma_rep is not intended for this, but the sample for which you scripted it had the same issue:

i=mpeg2source("0101.Dograce.Sample.d2v") #found in post #293 of this thread, sample that lead to the creation of chroma_rep()
b=i.tempgaussmc_beta1mod(edimode="nnedi")
b1=b
b2=b.trim(1,0)
b3=b.trim(2,0)
b4=b.trim(3,0)

c=b.chroma_rep(10)
c1=c
c2=c.trim(1,0)
c3=c.trim(2,0)
c4=c.trim(3,0)

stackvertical(stackhorizontal(b1,b2,b3,b4),stackhorizontal(c1,c2,c3,c4))
trim(2819,-1)
Result: http://img27.imageshack.us/img27/6109/chromareptest0io1.jpg

Regarding Kurtnoise's problem:
mpeg2source("opening.d2v")
tempgaussmc_beta1mod()
srestore(frate=25)
works for me, as MOmonster said (similar to what you suggested Nightshiver, the only difference is that the current public version of animeivtc still uses the old blend removers)
Kurtnoise, could you test and report what options lead to such a problem? It is very very awkward and I can't duplicate it.

yup, huffyuv returns a b0rked output, but it works in MPC with ffmpeg's huffyuv decoder. I don't know/have the time to search how to disable the standalone huffyuv to use ffmpeg's one, so could you tell me how?

Kurtnoise
11th February 2009, 08:09
thanks guys...Finally, I found the culprit. It was some "wrong" values from the Crop line.

MOmonster
11th February 2009, 09:08
As far as I remember the problem was like this (a little bit different):

Chroma: AA BC BC CC DD ...
Luma: AA BB CC CC DD ...

output of chroma_rep difference between chroma and luma is used for detection:

Chroma: AA 2*BC-CC CC CC DD ...
Luma: not touched

yup
16th February 2009, 09:26
thetoof
Originally Posted by yup
No problem!
100 frames nonprocessed huffyuv encoded video.
http://www.sendspace.com/file/w5zur9
yup.

Will have a look tonight or tomorrow.

You forget about my sample? Sorry for impatience.
yup.

Nightshiver
16th February 2009, 15:35
We don't need encoded video. Give unprocessed RAW files, e.g., .m2v from DGIndex.

yup
16th February 2009, 18:28
Nightshiver!
It is huffyuv encoded video, loseless.
yup.

Kurtnoise
16th February 2009, 19:26
try this:

AVISource("sample.avi")
AnimeIVTC(mode=2, aa=2, iregion="PAL", oregion="PAL")

jason288
17th February 2009, 18:38
@thetoof
I am working on encoding The Simpsons HD that aired the other day. Do you have any ideas on what I can do to improve this encode?

http://www.mediafire.com/download.php?iqgjyhwqzt3 - here is the encode, there is bouncing lines everywhere

http://www.mediafire.com/download.php?gfyjemgkfy3 - here is the source.

Any help with this is greatly appreciated.

yup
18th February 2009, 09:56
@Kurtnoise :thanks:
Little simpler
AVISource("sample44.avi")

AssumeTFF().Interleaved2Planar()
daa()
Planar2Interleaved()
#Anti-aliasing with contra-sharpening by Didйe, modded by Terranigma for nnedi and by thetoof for merge
function daa(clip c) {
dbl = merge(c.nnedi(1),c.nnedi(0)).Interleaved2Planar()
c=c.Interleaved2Planar()
dblD = mt_makediff(c,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11,planar=true),U=3,V=3)
DD = shrpD.repair(dblD,13,planar=true)
return dbl.mt_adddiff(DD,U=3,V=3).Planar2Interleaved() }
I find solution, problem was only aliasing not field matching.
yup.

RsVolcom
18th February 2009, 10:22
@Jason

SharpAAMCmod()
gets rid of the jumping lines for me

jason288
18th February 2009, 16:00
@RsVolcom
When I try and run this Megui and AvsP both crash. I have all the plugins that are required. I tried just putting the source and SharpAAMCmod() in the script and it still crashes.

Anyone have any ideas?

RsVolcom
19th February 2009, 02:47
No ideas really. I have two Vista machines. When MeGui gives me an error I take the encode and do it in the living room. No explanation really...MeGui has always been very buggy for me.