Log in

View Full Version : telecide does nothing?


magilvia
16th May 2004, 01:37
I'm new to this and I know it's a difficult matter, so I need a little help.
What I have is an AVI encoded in 29.97 FPS. The original clip was clearly a film source, in fact many frames look blended with the preceeding one.
I would like to reencode in PAL so I have tryed decomb plugin for avisynth. (decomb511.dll)
I have followed DecombTutorial.html. In step 2 it says to use this command:
Telecide(order=1,guide=X,post=0,show=true)
to find out which pattern was used during telecine.
I found out that guide=2 produces a pattern mismatch of 0.00%, while guide=1 or 3 gives pattern mismatch of 100.00%
First question: How this could be? The tutorial states that the guide should be 2 if the source is PAL. But my source is not PAL. it's in 29.97 FPS !!
Anyway I proceeded to step 3 and 4. In step 4 it says:
As a side effect of performing field matching for 3:2 pulldown, Telecide() emits duplicate frames and leaves the clip at its original frame rate. Decimate() detects and removes these duplicates and sets the frame rate down appropriately.
but
If your clip is PAL, you do not require decimation and you are finished!
But I can't leave it without decimate bucause I need a 25 FPS stream.
Nor I can spot duplicated frames as result of the 3:2 pulldown, to be cut by decimate. Indeed the output seems pretty unchanged, with every combed frame still there, only deinterlanced by the post processing. This is why I ask if decimate does anything at all.
How should I handle this ?

Thanks in advance!

Guest
16th May 2004, 01:46
Post a link to an unprocessed source clip that we can download. We need to establish reliably the nature of your source video.

magilvia
16th May 2004, 15:31
Ok, thanks for the help.
It's an episodie of a tv serie taken from cable tv. Since I don't know if I can post it here I've send you a private message. :)

Leak
16th May 2004, 15:59
Originally posted by magilvia
Ok, thanks for the help.
It's an episodie of a tv serie taken from cable tv. Since I don't know if I can post it here I've send you a private message. :)

Ummm... if there's really a load of blended frames in the stream as you said in your first post there's nothing telecide can do, as all frames in a 5 frame cycle will look different to it, thus it won't be able to match any fields.

np: Skateboard/Erlend Oye - Metal Chix/Always On My Mind (Erlend Oye - DJ-Kicks)

Guest
16th May 2004, 16:04
Is that the unprocessed source video???

If it is, what you have is an encoded film clip that someone applied a deinterlacer to and left at 29.97 fps! That is amateur hour. The frames are progressive without combing, so it is impossible to reduce the FPS to 25 using IVTC.

If it is not the unprocessed source video, then please give that to me.

magilvia
16th May 2004, 16:17
That is all I have. I think someone encoded it in divx as progressive after appling telecine.
So I assume if frames are encoded alredy combed it's impossible to regain the original frames. :(
Really sad.
Is there nothing I can do to reduce that ghost/blur effect due to combed frames and convert to 25 FPS? I would like to backup it on a DVD.
Thanks all.

Guest
16th May 2004, 16:42
Originally posted by magilvia
That is all I have. I think someone encoded it in divx as progressive after applying telecine. Like I said, amateur hour.

So I assume if frames are encoded already combed it's impossible to regain the original frames. They deinterlaced it. You can see some residual combing as well as horrible blocking artifacts when you zoom in on it. You cannot extract the original film frames.

Is there nothing I can do to reduce that ghost/blur effect due to combed frames and convert to 25 FPS? I would like to backup it on a DVD. To reduce this to 25fps, you'd need motion-compensated frame interpolation as in MotionPerfect, or you can do a frame rate reduction using blending, which would make it even worse. If you want to try that, have a look at ChangeFPS().

Maybe SmartDecimate() would also be worth a try.

scharfis_brain
16th May 2004, 17:15
neuron2, I assume it has the follwing pattern (two letters reffering to a blend)

A B BC CD D E F FG GH H I

(three good and two blended frames?)

then take a look at my automated function, that tries restores blended telecine: http://forum.doom9.org/showthread.php?s=&threadid=75869

magilvia
16th May 2004, 20:01
You can see some residual combing as well as horrible blocking artifacts when you zoom in on it
Yeah! It looks really ugly.
...motion-compensated frame interpolation as in MotionPerfect
Never used this program.
If you want to try that, have a look at ChangeFPS().
Maybe SmartDecimate() would also be worth a try.
OK, thanks for your help.

A B BC CD D E F FG GH H I
Well no, it's seems more like this:

A B C D DE EF F G H I IJ JK...


I know it's quite strange...

Guest
16th May 2004, 20:09
That means the original source before the screw-up was made was 25fps progressive (not 24fps).

scharfis_brain
16th May 2004, 22:24
if it is really that pattern, use my function undoblendedtc()

avisource("video.avi")
undoblendedtc()
smartdecimate(2500,2997)

magilvia
16th May 2004, 23:59
I've tryed undoblendedtc().
I've added ConvertToYUY2() bacause it complains that layers() supports only RGB32 or YUY2, but smartdecimate works only in YUV or YUY2...

Now it seems that blended frames are gone but there are some frame with a little yellow 'c' top left and some colored vectors around (is this a debug feature ?). There are also some new frames sharper than others and pheraps some duplicated. (it's difficult to say because it's so slow that every step forward takes 1 to 3 seconds... (those athlon64 3000+ :rolleyes: ;) )


Here is the script:

loadplugin("C:\Programmi\AviSynth 2.5\plugins2\avisynth_c.dll")
loadCplugin("C:\Programmi\AviSynth 2.5\plugins2\SmartDecimate.dll")

Avisource("sample.avi")
ConvertToYUY2()
undoblendedtc()
assumetff()
smartdecimate(2500,2997)

scharfis_brain
17th May 2004, 09:24
okay.

Now it seems that blended frames are gone but there are some frame with a little yellow 'c' top left

somewhere within the function undblendedtc, there is subtitle("c").

I forgot to remove it. Do it yourself.

some colored vectors around
huh? can you post a picture of this?

There are also some new frames sharper than others and pheraps some duplicated.
the sharper picture are false positives. next update will have reomved this behaviour. but this may take up to two weeks, because I currently have no access to my Computer

dupes may have been left behind by smartdecimate.

(it's difficult to say because it's so slow that every step forward takes 1 to 3 seconds... (those athlon64 3000+ )

what? thaaaaaaaaaaaat slooooooooow?
on my athlon xp 1600+ it ran really nice....
try to remove smartdecimate.
then tell m, whether it has been accelerated, or not.
and count how much dupes you have in 60 frames to calculate the proper decimation ratio.

magilvia
17th May 2004, 12:50
I've solved the slowdown problem. There was some sort of problem with avisynth plugins placed in the avisynth plugin folder. After cleaning that folder it is much faster and I can be more precise.

First of all there are some residual blended frames.

some colored vectors around
huh? can you post a picture of this?

Well, there isn't any colored vector. There are some gray zones where there were blending artifacts in the orginal frame. Frames with gray zone appear most before and after the residual blended frames.
Here is a pic:
http://www.ecompoint.com/members/magilvia/sample.jpg

dupes may have been left behind by smartdecimate.
Without Smartdecimate there are no duplicates (29,97 FPS)
If I add Smartdecimate(2500, 2997) Virtuadub reports 50.001 FPS and there are many duplicates... Something is clearly wrong.

the sharper picture are false positives. next update will have reomved this behaviour. but this may take up to two weeks, because I currently have no access to my Computer
I will eagerly await for the new version :)

scharfis_brain
17th May 2004, 13:15
use the latest build of avisynth.

this will fix the grey zones.

they are out of luma-range overflow errors, that have been fixed in the newest build.

what framerate does the source file have?

please PM me for a sapmle, too.

Its hard to help only doing assumtions...

magilvia
17th May 2004, 16:04
I've installed avisynth 2.5.5 and grey zones are gone. There are still some blended frames left in the output. I've sent you a pm. I'll wait for your tests.
Thanks :)

scharfis_brain
17th May 2004, 18:20
forget it. buy that DVD!

it is a PAL to NTSC blendconversion that has been deinterlaced without blending.

the pattern is

A B bC Cd D E F G hH Hi I J K L lM Mn N O P Q qR Rs S T U V vW Wx X ...

where small Letters mean a low influence into the blend. (25:75 blend)

my function is only able to restore 50:50 blend, like that form blended telecine. but yours will only be recoverable with some other tecniques. Its not worth its time.

the only thing, you can try is decimate(6) or smartdecimate(25,60)
(for exactly 25fps use smartdecimate(1250,2997) )
this would try to remove one of the blends but doesn't cancel blending at all..

get that DVD or live with that...

magilvia
17th May 2004, 20:01
I would be glad to buy it. The problem is that it's not for sale. I've not found it anywhere. :(
Anyway thank you for your help. :thanks:

Didée
18th May 2004, 07:55
If those blends are 25:75, and the pattern is constant over time, one could blend the pairs-of-blends together:

A B bC Cd D ...

becoming

A B bCd D ...

where bCd would become a 12:75:12 blend. (Yes, 12.5) Eventually this could turn out to be perceptually more pleasing.

But scharfis_brain would have to work out the "SelectEvery()" stuff :D

- Didée

magilvia
18th May 2004, 08:17
Unfortunately it's not really constant. Every 100 - 200 frames there is a sequence of 5 good frames instead of 4, but that interval it does not seems constant either.

scharfis_brain
18th May 2004, 09:07
Didée, believe me, I've tried exactly that, and it looked okay, but that pattern isn't constant.

(on a Pentium 1 with 120MHZ without MMX a though work using AVISynth 2.0:
xxresize, layer and others do not work due to the missing MMX.
this means, my layer looked like this:
interleave(x,y).assumefieldbased().weave().blur(0,1.58).separatefields(),selectood()

That's funny scripting...
)