Log in

View Full Version : Telecide hybrid anime from HK


loa-ash
6th July 2005, 17:06
In decomb guide is suggest that:

Processing Hybrid Material: If you have a clip that contains both 3:2 pulldown (film) and pure video, you can do a good job with it like this:

LoadPlugin("decomb.dll")
AVISource("hybrid.avi")
Telecide(order=1,guide=1)
Decimate(mode=3,threshold=2.0) <- or mode 1 for keep original fps...

My scirpt is:

Telecide(order=1, guide=0, post=2, blend=false)
Decimate(mode=1, threshold=1.0, cycle=5)

all parameters are ok following decomb's guide but there are also interlaced frame at least... :((
These HongKong's DVD are very bad....

What can I do also remove these frames?

MOmonster
6th July 2005, 18:00
Sounds more like a probleme, because of a strange conversation.
But also if there are blended fields, the internal postprocessing from telecide should deinterlace not matchable fields. Try it with smaller thresh values, I mean the vthresh, the dthresh, but maybe also the gthresh.
If this doesnīt help, please upload a small scene with this probleme. Then it is easier for me to understand your probleme. ;)

loa-ash
6th July 2005, 18:53
ok I'll post a small vob... but I'm sure that the problem is the source... telecide tells me that video has progressive and interlaced frame, and the vtresh value is variable, so is difficult choose...

MOmonster
6th July 2005, 22:01
Decimate wonīt catch the interlaced frames, it just catch doubles in the filmparts of the source. If the postprocessor deinterlace the non-film parts of your source and the output looks fine, why this is a probleme for you. Maybe it is better, if I first take a look on your source.

loa-ash
7th July 2005, 01:48
ok, here is the source:

http://loalainhtp.altervista.org/vob/koji.M2V

copy and paste link in a new web page then download works.

Guest
7th July 2005, 04:09
It's field-blended garbage. Do a search for "blended fields".

Mug Funky
7th July 2005, 05:48
hehe... this is an oldschool analog telecine (the "peculiarblend" in avisynth's docs).

btw, most HK DVDs are actually really good, at least for movies. there propbably are no good transfers of this anime in existence (and telecine from film is expensive).

MOmonster
7th July 2005, 07:03
Sorry, I donīt understand any word of this page. Where can I download your file.
Field-blended? Hmm, there will be deinterlacing so or so. If you can live with the blended fields just use telecide or tivct with postprocessing on it, else search for restore24 or Cdeint.

loa-ash
7th July 2005, 12:04
ivtc dosen't work so good... I suppose that is better to keep original frame rate... for blended fields...if you spoke about unblend or such as deblend's avisynth plugin I'll try...

loa-ash
7th July 2005, 13:32
The Anime that I try to encode is "Fuma no kojiro" from '80s...

I've try this script from scharfis_brain:

---------------------------------

loadplugin("D:\x\tdeint.dll")

function yantei(clip i, int off)
{
a=i.tdeint(mode=1).selectevery(5,off)
b=i.doubleweave().selectevery(5,off+1)
interleave(a,b)
}

mpeg2source("file.d2v")
assumetff()
yantei(1)

--------------------

...the quality is quite better, but blended fields are presents...

MOmonster
7th July 2005, 17:15
This script is a for a real special conversion. You have to change the offset for every pattern change. If your blends are surrounded by the two clear fields it consist of a deblend function could help you. Next week Iīll offer a deblend function, that work better than deblend or unblend.
I still donīt know how to download your file. Can anybody help me?

loa-ash
7th July 2005, 17:26
This script is a for a real special conversation. You have to change the offset for every pattern change. If your blends are surrounded by the two clear fields it consist of a deblend function could help you. Next week Iīll offer a deblend function, that work better than deblend or unblend.
I still donīt know how to download your file. Can anybody help me?

How can I change the offset???

MOmonster
7th July 2005, 18:05
What a bad movie. The original framerate of this film is only 12fps.
I would use this script for your source:

off = 2
doubleweave().selectevery(5,off)


If you get intelaced frames and blends you have to trim and than change the offset, so that there is no more interlacing.
If I have a little bit more time. Iīll create you an automated function.
Maybe you should set a deinterlacer a postpocessor.
The output of this function will be 12fps. ;)

loa-ash
7th July 2005, 18:21
What a bad movie. The original framerate of this film is only 12fps.
I would use this script for your source:

off = 2
doubleweave().selectevery(5,off)


If you get intelaced frames and blends you have to trim and than change the offset, so that there is no more interlacing.
If I have a little bit more time. Iīll create you an automated function.
Maybe you should set a deinterlacer a postpocessor.
The output of this function will be 12fps. ;)

12 fps???? O_O How can you found this framerate????
my script will be:

loadplugin("D:\x\tdeint.dll")

function yantei(clip i, int off)
{
off = 2
doubleweave().selectevery(5,off)
}

mpeg2source("file.d2v")
assumetff()
yantei(1)

then the deinterlace....

MOmonster
7th July 2005, 18:45
In five fields there are 3 blended and one doubled, that mean 2/5 * 29,976fps.
Your function is a little bit strange.
First, you donīt need the tdeint.dll, if you donīt use tdeint.
Second, the name of this function is because it was made for yantei.
Third you give this function the offset = 1 (yantei(1)), but internal the function set the offset to 2 (off=2).
Fourth you donīt need to put it in a function, just use it that way:
off = 2
doubleweave().selectevery(5,off)
and change the off value for every pattern change. I think this evening Iīll try to create you a automated version. :p

loa-ash
7th July 2005, 19:05
Many thanks a lot!! I'm awaiting for your function... thanks again!!

MOmonster
7th July 2005, 19:47
Ok Iīm back, here is your function.
loa_ash()


function loa_ash(clip input)
{
work = input.separatefields()
global out = input.doubleweave()
clp = out.selectevery(5,0)

global frame_c0 = work.selectevery(5,0)
global frame_c1 = work.selectevery(5,1)
global frame_c2 = work.selectevery(5,2)
global frame_c3 = work.selectevery(5,3)
global frame_c4 = work.selectevery(5,4)
global frame_c5 = work.selectevery(5,0).trim(1,0)


c99=scriptclip(clp, "Output()")

c5=FrameEvaluate(c99, "global combl_c5 = LumaDifference(frame_c4, frame_c5)")
c4=FrameEvaluate(c5, "global combl_c4 = LumaDifference(frame_c3, frame_c4)")
c3=FrameEvaluate(c4, "global combl_c3 = LumaDifference(frame_c2, frame_c3)")
c2=FrameEvaluate(c3, "global combl_c2 = LumaDifference(frame_c1, frame_c2)")
c1=FrameEvaluate(c2, "global combl_c1 = LumaDifference(frame_c0, frame_c1)")
return(c1)
}

function output()
{
temp = (combl_c1 < combl_c2) && (combl_c1 < combl_c3) && (combl_c1 < combl_c4) &&
\ (combl_c1 < combl_c5) ? out.selectevery(5,0) : ((combl_c2 < combl_c3) &&
\ (combl_c2 < combl_c4) && (combl_c2 < combl_c5) ? out.selectevery(5,1) :
\ ((combl_c3 < combl_c4) && (combl_c3 < combl_c5) ? out.selectevery(5,2) :
\ ((combl_c4 < combl_c5) ? out.selectevery(5,3) : out.selectevery(5,4))))
return(temp)
}
This function find automatical the correct pattern, but of course it donīt work same good as the manual methode. It wonīt work in the small parts where the pattern change, so use for example tdeint(full=false) as postprocessor.
There is no deblend filter that can help you, but if you have no probleme with blends and this function donīt work fluency enough for you, just use a bobber (tdeint(mode=1) or leakkernelbob(order=1)) and than decimate the bobbed output with fdecimate(rate = 23.976) or another rate. I hope, i could help you a little bit.

scharfis_brain
7th July 2005, 20:03
@momonster:
please check for these words: conversation & conversion.... ;)

MOmonster
7th July 2005, 21:45
Oops, my mistake. English isnīt my favourite language.

@loa_ash
I hope this function works for you. For the pattern change, I think it should work better if the function use 2 of 10 weaved frames and not 1 of 5, but I have no time to create a much more complex function. If you still work on this film also next week, you can ask me in five days one more time to find a better solution for your problem. :o

loa-ash
8th July 2005, 01:51
Dear MOmonster,

I don't have many words to say thank you..!!!! :eek: :eek:
Thanks great for the help, now I try to studying your script, it's a little bit difficult for me but works on my anime. I've open the .avs in vdm and file informations tell me that anime is 11fps...I would like to how you've made to understand that the anime was to original aspec ratio at 11fps...the I would
like to know your "modus operandi" in this type of video... 'casue I've other sources so bad... Usually I open anime with dvd2avi or dgindex, then I read what that programs tells me... but I suppose that you've used another method or tools... 'cause to obtain these results I don't have idea how you've make them...

MOmonster
8th July 2005, 07:32
Ok, Iīll try to explain it to you, how the script work.
First the framerate should be 11,988fps (~12). This said me my virtualdub and is more right to the math: 2/5*29.976fps (because two of five fields are clear).
To get the probleme of your content, your first action should be looking cloose to the source. If you see, it is interlaced, it is also interlaced, if not not. Donīt trust on this what DVD2AVI says you. After this you take a closer look to a possible pattern. Therefore you use separatefields() or a smart bobber (I like leakkernelbob).
Look to a motion scene. If all fields are different from another and you have no blends, the source is real interlaced, so using a simple deinterlacer, like tdeint. If you see no blends, but doubled fields, your source is simple telecined, so use telecide or tfm with a decimater.
The hell are the sources with blends. If the blends stand alone, surrounded from two clear fields, restore24 or my Cdeint function are the right way to restore it.
If you have more blended fields standing together, you try to find a pattern.
If you look to your source you can see this pattern:
"clear double blend blend blend clear double......"
It is not that easy to see because the pattern is not constant in your source, that mean the offset change really often. If you can create the blends you see with the clear fields around, it is worth a try else there is no good way to restore it. And now short to my function.
It just took the five fields, it works on and compare the lumadifferences between the fields. The pair with the smallest difference should be the clear and the double. My function just output the right double (weaved fields) with doubleweave().selecteven(5,off).

Mug Funky
8th July 2005, 10:06
careful when decimating to 12fps though - the pans and special effects are probably still at 24. pretty much all animation is done this way - regular scenes are done at 12fps, but pans, effects, and really important bits or bits that are re-used a lot will still be done at 24fps.

even the new stuff from Ghibli is 12fps for the most part - it's the motion-graphics, backgrounds and effects that make the movie seem more fluid.

of course, this doesn't really help getting rid of the blends :) i figure if restore24 can't do it, then encode it interlaced :rolleyes:

btw, i'm more in the business of blending the fields in the first place - i spend my working days converting hybrids to PAL. :devil:

loa-ash
8th July 2005, 11:41
Ok, MOmonster thanks again for your explanation, now the things are clearer but I must work hard becuase my avisynth use is more typical therefore not so detailed...is very important to study the frame pattern and check the frame calculating the fps to manual... you're my master :D

loa-ash
8th July 2005, 11:43
even the new stuff from Ghibli is 12fps for the most part - it's the motion-graphics, backgrounds and effects that make the movie seem more fluid.


WOW! You like Studio Ghibli!!...they produce my favourite anime!!! :D:D
Now I'm waiting form HK texnolyze anime dvd, I whisper that are more simply than kojiro -_-

MOmonster
8th July 2005, 18:11
@ Mug Funky
You are right, but this anime is so bad and over 90% of this source will be 12fps, so it runs more fluid with this framerate, also if we decimate the framerate for the pans and so on.

@ loa-ash
Master? Iīm twenty years old, use avisynth since a half year and three months ago, I didnīt know the difference between a function and a filter.
It is not so hard to learn things with avisynth.
But if you have more questions, of course just ask.

omare
10th July 2005, 09:22
hi everyone,am new to avisynch script,i use to use just th normal guide from dome big 3 method to encode dvds and avi but since while now i start notice most of them have white artifact on the video .
i would like a help or typical setting which will help remove the artifact
i mostly encode animation which are interlaced source ,although in encoding or doitf4u interlaced was select
any help will be great

MOmonster
10th July 2005, 11:27
Hi Omare,
if your source is also field blended carbage, please upload a small part, that I can take a closer look to it. I donīt know what you mean with white artefacts. If not, please open a new thread with your probleme.