View Full Version : AnimeIVTC() - All-in-one solution for interlacing and blending - v2.00 [2010-01-07]
thewebchat
8th November 2009, 22:42
"You are happy! Use "Force film" in DGIndex and IVTCing/Deinterlacing/Deblending doesn't concern you anymore! "
That's what you have to do.
Chengbin
8th November 2009, 22:55
That's what you have to do.
Do I have to use DGIndex? I prefer to use dss2. Even if I use DGIndex, what do I put for mode?
Nightshiver
8th November 2009, 22:59
DSS2 is just a way to call the file in avisynth. Yes, use DGIndex, it is the easiest way. To do this select "Force Film", as it says in the directions. If you don't know where this is, you don't deserve to use it. It's not hard to find it in the simple interface of DGIndex.
Chengbin
8th November 2009, 23:21
DSS2 is just a way to call the file in avisynth. Yes, use DGIndex, it is the easiest way. To do this select "Force Film", as it says in the directions. If you don't know where this is, you don't deserve to use it. It's not hard to find it in the simple interface of DGIndex.
I do know, it is just one extra thing I got to do with every file, and that becomes a lot because I have to cut videos up to achieve multithreading.
And what mode should I choose? Even force film still gives a message to choose a mode.
osgZach
8th November 2009, 23:45
I think the point is, you don't need to use AnimeIVTC, but I could be way off base here...hehe
thewebchat
9th November 2009, 00:04
I think the point is that IVTC or Inverse TELECINE is a procedure that is only applied to TELECINED video. Telecined video is of course INTERLACED. If your video is 24fps, it is clearly PROGRESSIVE and therefore NOT INTERLACED and therefore NOT TELECINED and therefore you DON'T NEED TO USE IVTC.
That means you don't need to use DECOMB, or TIVTC, or ANIMUIVTC, or ANY OTHER IVTC.
Does this make it any clearer for you, ChengBin?
Chengbin
9th November 2009, 00:23
I think the point is that IVTC or Inverse TELECINE is a procedure that is only applied to TELECINED video. Telecined video is of course INTERLACED. If your video is 24fps, it is clearly PROGRESSIVE and therefore NOT INTERLACED and therefore NOT TELECINED and therefore you DON'T NEED TO USE IVTC.
That means you don't need to use DECOMB, or TIVTC, or ANIMUIVTC, or ANY OTHER IVTC.
Does this make it any clearer for you, ChengBin?
That's the point. How do I skip these, and jump straight to AA?
thewebchat
9th November 2009, 00:33
...what?
dongs = GetDongs("dongs.avi")
AntiAlias(dongs)
Chengbin
9th November 2009, 01:22
...what?
dongs = GetDongs("dongs.avi")
AntiAlias(dongs)
I feel stupid.
Thanks so much.
osgZach
10th November 2009, 17:02
Ok here's something useful (I hope)..
For my problem discussed above.
I think I have spotted a pattern that is
(i/i/i/i/p)
4 Interlaced followed by 1 progressive
I'm not sure if this is the ONLY pattern, but it is one I have found in multiple parts of the entire video. There are some bits of progressive scenes involving movement (either was hard to spot the interlacing/telecine or its pure video) with hints of a random-ish pattern on a scene change before or after the progressive part(s) (not 100% sure but seems like it)
How should I deal with this pattern? Keeping in mind the goal is create a VFR MKV w/timecodes, as good a picture as possible, as smooth as possible with no artifacts like blending, major stutter, etc where possible
thewebchat
10th November 2009, 17:05
@osgZach:
I need a sample. 30 frames of this pattern should be enough. My guess is that this is one of 5 possible double-telecine modes.
Note: Double telecine obviously appears when two telecined videos are combined out of phase. Depending on how out of phase they are, you can have anywhere between 2 and 4 of every 5 frames combed, where 2 is normal telecine and 4 is the worst kind.
osgZach
10th November 2009, 17:37
I will get you a sample ASAP, will take some time to upload.
I had a really sneaky feeling it was double telecined. Although just for the record I have run it through a mode 2 encode, which decimated to 23.976 and still left some bad stutter. So hoping for a better outcome than that.. (and still can't get mode 6 / vinverse error solved, grr...)
Will post back when sample is uploaded.
osgZach
10th November 2009, 17:56
Ok I have 3 files for you.
the D2V I used to demux the video I cut out
the M2V video to be examined - its about 44 secs long.
and a log file from DGIndex, just in case it can be useful.. (I jut tapped F5 and let it run for a bit to fill in some of the blank stuff)
Appears to repeat no framed/fields, so don't know if that is significant.
D2V (http://www.oldskoolgames.com/videos/destruction/VTS_01_1.d2v)
M2V - Video Stream demuxed from VOB - Honor Pulldown (http://www.oldskoolgames.com/videos/destruction/VTS_01_1.demuxed.m2v)
Log File from DGIndex (http://www.oldskoolgames.com/videos/destruction/VTS_01_1.log)
If you have any trouble with the URL let me know and I'll get it sorted.
I can give more samples if needed. This sample is from the beginning of the video. (I wanted it to be frame accurate, for pattern spotting, from frame 0, I would have given more but DGIndex doesn't list framenumber so was hard to tell where I was gonna cut from)
Nightshiver
10th November 2009, 21:15
DHT. Use mode=2.
thewebchat
10th November 2009, 21:21
[Previously there was wrong information here.]
osgZach
10th November 2009, 23:15
Thanks for taking the time to look. I'm pretty inexperienced as far as this stuff goes, but its good to know that the feeling I had deep down inside that it was just a crappy source was at least right on the money.
As I said, I'm pretty new to this, so if you could indulge me a little and elaborate on doing what you described (I don't know the terminology LCM? Not sure what "half-rate" means either but I am a little familiar with TDeint.)
I would really appreciated it, as I'd really like to fix this movie up if possible.. Trying to move all my videos into a digital collection, as my new WDTv Live has bitten the encoder bug in me.
As an aside, I was wondering if it were say, humanly possible for me to cut it up and isolate all the different problems/fps sections, and maybe tailor their treatment on a case by case basis, working towards a particular FPS (or at least at that point I could manually write a timecodes file?) then join it all back together inside an MKV w/said timecode..
Regarding the trouble pans (I think I know what you're talking about) would it be possible to reconstruct those scenes myself, if I could get a few cleaned/decombed Bitmaps to work with? Or is that just too much work?
Sounds like too much work to me.. At least for a disc backup as its not like its the last source on the planet and I'm trying to restore it :rolleyes: All I know is I don't understand HOW something as mangled as this can possibly playback even remotely smoothly on a TV.. I guess I just don't understand the way interlacing/telecine works :p I'm surprised no one has come up with a way to artificially emulate that process to convert 24FPS - > 30FPS smoothly in hybrid videos.. I know that doesn't apply to -my- problem here, but just in general.. But I'm a dreamer :stupid:
Thanks so much for taking a look at it, and if you could just explain the process you mentioned I would appreciate that.
thewebchat
11th November 2009, 00:06
[Previously there was wrong information here.]
manono
11th November 2009, 02:33
As thewebchat says, it's a pretty awful source. As far as I know nothing can remove that nasty flickering or the aliasing in thin lines. However, it's been fieldblended from a 23.976fps source and it can be returned to 23.976fps and played smoothly. Maybe AnimeIVTC has some tricks to improve the final appearance, but here's an XviD AVI of it (8.37 MB):
http://www.mediafire.com/?yt0odiwfejt
made using this script:
EDI=NNEDI2(Field=-2)
YadifMod(EDeint=EDI, Mode=1)
SRestore(FRate=23.976)
Crop(8,0,-8,0)
LanczosResize(512,384)
For faster encoding just use Yadif or your favorite bobber.
thewebchat
11th November 2009, 03:13
Oh, you're right. I always keep forgetting to check for that. Well, in that case, that makes my previous analysis pretty much incorrect. That's good news for you, osgZach, you're not totally screwed \o/.
I would also consider EEDI2 over nnedi2 here. It might reconnect a few more edges.
osgZach
11th November 2009, 03:19
The clip was from Gall Force: Destruction. I don't know what year its from offhand, but Gall Force is a long running OVA series of sorts, with several volumes spanning different story arcs. Eternal Story (the prequel in this case, since the main character in this one was in the first half of Eternal Story) came out in 1986 I believe.. I didn't see it until the mid 90's when I was 11 or 12 or something.
But it was the first Anime I'd ever watched as a kid, aside from Robotech, so when a box set came out, I jumped at the chance. So yeah these movies are kind of dear to me, which is why I'm going through so much effort.
I'll see about giving that strategy a try.. I may have found a comprimise but i have to wait to on the analysis pass and then encode to finish (hopefully by mid morning tomorrow). I was playing around and decided to change the FPS to 120, and playback was definitely smoothed out in a lot of areas.
So I'm doing a VFR decimation run w/AnimeIVTC in mode 5, with it already at 120fps. Then I'll probably mode 2 it down to 23.976 (which btw does not come out smooth Manono, I previously did this and chucked the file in dispair). Speed that one up to 120FPS and see which one looks better.
I'm willing to live with the file size if its worth it.. Otherwise I'll see about applying your methodology as well. I'm hoping 120FPS will do me good though, as I know it was an old skool trick that seemed to work well, file size trade off aside.
If anyone likes the usual 80's Robot Anime stuff, I highly recommend Gall Force. I have only seen 4 of the OVA's (I don't have any of the newer ones and only learned about them 5 or 6 years ago) but they are really good for their time. It seems like this is one of those rare series that never got much exposure but has a small and dedicated fanbase. I actually have a Comic Book adaption of Eternal Story. It was a pretty sweet find on ebay, I never knew they existed. Eternal Story in particular kind of kicks of this alternate theory of where Humans came from, and gives a little backstory on the origins of our moon.
edit:
I haven't looked at that posted Xvid, but I will check it out.. see what I can do with those encoding settings.
edit:
I looked it over.. Yeah I pretty much got the same results by changing it to 120fps. If the file size comes out reasonable and no other major problems, I'll probably pick the best between mode5 / mode2 as I really do love the level of quality AnimeIVTC can deliver.. It did a GREAT job on Eternal Story. Just glad that one came out great in mode 5 with no problems (go figure), as its my absolute favorite from the entire series.
thewebchat
11th November 2009, 03:42
Unless you have a 120 Hz display, you're actually only seeing 60 fps (probably less due to vsync issues). manono's methodology can restore the material to its original framerate (when successful), which is the theoretical smoothest result you can obtain.
Also, the "old school" 120 fps trick doesn't really have anything to do with this. It's just a hack to get 24/30 VFR into AVI using null frames. It does not involve coding 120 frames per second.
osgZach
11th November 2009, 04:00
Well, like I said... new guy :stupid:
I will certainly be giving all methods a try.
manono
11th November 2009, 04:58
Then I'll probably mode 2 it down to 23.976 (which btw does not come out smooth Manono, I previously did this and chucked the file in dispair).
Eh? Is AnimeIVTC's Mode 2 the same as using a good unblender? If it is, then there must be parts elsewhere at a different base framerate than the sample. Did you have a look at what I uploaded? It seems to me to be about as smooth as anime gets. If Mode 2 isn't the same, then why are you even mentioning it can't play smoothly at 23.976fps since they'll arrive at that framerate using different methods?
I don't use AnimeIVTC, but can spot fieldblended garbage a mile away.
thewebchat
11th November 2009, 07:11
A quick glance at previous pages indicates that mode 2 is (like all the other modes except 1) just a convoluted call to a deinterlacer. This will obviously not decimate cleanly with standard decimation. Mode 5 seems to be a convoluted VFR detection method that would be 2 lines of TIVTC calls and a lot more understandable. This won't work either as it will just end up deinterlacing like mode 2. Actually, I think one of the modes is a convoluted call to SRestore :devil:, so maybe osgZach should go find that one for his "usual AnimuIVTC quality."
osgZach
11th November 2009, 16:30
Manono, I did look at your clip, and edited the bottom of my post to correct myself. What you did came out very nice framerate wise, and I appreciated that, so I do plan to give it a try and then maybe just run it through some other filters after the fact to try and get it cleaned up more.
As for the inner working of AnimeIVTC its all greek to me... I only know how to understand very basic scripts, and nothing like that.. I was hoping that I could maybe cannibalize it and isolate what it was doing to deliver the picture quality, but after trying out several bobbers I came to McBob and that looks like where most of the quality is coming from.
I've got my plate full, but you guys have been very helpful with the past few posts. It's given me some fresh ideas to start with.
Just for giggles I started that script last night with it bumped up to 120fps before the AnimeIVTC call.. The analysis pass took 6 hours, and I'm 8h:34m into a 2nd pass mode 5 with 1d:4h:32:m remaining.. LOL! But I'm only doing this to satisfy myself and see what it looks like so I don't mind spending/wasting the time on it. Like I said the whole script is greek to me though, but it's surprising how similar you say mode2/5 are, when mode2 will take about 24hr to encode at standard base FPS starting point, but mode5 only takes half a day or less for both passes in total.
Very weird stuff.. I probably should have paid more attention to math in school too, by the looks of it :scared:
But anyway you two have been real helpful with this. And I think I will get it sorted out.. If you have curiosity to satisfy, thewebchat, I can upload a few more samples for you, no problem. Just let me know. I think I have srestore, didn't play with it much though.. But I do think most of the quality is coming from whatever bobber AnimeIVTC is using.
osgZach
11th November 2009, 16:55
Manono, I had to hunt down YadifMod and NNEDI2, but I'm running your script now. Will let you know how it turns out :)
thewebchat
11th November 2009, 17:50
I didn't say they were the same. I said they would return the same result for your clip (because it won't be able to find any VFR). I think the reason it's taking forever in analysis mode is because it's (unnecessarily) using MCBob for duplicate analysis when a simpler deinterlacer would be sufficient. Actually, as far as I know, MCBob can't compensate blends/fades anyway, so most of your quality is actually coming from nnedi.
osgZach
11th November 2009, 18:33
Guess I just misread what you had said.. I suppose its all moot anyway.. being greek to me. about 2h:30m to go on Manono's script, so we'll see what happens with it.
One day I'll hopefully understand it all :rolleyes: Just praying the next OVA in the set, Stardust War, isn't going to be this bad.. Pretty surprised Eternal Story went through so easily, so maybe this was just one of the flukes you get in an otherwise good set.
osgZach
11th November 2009, 21:21
It worked out great Manono, thank you so much for that script.
I'll see what I can doto clean it up a little more now :)
Alternatively.. is there anyway to use something like mcBob with that script? I know you mentioned swapping stuff out, etc.. I'm not sure what I should touch really, or if something specific you did got me the results in a guaranteed way that I shouldn't deviate from.
thewebchat
11th November 2009, 21:57
You can use MCBob in manono's example by swapping out nnedi(field=-2) for mcbob(), but I don't recommend it. You can't recover any detail from a blended source using motion compensation. All you'll do is waste time, and possibly add artifacts.
However, try swapping it for "SeparateFields.EEDI2(field=-2).AssumeFrameBased." On some cartoons, EEDI2 can straighten out the lines better than nnedi.
osgZach
11th November 2009, 22:41
Ok I will give that a try.
I know that I can't really articulate what I want/need to replace, again because I don't quite understand what AnimeIVTC is doing in particular..I know it has references to all three of these tools in the code; I can just explain my interest in mcBob along these lines.
When comparing the quality and detail of a scene, I loaded a D2V project in Vdub without any filtering and just used mcBob.
That very closely resembled the kind of picture I was looking for, which AnimeIVTC was giving me in both mode 5/2 with aa=4
(I tried isolating whatever the AA code was, but couldn't get any real results that seemed to make a huge impact).
The FPS during encoding matches AnimeIVTC's low numbers of 1 -3 FPS in mode 2, when using mcBob all by itself.. so I assumed whatever was going on it had to be responsible for the bulk of the detail and cleaning I was seeing (although I know AA contributes as well).
So maybe I am on the wrong track and confused myself also, I'm not really sure. However I will definitely give your code suggestions a try. My biggest problem right now, is that although the smooth playback rate has been fixed and is excellent now. A lot of the lines that define character bodies etc ("outter/edge" lines? ) show that crawling type problem where they are moving. So maybe the issue is more to do with image stabilization than aliasing? AnimeIVTC definitely took care of the problem, either completely or to the point where it was barely noticeable.
thewebchat
12th November 2009, 04:00
Crawling as in a checkered dot pattern? Because I did see some rainbows, which usually come hand-in-hand with dotcrawl. Or do you mean the jagged lines?
For the first problem, you could use BiFrost before nnedi2/EEDI2 and SSIQ after SRestore. For the second, try one of the following code blocks after SRestore:
PointResize(last.width*2,last.height*2)
TurnRight.SangNom.TurnLeft.SangNom
Spline36Resize(last.width/2,last.height/2,-0.5,-0.5,last.width,last.height)
TurnRight().EEDI2(field=1).TurnLeft().EEDI2(field=1)
Spline36Resize(last.width/2,last.height/2,-0.5,-0.5,last.width,last.height)
nnedi2_rpow2(rfactor=2)
Spline36Resize(last.width/2,last.height/2,-0.5,-0.5,last.width,last.height)
Merge(nnedi2(field=1),nnedi2(field=0))
This is listed in descending order of strength and is mostly equivalent to antialiasing in AnimuIVTC. I think mode=4 adds in lots of nasty warpsharping which you could throw it as well.
osgZach
12th November 2009, 16:58
Yeah, more to do with jagged lines.
Some of that looks kind of familiar, so its likely what I'm looking for. I will be giving them a shot..
In other news, I did Stardust War last night. I'll be damned DGindex actually defined it more clearly than the previous two videos.. (Video 93-ish %, frame type Interlaced ). The mode5 came out pretty decent overall, but still kind stuttering in small scenes.. That could just be the animation quality, but the most annoying part is most of them are panning shots, so... lol
I think I may go back and reapply the method that worked for Destruction, on a small portion just to test it. If anything it'll probably teach me something new.
As for the rainbowing - I guess I don't know what to look for (or it ends up fixed in my encodes somehow) because I have never seen anything odd.. I mean ocassionally I will see near the top, a blue-ish hue (like when you stick a big magnet next to a TV and screw it up) but I am unsure if that is actually the lighting effect from the production itself, or an error of some sort. It seems very rare in terms of enough to make you notice though.
Thanks again for those code snippets, I will put them to good use.
osgZach
18th November 2009, 20:47
Sorry to be a pest, but I'm unable to solve the problem I have with not being able to use Mode=6
[E] Error: Avisynth open failure:
Script error: Invalid arguments to function "vinverse"
(AnimeIVTC - v1.06.1.avsi, line 348)
(H:\Gall Force Project\Stardust War\Stardust War.avs, line 3)
I have tried getting vinverse.dll from a secondary source (they were the same size but even replaced it for the hell of it). And nothing changed. I've tried taking out and adding different settings, but the error never changes.
I really don't know what to make of it, however I examined the source and I believe that Mode=6 may be the needed mode.
DGindex reports 93.65% Video. I have interlaced credits that appear to be pure interlace with no progressive frames mixed in.
More than being bothered by what appropriate action to take (just mode 5? chop off the credits, mode5 the main movie, deinterlace the credits, splice them together and edit the timecode accordingly for the frame block the credits occupy? or...) I'm more annoyed by the fact Mode6 does not want to work and keeps throwing this vinverse error, as I don't see why its doing this in the first place.
Here is the section of code that the offending code it reports as causing the error belongs to.
####################
#Kill combing
toprocess = (mode==1 || mode==2 || omode==1) ? finalcfr : (mode==5) ? matched : (omode==2) ? spliced : i
dec0=(check!=11 && check!=5) ? errormsgs : toprocess
dec1=(check!=11 && check!=5) ? errormsgs : toprocess.vinverse()
dec2=(check!=11 && check!=5) ? errormsgs : toprocess.vinverseD()
dec = (killcomb==0) ? dec0 :
\ (killcomb==1) ? dec1 :
\ (killcomb==2) ? dec2 :
\ errormsgs.subtitle("Please use killcomb = 0, 1 or 2")
#Prepare clip for killcomb comparison
compdec = interleave( dec0.subtitle("killcomb=0",align=9),
\ dec1.subtitle("killcomb=1",align=9),
\ dec2.subtitle("killcomb=2",align=9))
####################
Here is the most recent variation of the script I've tried
d2vpath = "Stardust War.d2v"
mpeg2source(d2vpath)
AnimeIVTC(mode=6, aa=0, omode=2, pass=0)
remove MT=true, added omode= flag, tried different pass= flags
I tried declaring BFF as well and that had no effect on the outcome. (I am 99.9% certain its BFF, again putting it at odds with the two previous OVA's which came out fine as TFF. AssumeBFF / Separatefields gives the smoothest playback I have seen)
8 - DGIndex gives you a percentage of Film or Video from 50 to 100% and you see a 3:2 pattern + progressive sequences (not only the credits, but the whole frame is) + the credits are truly interlaced and/or progressive.
I am sure that I have seen a 3:2 pattern+progressive mixed in, although maybe I am getting confused?
I will post a demuxed sample shortly. Because I really am confusing myself.. I see stuff that looks like it could be interlacing, but it is not readily apparent in the whole seen, like clear interlacing would be if something changed position over a substantial distance.
I probably am confusing myself too.. for all I know I still may not need mode 6 (although restoring to 23.976 produce major jerking, whereas on the 100% video Eternal Story/Destruction it did not. So I'm pretty sure its wonky but doesn't need SRestore like my last two OVA's did).
So far I have spotted:
What appears to be both an i/i/i/P/P and i/i/P/P/P or weird combinations of the two. This could just be my eyes playing tricks + lack of experience
What appears to be a random i/P pattern with no order in some parts.
And of course, the pure interlaced credits.
Note: There are two credit rolls. The first is Japanese and appears to follow whatever pattern the video has. The second are English credits which never deviate from an Interlaced pattern that I can tell
As usual I've probably given too much info and made it all confusing to read. But anyway, thanks for any help that can be given. I will get a sample up right away if anyone genuinely wants to take a look. I will sample multiple sections of the film this time if so.
thetoof
19th November 2009, 03:50
Current AnimeIVTC is a buggy and obsolete patched mess. I'd recommend that you do everything externally for the time being.
I'm sure many will be pleased to help you, namely thewebchat who seems so eager to express his hatred of all-in-one functions every now and then. Yes, SMALL (max 10mb) m2v samples of the different sections are needed.
Back to work now, good luck.
- I might like to take a look at your source, as it's been a while and I'm looking into finding excellent sample for the upcoming guide (it should be out before 2050, promise :p).
osgZach
19th November 2009, 15:49
Yeah, thewebchat is a pretty helpful dude, although I don't necesarrily share his views.
However I'm more concerned with finding something that works, I actually only came back to AnimeIVTC after the code I got and used on the two previous OVA's failed to deliver expected results (even after attempts to modify it).
Samples are forthcoming, as I didn't have time to do anything last night. I'll combine those links into a post outlining all the methods I've tried so far. It's probably something stupid I'm doing wrong, but this source is now more annoying than Destruction was (although I swear I encoded a good copy earlier in the month as I remember watching it).
I did mode 5 it overnight since I had nothing better to do.. With puzzling results, however I'm waiting on a fast x264 encode so I can see what it does when muxed. It came out VFR decimated to 11FPS (lol?), Timecodes claims assume 29.97 then lables all frames 23.976 and the file as 100% Film (wtf?) although DGindex claims its 93.65% video, and also that it is TFF, however AssumeBFF().bob() clearly provides the smoothest playback animation.
Samples by noon I hope. Really confuzzled :stupid:
osgZach
19th November 2009, 17:38
I apologize if any of these are too large. DGindex project files included just in case needed.
Sample from beginning of video
Sample 1.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample1.d2v)
Sample 1.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample1.m2v)
Random Sample
Sample 2.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample2.d2v)
Sample 2.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample2.m2v)
Random Sample (1 minute long, bad guesswork on my part)
Sample 3.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample3.d2v)
Sample 3.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample3.m2v)
R1 English Credits
Sample 4.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample4.d2v)
Sample 4.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample4.m2v)
DGIndex Project File for entire video file
Click here (http://www.oldskoolgames.com/videos/stardustwar/Stardust_War.d2v)
TFF or BFF? Hell if I know
Its reported as TFF in all indexing programs/encoding apps, yet AssumeBFF().bob() results in the smoothest playback I have seen thus far in Avisynth. Although testing it now looks both give roughly the same smoothness.. I wonder if it was the code sample I referenced (lost the thread, it was on here though)
AnimeIVTC - Mode 5 VFR Decimation - Pretty sure AssumeBFF was used (I saved modification of the files on accident)
Results in 2nd pass file generated as 11.988FPS. The timecodes generated assumes 29.970, all frames marked as 23.976. Playback results in A/V desync with video track running faster. Stutters are present but much less (due to less frames probably). Did not even bother attempting a Mode2 encode based on results from next script.
Mode 5 VFR Stats (http://www.oldskoolgames.com/videos/stardustwar/mode5_stats.zip)
Avisynth Script(s)
d2vpath = "Stardust War.d2v"
mpeg2source(d2vpath)
bifrost(interlaced=true)
AssumeBFF()
EDI=NNEDI2(Field=-2)
YadifMod(EDeint=EDI, Mode=1)
SRestore(FRate=23.976)
Stab()
SSIQ(interlaced=false)
File comes out at 23.976P, good picture but major stuttering issue in random parts.
With SRestore(FRate=29.970) - Same result but different degrees of stuttering in mostly the same areas, although some seem less intense and vice versa.
That's about the limit of my knowledge here, I just cannot get it to come out smoothly. Like I said earlier its probably something stupid that I'm (not) doing. I am pretty sure attempts without any AssumeBFF declarations also let to the same problems.
However if that really is the cause then, somebody shoot me. I'm hoping its more complicated than a n00b mistake like that.
egrimisu
19th November 2009, 19:26
None of the video sample(m2v) links are working. Upload somewhere else
I apologize if any of these are too large. DGindex project files included just in case needed.
Sample from beginning of video
Sample 1.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample1.d2v)
Sample 1.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample1.m2v)
Random Sample
Sample 2.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample2.d2v)
Sample 2.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample2.m2v)
Random Sample (1 minute long, bad guesswork on my part)
Sample 3.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample3.d2v)
Sample 3.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample3.m2v)
R1 English Credits
Sample 4.d2v (http://www.oldskoolgames.com/videos/stardustwar/Sample4.d2v)
Sample 4.m2v (http://www.oldskoolgames.com/videos/stardustwar/Sample4.m2v)
DGIndex Project File for entire video file
Click here (http://www.oldskoolgames.com/videos/stardustwar/Stardust_War.d2v)
TFF or BFF? Hell if I know
Its reported as TFF in all indexing programs/encoding apps, yet AssumeBFF().bob() results in the smoothest playback I have seen thus far in Avisynth. Although testing it now looks both give roughly the same smoothness.. I wonder if it was the code sample I referenced (lost the thread, it was on here though)
AnimeIVTC - Mode 5 VFR Decimation - Pretty sure AssumeBFF was used (I saved modification of the files on accident)
Results in 2nd pass file generated as 11.988FPS. The timecodes generated assumes 29.970, all frames marked as 23.976. Playback results in A/V desync with video track running faster. Stutters are present but much less (due to less frames probably). Did not even bother attempting a Mode2 encode based on results from next script.
Mode 5 VFR Stats (http://www.oldskoolgames.com/videos/stardustwar/mode5_stats.zip)
Avisynth Script(s)
d2vpath = "Stardust War.d2v"
mpeg2source(d2vpath)
bifrost(interlaced=true)
AssumeBFF()
EDI=NNEDI2(Field=-2)
YadifMod(EDeint=EDI, Mode=1)
SRestore(FRate=23.976)
Stab()
SSIQ(interlaced=false)
File comes out at 23.976P, good picture but major stuttering issue in random parts.
With SRestore(FRate=29.970) - Same result but different degrees of stuttering in mostly the same areas, although some seem less intense and vice versa.
That's about the limit of my knowledge here, I just cannot get it to come out smoothly. Like I said earlier its probably something stupid that I'm (not) doing. I am pretty sure attempts without any AssumeBFF declarations also let to the same problems.
However if that really is the cause then, somebody shoot me. I'm hoping its more complicated than a n00b mistake like that.
egrimisu
19th November 2009, 19:28
Hi toof,
You shall consider finding how to deinterlance mixes of hardtelecine and DHT, i have a lot of anime with this problem that wait for some kind of miracle.
Current AnimeIVTC is a buggy and obsolete patched mess. I'd recommend that you do everything externally for the time being.
I'm sure many will be pleased to help you, namely thewebchat who seems so eager to express his hatred of all-in-one functions every now and then. Yes, SMALL (max 10mb) m2v samples of the different sections are needed.
Back to work now, good luck.
- I might like to take a look at your source, as it's been a while and I'm looking into finding excellent sample for the upcoming guide (it should be out before 2050, promise :p).
Nightshiver
19th November 2009, 19:46
Egrimisu, could you post a few samples of such anime?
osgZach
19th November 2009, 21:29
I sincerely apologize, I keep forgetting that DGindex throws on that damned "title.demuxed.ext" even when you custom name stuff.
I've fixed the filenames..
MOmonster
20th November 2009, 00:26
@osgZach
I tested sample 1 and 3 and both are not suited for srestore. This is no norm conversion with blending. It looks like simple telecined with a bad temporal filter. I just used this:
tfm(order=0,cthresh=7,MI=38,pp=0,mmsco=false,micmatching=3)
tdecimate()
I think a dup filter can help to have even less blend-like artefacts.
Edit: for both samples bff was right.
egrimisu
20th November 2009, 09:17
Egrimisu, could you post a few samples of such anime?
Allready posted a few weeks ago.
Here is the source : http://www.megaupload.com/?d=FUBG7WGN
using mode1 : http://www.megaupload.com/?d=ZK5SHBB3
usign mode2 : http://www.megaupload.com/?d=CHLUJDCY
the part i encoded seemed to me like double hard telecine, the rest of the m2v is hard telecine you can see the 3/2 pattern. Please compare the encodes, the avi's are encoded using huffy
If you'll take a look in the mode1 encode you'll see that when plays the stadium the first 20-30 frames are interlaced but the other are ok. This means that probably the first frames where double hard telecine ad the other where simple. The whole episode is combined witch these type of frames. It would be deadly if i'll have to do this manually.
osgZach
20th November 2009, 15:25
Thanks MOmonster, I will try out that and let you know how it goes. Although I've never used a Dup filter before (I think I'm afraid I'll screw up and get rid of non-dupes, assuming thats possible)
Just curious, how you came to the conclusion? If you could explain the terms you used as well. I'm interested in learning all about different types of sources and how they come to be, etc.
edit: Presently still getting jerky sections with the code as provided (also tried keeping it at 29.97 by not calling TDecimate), not sure what kind of decimation to try..
Is there a strategy to guesstimating dupes or a guide / some further tips someone can provide?
One particular section is the scene just after the Sample #1 clip I provided, I can provide that too ?
Other than that, I thought perhaps I got my original one that seemed to work fine by using the 2-pass VFR example from TIVTC package, so I am waiting on the H264 encode to finish to see what happens (lots of 23.976 calls and a few 17.982)
MOmonster
20th November 2009, 21:48
@osgZach
For your third sample, this script really worked for me:
tfm(order=0).tdecimate(mode=1)
I will have a look on your other samples when I'm back after the weekend. Maybe it's hybrid.
Just curious, how you came to the conclusion? If you could explain the terms you used as well. I'm interested in learning all about different types of sources and how they come to be, etc.
I have written a small guide for this some time ago. I will upload it after the weekend, if you want.
osgZach
20th November 2009, 22:06
Sure that would be great. Upload it when you get a chance. I am fairly certain this may be a hybrid source, as out of the 3 in the set, its the only one which DGIndex actually reports as a percentage of video and not 100%.
I will see how the new code works. I did run the DVD Image through Handbrake with "keep same framerate as source" or whatever the option is, and it seems to have come out the smoothest so far. So I guess if all else fails, I could probably at least use handbrake to get Constant Quality as close to lossless as possible, save the timecode it generates, then do any cleanup and remux it with those timecodes?
osgZach
21st November 2009, 04:48
Well that newest code sample worked out relatively OK.. its pretty passable quality, but still some pretty micro-stuttering in some scenes, or not quite smooth motion. Overall though I think it could pass for something decent. I do have some residual combing though, gonna have to try and clean that up.. I can test this crap all day though so if anyone has any other scripts keep'em coming :)
Thanks for the assistance as always.
MOmonster
24th November 2009, 10:13
@osgZach
I had a look on your samples and the source is indeed hybrid. If a mkv file is no problem for you, Tdecimate gives you a solution for this problem. Read the readme to this function and use your prefered mode.
For the weaving you can use TFM. For example:
tfm(order=0,mode=0,cthresh=7,MI=54,micmatching=3,scthresh=8
You can also use your favorit deinterlacing filter with the clip2 parameter.
I uploaded the guide here (http://www.mediafire.com/?5jyzk4man1z).
osgZach
24th November 2009, 15:49
Hi,
Thanks so much for getting back to me. I actually put the project aside as I have invested around 100hours in it, so as you can imagine I was more than frustrated.
But I will be going back to it very soon, and hopefully the new info will help out.
I have seen the "clip2" thing mentioned here and there but I admit I'm still in the dark about how it works, I'm assuming its an AviSynth thing so I will have to go back and look at the documentation again I guess.
I was wondering about the various flag settings (like in your above example) is there a general rule as to a range of settings to try in a circumstance or is it one of those things you just have to play around with to learn?
Thanks again for the suggestions, and thanks for the guide.
MOmonster
25th November 2009, 14:18
'clip2' is a parameter of TFM. These settings: 'cthresh=7,MI=54,micmatching=3,scthresh=8' are subjective and don't change so much in this case, but it is really important to set the write 'mode' for what you want. The function is documented very well;-)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.