View Full Version : Need Advice on a blended NTSC-Source
krieger2005
15th August 2005, 20:40
Hi,
sorry again for a post with a question about a blended source. I just does not have expirience with NTSC-source itself.
I have a movie in NTSC-Format. I tried first to IVTC. But this does not work because it does not found a pattern (Telecine). I looked at the Fields and it is blended, for my opinion. Now i searched in the forum for some deblend-Funktions. There are:
- restore24
- C_package
I found the results from the C_package better, because restore24 produce for me not good results. The C_package does it better but does not remove all blends. And on higher thresholds i got some equal frames.
However... The result of C_package (i most like the result of Cdeblend) is a progressive, bobbed Movie. Many of the frames are there double. So i want to take the Fields (so SelectEvery(4,0,3)) and then deinterlace them. The Result of "SelectEvery(...).Weave" was that some frames are interlaced and some other not.
I just don't know what to do better in this case and want ask you for your advice. The Result should be a progressive movie with a framerate of 23.XXX fps (or 24).
I uploaded a short samples.
Xvid Coded (interlaced=true) (http://rapidshare.de/files/4013131/test.avi.html) (got a chroma problem)
Untouched Sample1 (http://rapidshare.de/files/4387124/testclip2.demuxed_cut2.m2v.html)
Untouched (better) Sample2 (http://rapidshare.de/files/4389163/yetAnotherSample.demuxed_cut.m2v.html)
Thanks
MOmonster
15th August 2005, 22:40
@krieger2005
If Cdeblend works for you, I think Crestore should also work, but I donīt know. As a said it in the readme, the Crestore_pal version isnīt tested, because I have no sources for it. I will have a look on it.
If Cdeblend works good for you, you should use a decimater like Fdecimate, Tdecimate or smartdecimate after Cdeblend. Decimate it first to pal (25fps) and then speed up to 24fps with assumefps to get a smooth motion.
My next version will work better for you. :D
Edit: I did a quick test with Crestore_pal (last version), this settings:
a = last.leakkernelbob(order=1, sharp=false, twoway=true, threshold=4)
b = a.BilinearResize(440,240)
Crestore_pal(bob=a, bclip=b, bthresh=50)
The result for your small clip is smooth and blendfree. The output is 25fps, so speed up or use a decimater to get the 23,976 or 24 fps. ;)
krieger2005
15th August 2005, 23:54
Hi Momonster,
i tried Crestore_pal also. The Problem was, that it create duplicate Frames. I does not tried to encode it and look if it flicker... i have to do that.
Till now i get with restore24 such problems:
http://img150.imageshack.us/img150/4207/outoforder4fu.jpg
Code:
a2=r24kernelbob(0)
b2=TDeint(mode=1,order=1, tryweave=false, mthreshL=3, mthreshC=2, sharp=true, link=1)
restore24(a2, b2,1250, 2997)
Still with Crestore_pal (your suggestion above) i got the same problems on scenechange as with restore24:
http://img336.imageshack.us/img336/6579/outoforder2ya.jpg
On a site which was written by scharfi i read a version to deblend a movie. He used Kernelbob(4). What is 4? the threshold? However... If this is the threshold, the little Script does not worked so good as Crestore or at least restore24...
Till now i would said, that both, Crestore and restore24, does not remove all blending... But they let differen blending-Frames (i think). I tried to combine both but got from Crestore an error...
here the code:
a2=r24kernelbob(0)
a = last.leakkernelbob(order=1, sharp=false, twoway=true, threshold=4)
b = a.BilinearResize(440,240)
b2=Cdeblend(a, tclip=b, thresh=60)
restore24(a2, b2,1250,2997)
The failure was from ScriptClip (so wirtten on the frame itself): ScriptClip don't know what "blendll" means (Line195).
Line 195 is in the Function Evaluate and is:
global blendmade = MergeLuma(vid,vid_1,blendll)
What's wrong... it seems to be something with restore24...
MOmonster
16th August 2005, 00:06
Just for your small clip it seems to work, but for scene changes it will sometimes duplicate a field, I know. You should encode a part of the movie. One dup at the beginning or so is normal, but then it should be really seldom. If you go back or so, there will be also duplicates.
I think my next evrsion will do it better, but itīll take some time (two weeks or so). If Cdeblends works for you, you should also try this with a decimater. Maybe this works better for you.
Edit: You should update your Cpackage. Since two versions my Cdeblend donīt use this blendmade.
a2 is really much the same as a, you can use it also for the blenddetection with restore24.
Use the newest Cdeblend with thresh = 66 or so and than tdecimate for example (not Fdecimate).
Didée
16th August 2005, 09:17
>> because restore24 produce for me not good results
That's intentional. My functions do not work with material showing war scenes.
Seriously:
a) Your code snipplets look a little like you could have called the bobbers for R24 with wrong parity. Did you actually check that *all* the bobbed clips you fed in R24 were running smooth, not stuttering forth-back-forth? Else, you're mocking on R24, giving it no chance to do its job properly.
b) (sidenote) You can NOT import *both* MOmonster's package and Restore24, even if you actually call only one of them later. Doing so, something will b0rk out. There're some conflicts between them two, propably with global variable names. Wich is not the fault of R24 ... (and the :p goes to MOmonster ;) )
MOmonster
16th August 2005, 10:02
@Didee
I know, I know. :o
But the last version, there should be just some left variables, because of all the changes. I will fix it for the next version. But Cdeblend, I think donīt has any variables of your restore24. Oh, he use the old version, yes they wonīt run together.
Krieger2005 use the right order (1)for the output, but maybe not for the analyse clip. As I already said. The small clip I tested runs smooth with Crestore_pal.
krieger2005
16th August 2005, 15:47
I use till now this Script-Code:
a2=r24kernelbob(0)
b = a2.BilinearResize(440,240)
b2=TDeint(mode=1,order=1, tryweave=false, mthreshL=3, mthreshC=2, sharp=true, link=1)
a=restore24(a2, b2,1,1)
Cdeblend(a, tclip=b, thresh=66)
ImproveSceneSwitch(last,last, ratio=4, first=true, last=true, field=0)
FDecimate(25)
It's now the new Cdeblend... and there are no problems with it. The both act good together (i think). And the very best.... One of them remove (probably) allways the scenechange-problems of the bobber
@Didée: The order is right... I checked it (i guess ;))... and (2) like Momonster said, the new cdeblend work with restore24 together... without problems.
I like the results which were produced with the script above but i'm unsure i can use it so... becuase the tclip (b) was generated before restore24...
I tried to generate it after restore24 but then it works not so good like when i do it like above... this is a little bit strange for me..
In general i would say till now, that restore24 remove blending secure but not all (less than cdeblend) and cdeblend good but not allways right (so it produce sometime new blend).
Maybe there is a better possibility to combine the effects of both?
MOmonster
16th August 2005, 22:53
The reason why cdeblend produces blends is simple. Itīs not, because it failed a lot (it fails only on really low motions, my eyes has problems to detect the blend), itīs because it simply take the next frame if it detects a blend, but on the pattern offset we have two blends standing together, so it duplicate the second blend. Restore24 avoid this and works for this point. Then you take Cdeblend after to kill the left blends.
I donīt know what improvesceneswitch exactly does (clear improving the sceneswitch, but what does it exactly?).
Using Fdecimate after restore24 or Cdeblend and it works for you. For me Cdeblend and also restore24 donīt work good together with Fdecimate. Maybe itīs because of the many combined functions you use, that it works for you, but I advice you to use Tdecimate or smartdecimate after this combo.
So or so I think I will offer a updated Cdeblend, that wonīt have this problem tomorrow or the day after. Maybe you can do it in not such a complex and slooow way. ;)
Edit: It would be better to use the restore24 output also for the tclip. But this way is faster and also not wrong. But you should wait for my updated function. Because Cdeblend simple use the next frame instead this can result in triples (dups in the output).
MOmonster
18th August 2005, 08:06
Hi krieger2005
Here is my new Cdeblend (http://forum.gleitz.info/showthread.php?t=24391&page=2) . It has some new features. Test the different modes, I donīt know what will works best for you. I will update my package and the readme (because of some other new parameters) the next week or so.
krieger2005
18th August 2005, 16:51
Great... I waited for it. I will test it today in the evening... Thanks for your help till now.
krieger2005
24th August 2005, 14:20
Momonster... Sorry for the late answer. I decoded the movie now using "restore24". I got still problems with scene-change but in my "last view" i decidec, that restore24 just do a better job because, how i written before, it removes the blended Frames more secure. Your filter works fine but create too much double-Frames and remove still not all blended Frames. It is, i think, because my movie have more blended Frames, than not blended.
But still keep on evaluating your filter. Thanks for your works.
scharfis_brain
24th August 2005, 14:33
could you provide an untouched sample?
krieger2005
26th August 2005, 01:36
The Sample above is fully untouched. It is simply compressed with XVID (because i dont' want to upload so much). It is very short. Still the bitrate of 70% of the First pass is about 6000 kBit. So if you want i can give you the m2v-File... I think it had the same bitrate... if wanted a littlebit longer...
scharfis_brain
26th August 2005, 03:48
hmm. chroma seems to be destroyed by your kind of interlaced recompression!
So I would like to see a really untouched sample clip.
(recompressing a video does NOT leave it untouched...)
but this simple script helped against the blends:
loadplugin("D:\x\tdeint.dll")
avisource("test.avi")
assumetff()
crop(0,48,0,-40)
tdeint(mode=1,full=false,tryweave=true)
lanczosresize(width,472).addborders(0,52,0,52)
changefps(100,linear=false)
selectevery(4,3)
Didée
26th August 2005, 09:18
hmm. chroma seems to be destroyed by your kind of interlaced recompression!
No, the interlaced encoding should be okay.
It is XviD that can not *de*code its own "interlaced" encodings correctly.
(Bug present since, dunno, very long time.)
When opening in Vdub, check "popup extended...", and force both fourcc's to "ffds". Then ffdshow will decode the source, and it will do it correctly.
scharfis_brain
26th August 2005, 09:54
hmm. no difference at all.
I still would like to see an untouched m2v.
I never trust recompression. Not even mine :D !
krieger2005
26th August 2005, 13:58
Ahm... maybe scharfi is right.... i remember... it is right, that this is full untouched and compressed with XVID/interlaced flag on, BUT: i recognized (sorry i forgotten it), that, like sharfi said, with the croma seems something to be wrong. It has an other order, that the Luma-Channel!
The i used the "cpu"-Flag of the MPEG2SOURCE to reduce blocking... used also "iPP=true" and the "chroma-Swap" disappear... it was really strange.
I update my first Post and add two more "untouched" Clips
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.