Log in

View Full Version : Recommended TV capture interlaced filters


Kayaker
11th November 2005, 13:21
I'm capturing cartoons from PAL TV in interlaced mode.
I want too keep it that way (interlaced), cause restore24 and the other stuff didn't work well. I got blended frames no matter what I do.

So the thing is capture interlaced, clean up avisynth filters and then archive xvid inerlaced.

What avisynth filters do you recommend (that work in interlaced mode) to filter the classic noise from TV capture and other filters that can work better with cartoons (always in interlaced mode).

Thanx.

jggimi
11th November 2005, 13:38
I think you'll get better help if this is moved to the AviSynth forum...

Kayaker
11th November 2005, 13:41
mmm maybe.
I posted in Capturing Video because the noise of TV capture is kinda specific of TV analog capture.
It's like vertical senoids of distortion... if you know what I mean...

anyway, it's ok. The problem is kinda general...

Boulder
11th November 2005, 13:50
Use the search, there's numerous threads about cleaning interlaced material while keeping it interlaced.

mg262
14th November 2005, 19:44
Could you post a section of your source?

Kayaker
14th November 2005, 19:50
ok. I got it at home.
I'll bring it tomorrow.

Interlaced, Huffyuv , the same size i've capped it.
I'll strip the sound of course.

what file size is "reasonable" ?

mg262
14th November 2005, 19:55
Up to you; downloading is much easier than uploading. Please choose a chunk that has some motion in the background -- panning or zooming. A hundred frames would do, but more would be better!

I should warn you that I may not be able to say anything that useful... but cartoons are generally made progressive and it is often possible to push them back to progressive -- so I want to check whether that's possible in this case.

Kayaker
14th November 2005, 20:01
I've tried everything... all that scripts the Didee , Scharfis et al. did, and can't get rid of the blended frames.
(I'm a total newbie at this, so basically i'm not pretty sure of what I do, so it could be my mistake of course )

BTW , it's "The Simpsons", capped from PAL TV.
and Restore 24 (supposedly was made for this kind of stuff) didn't work for me.

Boulder
14th November 2005, 20:21
It might not work well for captures because God knows what they've been run through when broadcast ;)

A simple approach to handling interlaced stuff is to bob-filter-reinterlace.

Kayaker
16th November 2005, 16:07
I've just uploaded a small sample ( 6 mb )

http://rapidshare.de/files/7716707/simp.zip.html

Didée
16th November 2005, 16:59
... Restore 24 (supposedly was made for this kind of stuff) didn't work for me.
In which way it didn't work? Did it just not remove the blends, did it crash on script loading, did it cause a power failure, ... ?


Hint: read here (http://forum.doom9.org/showthread.php?p=737488#post737488), respect this (http://forum.doom9.org/showthread.php?p=737565#post737565), then try about the following:
avisource("simp.avi")
assumetff()
Restore24(r24fps=23.976,numr=2997,deno=6250,useLL=true,stringuent=false,fulltriples=false,
\ r24deint=2,fra=1,frr=0,edgetype=1,edgemode=1,edgeeval=1,
\ r24size=1.5,r24ysize=1.0,nr=-5,ldmp=32.0)

35 frames is not much, but on those at least it works perfectly. (Alas it needs the slow mode, the fast one is not reliable for comic style.)

Kayaker
16th November 2005, 17:23
the Restore24 I was trying was v0.4c (packaged with other plugins by Scharfis)

and it has a lot less parameters :

Function Restore24(clip worki,clip outi, int "numr", int "deno" )

Again, forgive my total ignorance, where is this restore24 with so many parameters ?

Anonymouses
16th November 2005, 17:29
Again, forgive my total ignorance, where is this restore24 with so many parameters ?

He linked it for you.

Hint: read here (http://forum.doom9.org/showthread.php?p=737488#post737488), respect this (http://forum.doom9.org/showthread.php?p=737565#post737565)

Didée
16th November 2005, 17:29
It is WIP (work in progress) waiting to get finished. Oficially, it does not exist yet ;)

Kayaker
16th November 2005, 17:33
Sorry. I got lost in the thread :-)

I'll give this Restore24 v1.0 RC1 a try...

Kayaker
16th November 2005, 18:07
Well after a lot of googling around to get all the plugins, I put it to work.

Sure this is the best I got so far.
I still get some blended frames every now and then, though.
On my complete capped avi of course.

What parameters do you suggest to play with ?

Will it be useful to your "debugging" if I can upload a longer sample ?

I should use picvideo o some other lossy codec, cause with huffyuv it will be to much to handle. What lossy codec do you suggest ?

Anyway great work !!!

foxyshadis
17th November 2005, 03:30
I should use picvideo o some other lossy codec, cause with huffyuv it will be to much to handle. What lossy codec do you suggest ?
Try xvid at some amazingly high bitrate and slow options off, with MPEG (or an HR custom) matrix. 3-5 Mbps has always given me fantastic quality for intermediate files, and very fast.

Kayaker
17th November 2005, 12:28
Will it work well with interlaced material (of course, setting the Xvid codec interlaced flag).

I mean, I want it almost exactly (beside mpeg4 compression of course) as it were bedore encoding, so there are no combing or blending or artifacts introduced by Xvid itself, so Didee can test his script better (if he's willing to :-)

Kayaker
17th November 2005, 12:54
I just saw this in an old thread... maybe I should try this.



Just encode some samples encoded in interlaced XviD at constant quant 2-3-2/150/100/10 (meaning constant quality 100, with I-frame quant capped at 2-2, p-frame quant capped at 3-3, and b-frame settings at count 2, ratio 150, offset 100, threshold 10). That should provide adequate quality for just trying some deinterlacing on.



Would it be clever to encode after 'SeparateFields()'? Should compress better, and could be simply restored by AviSource().weave(). Pity that 'interlaced' fieldbased encoding currently doesn't work correctly with XviD's Bframes...

Didée
17th November 2005, 13:48
Oh dear, I remember that thread :o - That was right before a n00bish Avisynth r00kie hammered together the first version of Restore24, wasn't it?

Nevermind, a sample would not help too much in this case. If it works, it works; if it misses some blends, it misses. R24 is made more specific for natural sources, not so much for comic or anime. Perhaps try increasing ldmp to 64. Also, edgeeval=2 or 3 might work better in your case (but with animation, more likely they're worse), give them a try. Using edgemode=2 is preferred for natural sources (when edgetype=1|2 is used), and practically useless for cartoons.

Your other option is "CDeint" made by MOmonster. This one is targetting more specific at animated sources. Try this too, and see whether or not it works better.

Kayaker
17th November 2005, 13:59
OK. I'll play a little bit with those parameters you told me.
As I don't know very much what I'm doing :-)

Thanx a lot for your time !!!

( I'm still deciding what's better... keep it interlaced or force it to blended-every-now-and-then progressive )

hehe "To deinterlace or not to deinterlace, that's the question"... D'oh

Didée
17th November 2005, 14:41
"... that's a question", if I remember correctly ... but this one is quoted incorrectly almost always, never mind. ;)

Are it only single frames that slip through blended? Or are there multiple blends coming through, in the places where R24 misses?

Do you, by any chance, have dropped frames in your captured file?

Kayaker
17th November 2005, 15:09
are you sure ?
I think "THE question" stresses more the idea that is the most important question

"a question" gives the idea that is just another question.
Not the most important one.

well... anyway that's the only part I know of Hamlet, so i'm just guessing :-)
and besides that,as your case, english is not my mother language...

Back to the real business...

I don't have any dropped frames when I cap.
Well, actually I got 1 or 2 frames every 1 hour.
I'm using SAA7xxx chipset, a lot better than BtB, and with Fly2000 TV I cap sound directly from TV tuner without passing thru soundcard.

Didée
17th November 2005, 16:02
/OT

I think not. Let me try it in my own (alas poor) words. Bolding the (assumingly) accentuated word, it is

a) "to be, or not to be, that's the question"

vs.

b) "to be, or not to be, that's a question"


where the former (a) implies importance of the word "question", à la "which is the most important question of all? - this one". I.e. among all possible questions one could ask, this is THE question of all questions.
I don't think this is the intention that Shakespeare wanted to give us through Hamlet's mouth; also it were, somehow, not an adequate linguistic style to be used by Shakespeare. (It is, however, perfectly the style how language is used these days ... times have changed.)

The latter (b) implies importance of the *content* of the question ... "there are countless numbers of questions being asked each and every day, but all of what man is asking over and over again is so unimportant that you can hardly call that 'questions'. But, "to be, or not to be" - THAT'S a [real, truley] question, compared to all the other unimportant-ness that's around us."

/OT


What did you say about the appearance of blends after R24 - only singles, or multiples?

Kayaker
17th November 2005, 17:27
What did you say about the appearance of blends after R24 - only singles, or multiples?


After R24 RC1 , Usually it's just only one blended frame.
But there are two consecutives here and there (not so often though).

If I do a SeparateFields() with the original input, I see blended frames.
I don't understand how these blended frames were produced in the first place ? poor NTSC -> PAL conversion ?

If somebody cap it in the USA (NTSC) those blended frames won't be there ? right ?

Should I try to study the sequence of frames after separatefields() ?
(I mean like you did in that old post of you a b c cd etc ,etc)

will that help ? or is automatic in R24 RC1 ?

Didée
17th November 2005, 17:43
K, then in those spots most probably it's a misdetection of the [21|25|29] pattern length, wich is always varying ... it's even tricky to correctly detect those on natural sources with their, basically, 'constant' motion. On animated sources where motion basically is 'random', those are even harder to avoid.

This means that the result generally is okay. Phew. If there were something like short sequences where R24 would spit out consecutive blended frames only, ...

"... THAT would be a problem." ;)

Kayaker
18th November 2005, 15:34
I think I'll start reading your initial post about R24 , and start working my way from there... just to really know what I'm doing.

Separatefields , detect blended frames , replace blended with one before or one after, etc , etc...
It sounds pretty easy, isn't it ? ;)

I don't want to rediscover the weel, just know how it was built in the first place :D