Log in

View Full Version : Help needed processing Star Trek TNG capture


Boulder
1st September 2004, 09:46
Hi guys,

I captured a Star Trek TNG episode yesterday. Now I'm processing it for encoding to MPEG-2, and found out that it looks really horrible. This is probably due to the fact that the original is hybrid NTSC material that has been converted to PAL for broadcasting it here.

Is there any way to clean it up, i.e. remove/reduce the blending and encode it as progressive or do I just have to encode it as interlaced, ugly as the source itself is?

(see my later post for the sample)

Also, what would be the least ugly way to deinterlace this kind of video for MPEG-4 encoding? Currently I'm using FieldDeinterlace(full=false).

kingmob
1st September 2004, 10:13
I don't really understand what you find so negative about encoding it interlaced? Imo, the closer you can stay to the 'original', the better most of the time. The only thing i could see it really improving the video, is somehow reversing the effect of the NTSC -> PAL conversion. But this strikes me as almost impossible, though i'm not an expert.

Boulder
1st September 2004, 10:21
Originally posted by kingmob
I don't really understand what you find so negative about encoding it interlaced? Imo, the closer you can stay to the 'original', the better most of the time. The only thing i could see it really improving the video, is somehow reversing the effect of the NTSC -> PAL conversion. But this strikes me as almost impossible, though i'm not an expert.

The point really is that the NTSC->PAL conversion makes it quite ugly looking, and I'm looking for a way to reverse that - or make the effects less apparent. Closer to the original, that is;)

Encoding as progressive requires a lot less bitrate, that's one point too.

I've successfully used Restore24 on some crappy NTSC->PAL converted movies, but this one is a tougher case due to its original nature.

scharfis_brain
1st September 2004, 15:15
Here's a sample clip, 75 frames in HuffYUV so the file is quite large (~21MB): Star Trek TNG ep 1 . It's unprocessed except that I had to convert to YUY2 since the original capture is in YV12 (a MPEG-2 capture with my PVR-250). If you need a smaller clip, just let me know.

uhm...

Why didn't you just uploaded the MPEG-2 instead?

it could have been so much more runtime to test on in 21MB...

there is no need for converting an already existing MPEG to HuffYUV it is just a waste in time, space and chroma-resolution.

Boulder
1st September 2004, 15:21
Originally posted by scharfis_brain
Here's a sample clip, 75 frames in HuffYUV so the file is quite large (~21MB): Star Trek TNG ep 1 . It's unprocessed except that I had to convert to YUY2 since the original capture is in YV12 (a MPEG-2 capture with my PVR-250). If you need a smaller clip, just let me know.

uhm...

Why didn't you just uploaded the MPEG-2 instead?

it could have been so much more runtime to test on in 21MB...

there is no need for converting an already existing MPEG to HuffYUV it is just a waste in time, space and chroma-resolution.

Hehe, a good point. Just a moment..

Boulder
1st September 2004, 15:38
OK, here's an unprocessed MPEG-2 video sample, I cut and demuxed it with TMPGEnc's MPEG Tools (~17.6MB). As before, if you need any other clips, just let me know.

TNG clip (http://www.saunalahti.fi/sam08/trek_testclip.m2v)

I don't mind if the CGI scenes would be left a bit jerky if the non-CGI scenes would just be smooth.

scharfis_brain
1st September 2004, 15:41
Just a moment..

That's what HAL-9000 said, too... hehe

but back to topic:

I've examined the short sample: restore24 fails indeed.

cause the video has been noise reduced by the broadcaster, so there the already blended fields are blended into each other again, making a reliable blend detection nearly impossible.
also the existing noise makes it hard to detect blends..

but I try some things to improve this issue...

pelle412
1st September 2004, 18:27
Somewhat OT while we're on the subject of Star Trek TNG. Is Decimate mode=3 (mostly film/ntsc) still the recommended way to produce 24fps AVIs from the DVD episodes? I haven't seen or heard any discussions on this for some time. The results aren't perfect but still better than mode=0. The jerky motion seems to be the result of the 50/50 frame blend of the two closest frames in the decimate cycle. Ideally the cycle of 5 frames would decimated to 4 using some more sophisticated motion compensating technique that results in a smoother playback. Any new or fresh ideas on this subject?

Thanks

phædrus
11th September 2004, 20:16
pelle, I suppose that mode=3 is still the best way to go for ST-TNG, but from my point of view it is still not satisfactory. I don't want to be a whiner, but decomb/decimate is really a great piece of work, because it can distinguish between the video and film portions of hybrid clips, and yet once that distinction is made, still the best that can be done is field blending of either the film part or the interlaced video in mode=3.

So much effort has been put into working out problems with subtitles and how to add various sound schemes, dual soundtracks, AC3 and other such complications. And yet no one has seen fit to solve the problem of making smooth 24fps progressive frames out of hybrid material. I'm not sure whether that is because it would be such a time-consuming technical task, or because people don't mind the spaceships jerking across the screen.

For the record, I do mind, especially in shows like Babylon 5, where there is so much interlaced video material.

The solution you propose, "Ideally the cycle of 5 frames would decimated to 4 using some more sophisticated motion compensating technique..." is what I have wished for for some time. I know there are expensive processing programs that one can buy to do it, but I can't afford them. If I knew how to write programs like these, I would certainly take the trouble to do so, and share it with everyone. But I'm not a programmer. And terms like HuffYUV frighten me. :-) It as much as I can manage to make programs like DGIndex work, and write simple .avs scripts.

Actually, a smooth 30fps->24fps conversion scheme would be useful for pure interlaced 30fps video as well -- if you wanted to compress it to a smaller space and make encoding easier and more efficient. A good interpolation filter would have uses beyond hybrid material like Trek.

Even if you preserve the fields and do an MPEG-2 encoding of these hybrid programs, keeping it interlaced, it is not ideal. When you play them with a DVD player on a television, they look fine. But on a computer, software like WinDVD just blends a lot of the mismatched fields in the telecined film portions, which looks as awful as decimate mode=1 AVI files. Maybe a different software player wouldn't do this?

Well, I do hope someone will take pity on us and come up with a more agreeable solution.

scharfis_brain
11th September 2004, 21:27
phædrus: boulder is a PAL-User, so a simple telecide.decimate command won't help much.

MrBunny
11th September 2004, 21:48
There have been several (now dead) threads regarding Star Trek and B5 hybrid ripping. Donald Graft did participate in some of these discussions and did make attempts to aid those of us playing with these sources. There have also been some good settings posted based on experience with these sources. They might be limited to mode=1 (I don't recall) but the settings that would be most useful anyways would be the ones to differenciate the film from the ntsc portions. I have seem some very nice mode 1 hybrid encodes, so I wouldn't completely discount that method. It all depends on the threshold chosen.

Donald did demonstrate 30->24 fps output from MotionPerfect, a commercial app, and it was impressive. I do definately agree that it would be nice to have a free filter/application with a similar quality output for these hybrid sources.

The screenshot of the PAL Trek dvds that I saw was field-blended, so there's not too much we can do about that. The PAL B5 S1 DVDs seemed to look perfect however, I'm not sure how they did it, but they did.

Boulder
12th September 2004, 08:16
From what I've heard, the first season of TNG is ugly looking on the DVDs (and on the TV airings as well). After that it's supposed to get at least slightly better.

I solved my case by simply processing and encoding as interlaced MPEG-2 at 704x576. The compressibility hit was a lot less than I expected, probably due to the fact that the material isn't pure interlaced video and the video is quite soft. It came out looking quite nice even at the avg bitrate of ~2000kbps.

scharfis_brain
12th September 2004, 12:04
for a TV-cap, use restore24

and for a PAL -TNG-DVD use this : http://forum.doom9.org/showthread.php?s=&threadid=82214

Boulder
12th September 2004, 12:11
Originally posted by scharfis_brain
for a TV-cap, use restore24


That's right, I should go for Restore24, but as we figured out, it doesn't work with those captures of mine:(

scharfis_brain
12th September 2004, 12:22
ah! shit! my brainless brain!

I've totally forgotten, that I've aleady took a look on your sample some time ago!

scharfis_brain
12th September 2004, 13:23
hey, Boulder, knowing what?

my function repairPAL_TNG_DVD() is able to make even stupid fieldblended stuff of TNG looking blendfree.

but is has a downside: is does NOT decimate the one duped frame per second and it sometimes drops a frame....

but I think, you should check it:


i=avisource("trek_testclip.avi").assumetff().converttoyv12(interlaced=true)

#here, denoise the fields separately, to avoid the blends influcing the good fields when denoising
ie=i.separatefields().selecteven().temporalsoften(1,8,12)
io=i.separatefields().selectodd() .temporalsoften(1,8,12)
i=interleave(ie,io).weave()

#deblend
repairPAL_TNG_DVD(i,show=true)

Boulder
12th September 2004, 13:33
Great, I'll try to find the time! There's one episode coming out tonight, but I'll be heading for a vacation for a week tomorrow so I'll have to report after that.

phædrus
12th September 2004, 23:26
Originally posted by scharfis_brain
phædrus: boulder is a PAL-User, so a simple telecide.decimate command won't help much.

True, but I was replying to pelle, who is from Minnesota, and presumably working with NTSC. :-) Like me.