View Full Version : Anime and DECIMATE (DECOMB)


ZZT
17th June 2004, 11:37
This is very interesting.
There are two sorts of anime on TV: with 100% recoverable frames and
nonrecoverable frames. Second case I think is dew to multiple
15->24->30+30_smooth_titles->25 or simillar patterns. In such sources, I
suppose, also some fields could be lost, so original fps is not recoverable.
Of course, I can suspect "smooth" *field* blending is present in some TV anime
series.
But in any case the goal is to maximize compression by removing duplicates.
Most such sources can be recovered or deinterlaced into nonuniform patterns:

with interpolation of strange (blended!?) fields
#1(23 loop) III ID III ID I IDIDID II IDID
or more predictive after reshuffling clean fields
#2(23 loop) III III III IDIDIDIDIDIDID
or PAL_DVD-like:
#3(25 loop) III III III III D III D III D III D

Dew to long "original" frame sequences it is not possible to devide big PAL
loop into smaller parts to DECIMATE in one pass. So multiple passes are needed:
s=s.Decimate(mode=2, threshold2=7.9, cycle=25, quality=2, show=false)
s=s.Decimate(mode=2, threshold2=7.7, cycle=24, quality=2, show=false)
s=s.Decimate(mode=2, threshold2=7.5, cycle=23, quality=2, show=false)
s=s.Decimate(mode=2, threshold2=7.3, cycle=22, quality=2, show=false)
This one just *worked_fine* for 25->21 anime.
(
Very interesting: that was clean progressive 25fps SECAM TV-translation with
1 shifted field, so I used:
s=s.AssumeFrameBased().AssumeBFF().separatefields().AssumeFrameBased()
\ .trim(1,0).AssumeFieldBased().AssumeTFF().weave()
And then I removed 4 duplicates in 4 passes (see #3 pattern). Not optimal
decision, but I cant find a better way to remove duplicates what are real
duplicates, but not simple "low motion" frames.
)

But today I have captured another anime and it has some scenes in #1 pattern
(with interpolation of "defect" fields) and #2 pattern of clean frames.
I don't know original BASE fps and I don't need to know it after many TV
companies has "worked" with it. But to remove 7 duplicates in every
23 frames loop I need such script:
#s=s.Decimate(mode=2, threshold2=2.5, cycle=23, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=22, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=21, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=20, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=19, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=18, quality=0, show=false)
#s=s.Decimate(mode=2, threshold2=2.5, cycle=17, quality=0, show=false)
This is imposible.
And it is not good, since in the middle of the script some sequent frames
could be removed, but duplicates are always IDID, and rarely IDD.

So it would be GREAT if future Decimate will have additional option to set
number of frames to remove from the loop ("cycle=") I.e. it could be written
s=s.Decimate(mode=2, cycle=23, dupsnum=7)
to remove 7 duplucates in longest runs in every loop of 23 frames.
But for today I cant find better solution :-/ Can anybode suggest any better solution to anime decimation?

HeadlessCow
17th June 2004, 17:19
Try using MultiDecimate instead.

http://neuron2.net/multidecimate/multidecimate.html

ZZT
17th June 2004, 21:36
Thanks! Next week I'll try it on the same anime series. Like I predicted, 7 passes didn't work :-( some lomotion frames were removed instead of duplicates.

Guest
17th June 2004, 21:59
Be aware that it may screw up your audio sync. As they say...it depends.

ZZT
17th June 2004, 22:17
Thanks... I will have this in mind