Author Topic: AnimeIVTC  (Read 5703 times)

Offline HateBreeder

  • Member
  • Posts: 4
    • View Profile
AnimeIVTC
« on: April 21, 2010, 04:07:57 AM »
Hello guys

I'm from a little group in Greece and we wanna sub bleach. I have the ntsc Japanese DVDs and I'm trying to rip then but I have some problems. I use
Code: [Select]
tfm(order=1).tdecimate(mode=1,hybrid=3) to deinterlace and everything's fine with the op, main ep. and the next ep. preview, but the ending has scrolling credits and they are completely messed up. Here's a screen shot:


A fellow encoder said I should use animeIVTC so I did. But I couldn't pull it off.

Any ideas?
Thanks in advance.

Offline HateBreeder

  • Member
  • Posts: 4
    • View Profile
Re: AnimeIVTC
« Reply #1 on: April 21, 2010, 01:21:54 PM »
No one?

Offline RiCON

  • Member
  • Posts: 90
    • View Profile
Re: AnimeIVTC
« Reply #2 on: April 21, 2010, 02:17:05 PM »
I remember AnimeIVTC working fine.

Have you read the Docs?

Offline JEEB

  • fushizenなDTVエンコーダー
  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
    • Yet Another x264 Builder
Re: AnimeIVTC
« Reply #3 on: April 21, 2010, 02:32:03 PM »
I would guess you just have a mixed source on your hands.

Read the Bible on the basics of dealing with interlaced content and how you can check with your eyes what it contains: linky.

So, basically, if things really are as you say (since you don't know about the basics I'd guess you want to go around your DVDs once more and see if they really contain what you think they contain) : 1) you have 24/1.001fps sections everywhere else and 2) 60/1.001 fields per sec credits overlaid on X type of stuff on the credits scene.

How to deal: tfm/tdecimate other parts and deinterlace the credits (bob to 60/1.001fps from which you selecteven to 30/1.001fps)
Example:
Code: [Select]
a=mpeg2source("hurf.d2v")
part1=a.trim(0,9000).TIVTC_Here()
part2=a.trim(9001,12999).YourFavouriteBobberHere().selecteven()
part3=a.trim(13000,25000).TIVTC_Here()
part1++part2++part3
Then just see the output on which framenumbers diff. parts start in the end result and make a short v1 timecodes file. Example:
Code: [Select]
#timecodes format v1
Assume 23.976000
7000,10000,29.970000

But really, just read TheFluff's text on interlacing, pretty please. And see in AvsP/VirtualDub what the stream itself looks like. You will understand much more after you actually understand what you're dealing with :P

And yes, reading the documentation on everything you use does actually help as RiCON said.

Offline HateBreeder

  • Member
  • Posts: 4
    • View Profile
Re: AnimeIVTC
« Reply #4 on: April 23, 2010, 08:06:53 AM »
Thank you both!
I will post the results!

Offline TheRyuu

  • warpsharpened
  • Member
  • Posts: 42
    • View Profile
Re: AnimeIVTC
« Reply #5 on: April 23, 2010, 02:08:39 PM »
On the credits I guess (it looks like) the foreground is 30fps interlaced (60i) and the background is 24fps (after matching/decimation).  You're going to lose fuildness (probably not a word) in one or the other, there really isn't a choice.

Depending on the speed of the background (i.e. people moving fast or just a slow pan) you may be able to bring the entire credit sequence down to 24fps.  This is probably highly source dependent but it's worth a shot eh?  ;D

First you cut out your credit sequence and bob it to 60p (this can be done in one step and I recommend saving this to some kind of lossless file).  Then you source that lossless file and bring it down to 24p with:
Code: [Select]
Function p60to24p (clip full, int "blksize", int "pel", int "search", \
int "searchparam", int "idx", int "dct", bool "truemotion", bool "motionblur") {      


# error check variables
blksize = Default (blksize, 4)
pel = Default (pel, 2)
search = Default (search, 3)
searchparam = Default (searchparam, 1)
idx = Default (idx, 1)
idx = (idx < 1) ? 1 : idx
truemotion = Default (truemotion, true)
motionblur = Default (motionblur, true)
dct = Default (dct, 3)

# idx's allow multiple instances of function in script with any integer
idx1 = (idx * 2) - 2
idx2 = (idx * 2) - 1

# cropping for 2nd pass - depends on blksize
cropped = (blksize == 4) ? full.Crop (2, 2, -6, -6) : \
 (blksize == 8) ? full.Crop (4, 4, -4, -4) : \
 (blksize == 16) ? full.Crop (8, 8, -8, -8) : Last

f1 = full.MVAnalyse (blksize=blksize, pel=pel, truemotion = truemotion, \
     isb = false, idx = idx1, dct=dct)
b1 = full.MVAnalyse (blksize=blksize, pel=pel, truemotion = truemotion, \
     isb = true, idx = idx1, dct=dct)
f2 = cropped.MVAnalyse(blksize=blksize, pel=pel, truemotion = truemotion, \
     isb = false, idx = idx2, dct=dct)
b2 = cropped.MVAnalyse(blksize=blksize, pel=pel, truemotion = truemotion, \
     isb = true, idx = idx2, dct=dct)

p24 = full.MVFlowFPS2 (b1, f1, b2, f2, 24000, 1001,\
      idx = idx1, idx2 = idx2)
p120 = full.MVFlowFPS2 (b1, f1, b2, f2, 120000, 1001,\
      idx = idx1, idx2 = idx2)

# everything above this point is basically MVConv (), slightly optimized.
# now apply motion blur via Merge ()

a = p120.SelectEvery (5, 0)
b = p120.SelectEvery (5, 1)
c = p120.SelectEvery (5, 2)
d = p120.SelectEvery (5, 3)
e = p120.SelectEvery (5, 4)

ae = Merge (a, e) # final weight on frames - 0.1
bd = Merge (b, d) # final weight on frames - 0.2
abde = Merge (ae, bd, 2/3.0)
abcde = Merge (abde, c, 0.4) # final weight on - 0.4

Return (motionblur == True) ? abcde : p24

}

If the background is too high motion then it'll probably look like shit and blended all together, have to try it to see.  I recommend when bobbing it to 60p to use some high quality one like TempGauss or something.  Feel free to use whatever works best though.

I suppose I should point out this uses the old mvtools 1.x.
« Last Edit: April 23, 2010, 02:10:57 PM by TheRyuu »

Offline overdrive80

  • Member
  • Posts: 7
    • View Profile
Re: AnimeIVTC
« Reply #6 on: May 09, 2010, 09:55:59 AM »
Hi, I´m of spanish group that is doing release of Bleach. Well, post you my script for video VFR, i hope help you. Bye

http://www.megaupload.com/?d=8O7FY9AE

Note: The scripts is doing with the older version of animeivtc, but adapted its, is easy. Excuse me for my english. ^^'

Offline HateBreeder

  • Member
  • Posts: 4
    • View Profile
Re: AnimeIVTC
« Reply #7 on: May 12, 2010, 03:33:56 AM »
Thank you all for your help!
I decided to use credit-less ending.

Offline Firesledge

  • Member
  • Posts: 13
    • View Profile
Re: AnimeIVTC
« Reply #8 on: December 21, 2010, 04:53:24 AM »
I wrote a script similar to TheRyuu's to deinterlace 60i credits on the top of a 24 fps telecined footage. It virtually oversamples the video to 120 fps with motion interpolation on credits only, and decimates to 24 fps. It has the advantage of avoiding footage frames interpolation, leaving them very clean, whatever the motion they contain. However, the drawback is that it requires to manually measure the origin of the 3:2 pulldown pattern (and split the clip in parts if it changes).

Code: [Select]
# Version 1.1
Function ivtc_txt60mc (clip src, int frame_ref, bool "srcbob", bool "draft")
{
srcbob    = Default (srcbob, false)
draft     = Default (draft,  false)

field_ref = (srcbob) ? frame_ref : frame_ref * 2
field_ref =      field_ref  % 5
invpos    = (5 - field_ref) % 5
pel       = (draft) ? 1 : 2

src
 (srcbob) ? last
\ : (draft ) ? Bob ()
\ :            QTGMC (SourceMatch=3, Lossless=2, tr0=1, tr1=1, tr2=1)

clean  = SelectEvery (5, 1 - invpos)
jitter = SelectEvery (5, 3 - invpos, 4 - invpos)
jsup   = jitter.MSuper (pel=pel)
vect_f = jsup.MAnalyse (isb=false, delta=1, overlap=4)
vect_b = jsup.MAnalyse (isb=true,  delta=1, overlap=4)
comp   = jitter.MFlowInter (jsup, vect_b, vect_f, time=50, thSCD1=400)
fixed  = comp.SelectEvery (2, 0)
Interleave (clean, fixed)
Trim (invpos / 2, 0)
}

The src parameter is a 30 fps interlaced clip. The frame_ref parameter indicates on which frame begins the 3:2 pattern (first frame number of a clean-combed-combed-clean-clean sequence). Set srcbob to true if your source is already bobbed. You surely need to add a SetMemoryMax (1500) at the beginning of your script if you are processing HD content.

I've put in this archive examples showing several common methods to deinterlace 60i credits. The one covered by the above script is correct.mp4. Detailed article in French here.

Edit : Added srcbob and draft parameters.
« Last Edit: May 08, 2011, 07:00:20 PM by Firesledge »