Log in

View Full Version : Deinterlace - Scaling - Postprocessing (Confusion)


drbuzz0
25th January 2007, 22:11
Let me start by saying I have read 100fps and it's a great guide, but I am wondering about a few things involving deinterlacing and scaling. I am using Media Player Classic and the FFMpeg direcshow decoder filter package for most of my decoding.

The issues I have are first this: How does the system *know* if the video is interlaced or not? Deinterlacing non-interlaced video is not a good idea and when the video is very small, it's reasonable to assume it is not interlaced, but what about if it is something like 320 or 360 lines vertically? And also, if the video was originally 480 lines vertical and is reduced... well that just seems weird, because some of the lines would be discarded when resized.

Furthermore, many of the things I watch are DVD's or DVD rips I have made at full resolution. In these cases, the method of deinterlacing may be simple 2/3 pulldown. I generally have my setting at "bicubic blend" which gives good results without great loss of speed. This would probably not be optimal way if the image is a 24 to 30 fps conversion. Is there a way to detect this?

Okay... final question. I recently ripped a dvd of family guy episodes for easy play-back on my system. I ripped it at 1200 kbps full resolution (704x480 NTSC). When I expand the images to full screen, it looks very pixelated and not properly smoothed and blended. I have the MPC scaling settings set to bicublc, but it looks almost like "nearest neighbor"

Screencap shown bellow. Tried changing postprocessing, deinterlacing settings in FFDShow. However, no real luck. Tried messing with the scaling output settings in MPC, but also not much luck.

Some settings do change or improve the quality, but thus far none are all that much better.

chipzoller
26th January 2007, 00:38
You have many questions here. Let's knock them out one by one.

How does the system *know* if the video is interlaced or not? In short, most don't. There are different deinterlacing methods as you've seen by now. Some actually do some smart calculations on the video stream and others simply execute a transformation (such as a bob for example).

Deinterlacing non-interlaced video is not a good idea and when the video is very small, it's reasonable to assume it is not interlaced Well first, there's no need whatsoever to deinterlace (or attempt) non-interlaced content. Video being "small" is a matter of reference to the source material, and something like 320 or 360 vertical lines of resolution would depend on the source material likewise. You may be thinking of capturing video, in which case if you capture half vertical resolution you should have a progressive stream as half of the fields will simply be discarded.

Furthermore, many of the things I watch are DVD's or DVD rips I have made at full resolution. In these cases, the method of deinterlacing may be simple 2/3 pulldown. I generally have my setting at "bicubic blend" which gives good results without great loss of speed. This would probably not be optimal way if the image is a 24 to 30 fps conversion. Is there a way to detect this? What is optimal is to do an inverse telecine on material that is pulled down. Doing so restores it back to the original frame rate when the film was transfered into digital video. There are many guides on the explanations and solutions to telecined video.

Regarding your last question, the attachment will have to be approved before anything of specific help, but I can tell you that if you haven't resized Family Guy then the aspect ration is almost certainly wrong. The best would be to crop and resize to something like 640x480 to keep maximum resolution. And not to mention this is almost certainly interlaced to some degree, most likely telecined.

foxyshadis
26th January 2007, 03:18
What the screencap shows is simple dumb bob capture. The quickest and worst form of deinterlacing. (Well, blending might be worse.) The only way to really recover something like that is to resize to half height and using something like EEDI2 to re-interpolate the lines. If at all possible, rerip and use something like DGDecode to properly rip them. Whatever you used to convert them from DVD did a real number on it.

I think DScaler is the only way you can get a decent real-time IVTC, ffdshow doesn't come with one. You can use avisynth-in-ffdshow (or load an avisynth script into your media player of choice), but that can be slow and jerky if your system isn't awesome. Otherwise, pick the deinterlacer you like best - I usually use kernel or blending.

There are actually interlaced flags streams and decoders can pass on to post-processors, but not enough streams use them to actually make them really useful, outside of DVDs.

drbuzz0
26th January 2007, 19:19
You have many questions here. Let's knock them out one by one.

In short, most don't. There are different deinterlacing methods as you've seen by now. Some actually do some smart calculations on the video stream and others simply execute a transformation (such as a bob for example).


I understand that. The problem then is does one have to readjust every time a new video file is played? It would be nice to have it set so that if an interlaced file is played it will do a decent job of deinterlacing but if it is already progressive, it won't mess it up too badly




Regarding your last question, the attachment will have to be approved before anything of specific help, but I can tell you that if you haven't resized Family Guy then the aspect ration is almost certainly wrong. The best would be to crop and resize to something like 640x480 to keep maximum resolution. And not to mention this is almost certainly interlaced to some degree, most likely telecined.[/QUOTE]

It may be the wrong aspect ratio. I believe I had the system set to allow for free resizing without necessarily preserving the aspect ratio. That's not so much the problem as the poor scaling and analysis. No matter how I change the size or tweak the settings, it still looks almost equally bad.

drbuzz0
30th January 2007, 19:25
Does anyone know of a deinterlace method which is "smart" enough to know when NOT to deinterlace, so that one doe not need to turn it on and off for each and every video file?

scharfis_brain
30th January 2007, 19:48
No !...

avih
3rd February 2007, 17:17
No !...

actually, tomsmo2 does a pretty good job at this as a side effect of it's good algorithms. also, dscaler can detect whether the clip is interlaced or not (and also telecined etc) in real time and apply the required filter. it takes it few seconds to detect it, and you can leave it always on and it will adapt to any kind of material in real time (+3-4 secs), but i don't think ffdshow can hook into this detection mechanism because a. i'm not sure that dscaler exports the detection mechanism as a plugin. b. ffdshow (or any other filter that i know of) can't use such plugin even if existed and c. i don't think ffdshow can change framerate on the fly with it's current set of methods regardless of such plugin.

but it is possible. maybe if you use dscaler as a generic media player, but i must say i haven't tried it personally. kinda funny that dscaler can apply it's sophisticated mechanisms on a real-time stream, but it's harder to apply them to offline content.. well.. if enough demand arrise, then i think it would happen. usually though, it's mostly uneccessary. you can use tomsmo2 and it will look good enough without modifying anything when switching clips.

my solution btw, is to define in ffdshow that any clip higher than 288 (half of full PAL height) will be considered as interlaced. never failed to detect properly so far with the clips i use.

foxyshadis
3rd February 2007, 19:15
Actually ffdshow already picks up dscaler's deinterlacers and adds them to the available list. ;) There's on dscaler filter in particular - video (greedy high motion) - that has auto ivtc/deinterlace (or bob if "in between frames" is chosen). An ffdshow filter based on tivtc/tdeint switching would be nice - right now it works in script, but requires a timecode file due to vfw limitations, so realtime isn't possible. (Actually, maybe it could if it output to 120fps.) If it was integrated into directshow it could just modify timestamps as necessary.

ffdshow can perform any kind of realtime variable framerate changes like that.