Log in

View Full Version : Star Trek Strangeness


Pages : [1] 2

JohnMK
5th October 2002, 21:26
I'm attempting to IVTC this and I'm not having a lot of luck. Here's what I notice:

1) Most if not all scenes are 3 clear frames followed by 2 'combed.' This is not a problem. I think it's what's called 3:2 pull-down. DVD2AVI Forced FILM can usually handle this, except once where a scene of Wesley Crusher waking up was so badly combed, I switched to decomb.

2) Many scenes switch telecine pattern. That is, going frame by frame shows normally (G=Good, X=Combed):

GGXXG GGXXG GGXXG GGXXG and so on. Then a new scene comes up and we get an immediate switch to: GXXGG GXXGG GXXGG etc. I've noticed this sometimes confuses DVD2AVI's Forced FILM.

Okay, so my question is which Telecide and Decimate parameters do you recommend.

Telecide():

guide? guide=1 is for 3:2 pull-down, but while this is 3:2 pull-down, it switches pattern quite often, so is guide=1 going to make it ignore pattern changes and pretend all's well? That's clearly not good, or maybe I understand it incorrectly.

gthresh: will setting this lower make it recognize pattern changes better than DVD2AVI?

Decimate():

mode? "If mode=0, Decimate discards the frame in the cycle determined to be most similar to its predecessor." -- This sounds reasonable. As does this: "If mode=2, Decimate() deletes a frame from the longest run of duplicates. . . . Note that for the most reliable IVTC of 3:2 pulldown material, you should use pattern guidance together with this mode of decimation."

Oh no -- I've gone cross-eyed. What to do, what to do, it all seems reasonable. Yet I'm lost.

Somebody please?

Thank you,

JohnMK

neo_sapien
5th October 2002, 21:53
Star Trek TNG is hybrid. If you refer to the Decomb documentation about how to deal with hybrid material, you'll come across this:

Processing Hybrid Clips Some clips mix film and nonfilm content. One way to handle these is to leave them at the original frame rate and let Decimate determine what to do with the frames that would otherwise have been dropped:

LoadPlugin("decomb.dll")
AVISource("hybrid.avi")
Telecide()
Decimate(mode=1,threshold=50)

AFAIK you can't get TNG down to 23.976fps without getting chunky video on the pure NTSC scenes.

I've been DivXing TNG episodes since season 1 came out on DVD and using that avisynth script. Perfect progressive output. Might be a 29.97fps output, but I don't see any way around that.

Set it to simpleresize(480,352), video @ DivX 5 560kbps w/bframes and Vorbis audio @ 84kbps, chop off the intro and end credits and you'll get 4 episodes per 795 meg XCD at decent quality.

WMV 9 will give you decent quality at the same bitrate at 640x480, but it's slow, and I'm waiting for a doom9 guide, and it might not be playable on MPEG-4 standalones.

JohnMK
5th October 2002, 21:59
Would pure NTSC portions exhibit 3:2 pull-down symptoms, such as 3 good frames, 2 combed, 3 good, 2 combed, etc.? Because that's the behavior I notice all throughout, even in ostensible "pure NTSC" portions. To me, that looks more like classic FILM -> Telecined -> 29.97fps after-effect.

neo_sapien
5th October 2002, 22:05
I don't know. I'm not very good with deinterlacing and IVTC and the like, so I just rely on the standard scripts in guides and help files.

JohnMK
5th October 2002, 22:07
Understandable. All I'm saying is that it looks to me, now, like it is pure FILM, even the credits, but that the telecine job might have been done less than perfectly, because it keeps switching patterns all the time.

Can anyone suggest a method whereby I can determine if a scene is truly native 29.97fps?

neo_sapien
5th October 2002, 22:14
Well people have tried to encode the episodes at 23.976fps using IVTC (and groups have released their episodes as such), and they were jerky as hell during the space scenes, so it can't be pure FILM.

JohnMK
5th October 2002, 22:23
That doesn't necessarily mean it's not FILM content, it might mean that the telecine job was less than optimal, because, and I'll say it again, it seems to be 3:2 pull-down material, because you get 3 good frames, then 2 combed, in every 5-frame segment, which is EXACTLY what you get when you have FILM -> telecined. So if the IVTC can adjust its IVTC-ing to match new patterns, when a new one appears, it could very well achieve 23.976fps with smoothness, in theory. Of course, this is the theory of a non-videophile, so I need an expert to respond to this thread.

Si
5th October 2002, 23:49
@JohnMK

TNG is one of the most challenging series to try and convert to
true progressive frames.

This is because it was filmed but with special effects added after conversion to 30fps and pure video bits added in (and then taken out/ remixed/dubed into russian/converted to PAL/then to SECAM etc ... :D )

So you are trying to get a quart into a pint pot (ou un litre dans une boit de 500ml - pardonez moi mal francais)

You could spend a lot of time (and I mean years) trying to succeed where others have given up or you might just decide to throw one field away and live with the loss of resolution or any of 10 other methods - none of which really work.

Although thinking about it maybe we could all work on 1 episode each and produce a frame by frame script (with comments to identify reference scene changes for each countries DVD/Video/recorded show on DSat/recorded show on terrestial) that gives the "best" result ;)

Sorry -I've been drinking :D

regards
Simon

JohnMK
6th October 2002, 00:08
What makes you so sure of that:

"This is because it was filmed but with special effects added after conversion to 30fps and pure video bits added in"

Si
6th October 2002, 00:13
@JohnMK
I'm not sure at all :)

But how could I be when its been(or might have been) so manipulated :)

Does a tree falling down in a far away forest make a sound when it hits the ground?

The only thing I'm sure of is that Schroedinger's cat must have starved to death by now - so its definitely dead. ;)

Did I mention the drink?

regards
Simon

JohnMK
6th October 2002, 00:27
Check out these intro-credits frames. They exhibit 3:2 pulldown symptoms. As do all special effects scenes. They're frames 7732-7735, capturing the motion of the Enterprise. The pattern is always 3 good, 2 combed.

http://students.washington.edu/chs4000/7732.JPG
http://students.washington.edu/chs4000/7733.JPG
http://students.washington.edu/chs4000/7734.JPG
http://students.washington.edu/chs4000/7735.JPG
http://students.washington.edu/chs4000/7736.JPG
http://students.washington.edu/chs4000/7737.JPG
http://students.washington.edu/chs4000/7738.JPG

Btw, these are unprocessed by DVD2AVI. I did NOT Force FILM.

trbarry
6th October 2002, 00:40
If parts of it have video source or overlays and you are going to be displaying it on a 60 hz display anyway then you might want to try Decomb without Decimate.

It wont compress quite as well but will maybe be closer to the DVD quality, with some parts being telecined progressive and other parts being deinterlaced video, yielding a 30 hz clip.

Or you can get a similar effect with:

GreedyHMA(1,0,1,0,1,0,0,0) or
GreedyHMA(0,0,1,0,1,0,0,0)

depending upon whether the clip is coded TopFirst.

- Tom

JohnMK
6th October 2002, 00:51
No, I play these back on PCs exclusively, and compressibility is important. I'm willing to knock it down to 24/23.976fps, since most of it looks just fine. I'm just indulging my perfectionist tendency in trying to get ship shots and credits and some other scenes to look perfect.

Didée
6th October 2002, 01:29
Originally posted by siwalters
Does a tree falling down in a far away forest make a sound when it hits the ground?
You know very well,
as long as no ears are around,
the tree falls perfectly quiet.

JohnMK
6th October 2002, 06:36
So nobody knows if 3:2 pulldown symptoms such as what I've described above would appear in native 30fps material? Whoever knows the answer to that question can tell me hopefully if the credits were actually native 30fps or 24fps telecined.

Guest
6th October 2002, 15:07
Try this script on your material.

Telecide(guide=1,gthresh=30)
Decimate()

Telecide() automatically adjusts to changes in pattern phase.

Process your entire movie this way and then view it with a discerning eye. If you see any jerky parts, then come back with an URL where I can download a *source* clip of the jerky part. I'll be able to tell you why it is coming out jerky.

I fully concur with your eschewing of authority and your healthy skepticism. :)

So nobody knows if 3:2 pulldown symptoms such as what I've described above would appear in native 30fps material?It's possible but unlikely. I assume you mean pure interlaced material. With such material there is a different temporal moment at each field. So each frame made of two fields can show combing. It is theoretically possible that the actual motion pattern simulates the 3:2 pattern but it would be highly unlikely to do so for a sustained period.

neo_sapien
6th October 2002, 15:23
I just DivXed Season 4 Disc 3 at 23.976fps and playback was good. I watched a whole episode (186 The Wounded) to make sure. No jerky movements. My decomb plugin is 4.00r6 and here's the script which I used (I found it on another thread about TNG):

Telecide(guide=1,firstlast=true,gthresh=10,post=true).Decimate(mode=2,cycle=5,quality=3,threshold2=2.0)

Ookami
6th October 2002, 16:59
http://forum.doom9.org/showthread.php?s=&threadid=14816

German:

http://www.dvdboard.de/forum/showthread.php?s=&threadid=38058

JohnMK
6th October 2002, 21:33
I still see jerkiness, let me attempt to find a way to split a VOB file. :) Maybe DVDDecrypter.

Okay the smallest I can get out of DVDDecrypter is cell 1 of chapter 1, which is still 168MB or so. What other method do you suggest? I'm on 10MBit internet, btw.

Guest
7th October 2002, 01:23
Just serve the movie into VirtualDub without any filters and then set start and end points and then save it out with appropriate compression. Use MJPEG for example. All I need is the portion that comes out jerky.

JohnMK
7th October 2002, 02:33
Where can I find MJPEG?

I did a google search but I really don't know which to get.

Guest
7th October 2002, 04:03
If you don't have access to a suitable codec then use VobSplitter to cut out a section of the VOB.

JohnMK
7th October 2002, 05:04
Thanks. Worked perfectly.

http://students.washington.edu/chs4000/neuron2.zip

It's not zipped. Just rename it to .vob.

Guest
7th October 2002, 07:24
OK, I've got the VOB. You can recover the web space.

There is one very noticable jerk that I looked at. It is as the ship traverses the planet, from frame 75 to 76 (numbering after decimation). If you turn on show=true for Decimate(), you'll see that as it goes from 75 to 76, the nondecimated frame goes from 93 to 96 indicating that frames 94 and 95 got decimated.

But the decimation of two successive frames is not really wrong here, because if you look at the frames around that area, Decimate is removing the correct frames based on their similarity to their predecessors.

Then you notice that the 3:2 pattern phase changes right at that point, for no apparent reason. The phase change is apparently what causes this unfortunate situation. You can improve it a little bit by forcing the decimation of frame 93 instead of 94; there is still a very slight jerk, but most people wouldn't notice it.

I don't know why the telecine pattern phase was changed at that spot. If phase changes happen often, then you may have many of these little jerks. In such a case it may be better to use Decimate(mode=1). That seems to be the general consensus, from what others have posted. If the occurrences are few you could force decimation at all the jerk points so as to minimize the effect.

JohnMK
7th October 2002, 10:05
Very -- very interesting analysis. Thank you. One question though. When I look at the original material in the affected frame area, I don't know how you can tell that there was a change in pattern. I continue to see the same 3-2 pattern, beginning in frames 88 all the way through 129. Why is that?

Guest
7th October 2002, 14:07
Sorry, you are correct. I made an incorrect inference from the output of Telecide().

Actually, there are some really strange things going on with this clip now that I look again more closely. I will post again this evening with my revised analysis.

JohnMK
7th October 2002, 14:32
My God you work too hard for us. I can tell you I appreciate your help Sir, and I hope your kindness someday comes around.

Btw, I picked this clip because it was the first one that I noticed DVD2AVI's Forced FILM failing on. Where I noticed it was in the scene with Wesley Crusher. DVD2AVI's output was very stuttery (and/or?) combed. Do you see anything fishy there too, or only in the credits? Btw, decomb seems to handle that particular scene just fine.

Guest
7th October 2002, 14:42
I now know exactly what is happening but I have to go to work. When I get there I will post. :)

Guest
7th October 2002, 15:41
OK, here goes...

First consider a pure 3:2 pulldown sequence. If you separate the fields and view them, you'd expect to see this pattern, where + denotes a new picture and - denotes the same picture as the previous field but in the other field (the double -'s are where the picture is "pulled down" an extra time):

+ - + - - + - + - - + - + - -
P P I I P P PThe second line shows whether the corresponding frame is seen as progressive (P) or interlaced (I).

Now consider what you ACTUALLY see on the Star Trek clip when you look from frame 130 (numbering after separating fields into frames):

+ - + - + + - + - + + - + - + + - + - + +
P P I I I P P I I IFrom looking at the actual field pictures, you can see that from frame 65 of the original clip, you expect to see a pattern of PPIII. But you claimed to see PPPII patterns and concluded it was pure 3:2 pulldown. So look again VERY CLOSELY at the original clip from frame 65 on. You'll see that one of the frames you concluded was P is in fact I. Look at both the ship itself and the planet below the ship. You'll see this:

frame 65: P
frame 66: P
frame 67: I (on planet)
frame 68: I (on planet and ship)
frame 69: I (on ship)

So, everything is in agreement. We can conclude that it is definitely not simple 3:2 pulldown of progressive frames. If it were, we would not see this pattern. It appears that the rendering of the part in question must be at 30fps and the particular patterns of motion of the background and ship fooled you, because you only looked at the obvious interlacing on the ship and missed that on the background.

JohnMK
7th October 2002, 15:45
Interesting. Let me ponder my next step. To decimate or not to. I probably will anyway. In this case, which mode do you recommend, if indeed I'm going to be decimating to 23.976fps? Should I still use guide=1 in Telecide()?

Guest
7th October 2002, 15:55
I tried it both ways. On the non graphics parts, both worked about the same, with an occasional pattern override occurring, showing that pattern guidance was helping a little bit on those sections. On the graphics parts, it also appeared to make smaller jerks, but I looked at only a very small sample. Based on that I'd recommend using:

Telecide(chroma=true,guide=1,gthresh=30)
Decimate(quality=3)

This is a difficult decision to make. You may want to experiment with Decimate(mode=1) if you don't mind having a bigger encode. I had similar problems with Lain and decided to go with Decimate(mode=1). And you've heard what the others posters think about it. We report; you decide!

JohnMK
7th October 2002, 16:46
Okay, I relent. I'm keeping the NTSC framerate. :D In that case, based upon what you've seen, would you recommend

Telecide(chroma=true,guide=1,gthresh=30)
Decimate(mode=1,quality=3)

?

Thanks,

John

Guest
7th October 2002, 17:04
Hi,

I can't make a recommendation until I get home this evening as I don't have the clip here. I can tell you that it is important to get the threshold correct when using mode=1. I'll post my recommendation tonight.

neo_sapien earlier suggested Decimate(mode=1,threshold=50). You could try that.

And trbarry proposed simply omitting Decimate. If you do that you will have duplicates on the pure 3:2 sections. Decimate(mode=1) is designed to alleviate that. Again, we report; you decide.

neo_sapien
7th October 2002, 17:29
Originally posted by neo_sapien
Telecide(guide=1,firstlast=true,gthresh=10,post=true).Decimate(mode=2,cycle=5,quality=3,threshold2=2.0)

Don't forget to try that script. As far as I can see from my own encodes with it on S4D3 and S4D4, it gives you a flawless 23.976fps output.

Guest
7th October 2002, 18:26
Silly me, I gave threshold in units for versions prior to Decomb 4.00 rc 6!

I went home for lunch and tried this:

Telecide(chroma=true,guide=1,gthresh=30,post=true)
Decimate(mode=1,threshold=0.4,quality=3)

Seems to be a reasonable solution if you want to retain the NTSC rate.

JohnMK
7th October 2002, 18:45
Originally posted by neo_sapien


Don't forget to try that script. As far as I can see from my own encodes with it on S4D3 and S4D4, it gives you a flawless 23.976fps output.

I'll try that and let you know how it looks. But really I'm more inclined now to leave it @ 29.97fps. There isn't a perfect way to get native 29.97 down to 23.976, as neuron2 and I found out.

Guest
7th October 2002, 19:02
Yes, but as you are about to find out, there's no perfect way to leave it at 29.97 either. :(

JohnMK
7th October 2002, 19:35
@neo_sapien

This:

Telecide(guide=1,firstlast=true,gthresh=10,post=true).Decimate(mode=2,cycle=5,quality=3,threshold2=2.0)

Is far from flawless. The ship scenes and other native 30fps scenes are jerky and cause vomiting. But I guess it looks okay on the FILM portions.

@neuron2

Your suggest doesn't look much better, oddly. The panning in Wesley's laboratory looks especially jerky, vis-a-vis the 23.976 settings above. I honestly can't explain this. :(

But I'll let you guys decide, I'm about to puke from looking at these over and and over again:

http://students.washington.edu/chs4000/301_29970.avi
http://students.washington.edu/chs4000/301_23976.avi

I have one concurring opinion so far that 29.970fps encode is shaky in the Wesley laboratory scene. :(

Guest
7th October 2002, 20:06
>Your suggest doesn't look much better, oddly. The panning in
>Wesley's laboratory looks especially jerky, vis-a-vis the 23.976
>settings above. I honestly can't explain this.

There's nothing to explain; it's obvious. :)

If you take real 3:2 pulled-down film source and recreate the progressive frames but leave it at NTSC rate, you will have a duplicate frame in every 5. This is the source of the jerkiness. Decimate(mode=1) makes it a little easier on the eyes, but as we've been telling you all along, there simply is no perfect (or even very good) solution for this hybrid material.

To get both the film and non-film parts looking smooth, you could smart bob it up to 60fps, but it takes a really fast computer to play it at full rate. And even then you'd start complaining about the flutter/shimmer. :)

Speaking of which I am currently working on an improved smart bob filter for Avisynth. Watch this forum for developments.

neo_sapien
7th October 2002, 23:04
Originally posted by JohnMK
Is far from flawless. The ship scenes and other native 30fps scenes are jerky and cause vomiting. But I guess it looks okay on the FILM portions.

To each his own. That clip is silky smooth for me, highly watchable, and there's a 25% gain in # of bits/frame.

JohnMK
7th October 2002, 23:46
Originally posted by neo_sapien

and there's a 25% gain in # of bits/frame.

Not really. The 29.97fps film is more compressible than 23.976 because there's more redundancy, so the difference isn't anywhere near 25%. More like 10-15%. But anyway, I think I'll end up ivtc-ing to 23.976fps. I'd rather most of the show look good than none of it. :D

Guest
8th October 2002, 01:22
Originally posted by JohnMK
I'd rather most of the show look good than none of it. :D John, maybe you don't realize it but this comment is incorrect, an exaggeration, and most importantly, disrespects a lot of very intelligent people that have concluded otherwise. I'd advise you not to bite the hands that feed you.

Suzahara
8th October 2002, 01:39
Originally posted by neuron2
Speaking of which I am currently working on an improved smart bob filter for Avisynth. Watch this forum for developments.

Very good news. Will this smart bob filter be similar to the ones in windvd and powerdvd? (or hopefully better :D ) Because when I set it to bob in the players, I notice that interlacing is 100% gone, and windvd's is especially good since I don't notice the side effects all that much.

Guest
8th October 2002, 01:53
I don't know what those players are doing, so I can't compare what I am doing to them. I'll just say that I am working on a way of extracting the maximum spatio-temporal information without introducing objectionable flutter/shimmer. My Smart Bob for VirtualDub is deficient in this regard. Gunnar Thalin's Deinterlace-Smooth is better but very slow and not Avisynth-native.

Of course, it's always better to do the bobbing in the player, because otherwise the file size gets much larger. But for some situations it is useful to do it during encoding.

JohnMK
8th October 2002, 03:24
Originally posted by neuron2
John, maybe you don't realize it but this comment is incorrect, an exaggeration, and most importantly, disrespects a lot of very intelligent people that have concluded otherwise. I'd advise you not to bite the hands that feed you.

You radically misinterpreted me -- I never mean to disrespect, in fact I think I emphasized my gratitude many posts ago, quite plainly and enthusiastically! But it's my fault since I left myself open to it. Anyway I apologize for posting such ill-thought-out gibberish. I knew it was unclear at the time of posting, and I really should have followed my instinct in editing it further. But honestly the comment does have some merit. Decimated to 23.976fps, most of the episode looks perfectly smooth, because most of it is originally FILM material. Left at 29.970, most of it looks a bit jerky, especially noticeably in PAN scenes. And the native 29.970 frames didn't look that good either, but perhaps that can't be helped. Nothing's as good or as jerky-free as the DVD-source. An opinion, necessarily subjective in this regard, shouldn't offend people. That it offended you really surprises me.

Suzahara
8th October 2002, 04:25
Originally posted by neuron2
I don't know what those players are doing, so I can't compare what I am doing to them. I'll just say that I am working on a way of extracting the maximum spatio-temporal information without introducing objectionable flutter/shimmer. My Smart Bob for VirtualDub is deficient in this regard. Gunnar Thalin's Deinterlace-Smooth is better but very slow and not Avisynth-native.

Of course, it's always better to do the bobbing in the player, because otherwise the file size gets much larger. But for some situations it is useful to do it during encoding.

Sounds like a very good project. I wish you the best of luck on it. I'm sure you'll find a way to do it since your other filters turn out so well.

InfoCynic
8th October 2002, 06:02
I've been working with a few people on IRC and we have yet to come up with a good solution, but I will suggest this for people who have the luxury that is TV-Out: Interlaced XViD @ 30fps. Do not ForceFILM, do not use Decomb, do not pass Go, and most certainly do not collect $200. 512x384 with 128 audio and you should have sufficient quality, but I have yet to actually do a whole episode this way, I'm still playing with torture test clips all over the place and looking for a solution. :) To playback, you'll want to use TV-Out if you have it (I believe hardware overlay is needed, too, but the hardware people can correct me and I won't be offended :)). Else get ffdshow (a NEW one, one of the alphas) and enable Deinterlacing - Linear Blending. Of course, if you're using FFDShow, the solution isn't really any better than what else I've seen so far, but with a TV, it's quite nice. :)

Suzahara
8th October 2002, 06:15
Originally posted by InfoCynic
I've been working with a few people on IRC and we have yet to come up with a good solution, but I will suggest this for people who have the luxury that is TV-Out: Interlaced XViD @ 30fps. Do not ForceFILM, do not use Decomb, do not pass Go, and most certainly do not collect $200. 512x384 with 128 audio and you should have sufficient quality, but I have yet to actually do a whole episode this way, I'm still playing with torture test clips all over the place and looking for a solution. :) To playback, you'll want to use TV-Out if you have it (I believe hardware overlay is needed, too, but the hardware people can correct me and I won't be offended :)). Else get ffdshow (a NEW one, one of the alphas) and enable Deinterlacing - Linear Blending. Of course, if you're using FFDShow, the solution isn't really any better than what else I've seen so far, but with a TV, it's quite nice. :)

Not a bad solution, but of course it would probably look better on a TV since TV's are field based and computers are frame based. Only problem is, unless you like watching xvid on your TV, you're better off sticking with the DVD on your television unless you filter it plenty (which isn't possible much on interlaced video)...unless you don't have the DVD :D . Haven't tried the ffdshow deinterlacing yet, but it does look promising. I might have to rip one of my Star Trek dvds, see if I can work any magic :sly: .

InfoCynic
8th October 2002, 06:25
Well of course, this is assuming you want a copy of your episodes in some XViD format so you can lock those collector's boxes away to preserve their value. :) Or in case your DVD player breaks and you can't go another minute without seeing Picard say, "Shut up, Wesley."

And since ffdshow deinterlacing is still an Alpha feature, I have this hope that it might someday work correctly. Linux users have reported mixed results with mplayer (which baffled them, because mplayer works for everything, they thought ;)).

Yeah, I just haven't found the hybrid solution to be that good. Certainly it's better than anything I've seen before, but it's not perfect yet. Maybe it is impossible without frame-by-frame overrides, or interlacing, but at least one person I know insists the right answer is out there, we just haven't found it yet. :)

Guest
9th October 2002, 01:13
@JohnMK

Don't worry about it. Regulars here know that I offend easily. You make some valid points but your phrasing did seem to imply that people who went the other way were, shall we say, less than fully competent. :) After all, who could choose a solution such that "none of it looks good"? Anyway, I understand you didn't intend that, so let's move onwards and upwards. For my part, I will continue my skin-thickening exercises. No hard feelings. Please continue making your interesting and valuable posts; don't be alienated by my idiosyncrasies. :)