Log in

View Full Version : Deinterlace Vs. Interlace(size and quality?)


K(c)offee
4th January 2004, 03:28
If you encode interlaced content as interlaced with Xvid does it use more or less bits to equal the same image quality? If I just wanted to deinterlace on the fly with a player should I just skip deinterlacing to keep it as close to the original as I can?

chilledinsanity
4th January 2004, 04:39
I'd definitely deinterlace it before you encode for a couple reasons. First off, it will look fine on any player if you do, plus you won't have to spend more CPU power deinterlacing in post processing. Also, it will probably be more accurate than a post-processing method depending on how you do it.

Second, it will probably use less bits because say you have scenes with lots of horizontal motion and thus blurring. If you deinterlace first, Xvid will be able to cut some corners with the bitrate, but still leave the blur looking about the same, however if you have all those fine lines, it needs to store more information to keep them all looking correctly, and thus take up more space than it normally would.

communist
4th January 2004, 08:08
IIRC the interlace mode is only there to preserve images interlaced structure and doesnt affect the file size too much.

I recently cpatured some interlaced stuff with const. q2 and interlaced enabled. Then I played it back with ffdshow and tried several deinterlacing methods within ffdshow. Most of them gave me a ok-good picture.
You just have to ask yourself where you are going to watch all your encodes and then decide for yourself if you need:

1) no deinterlacing
2) deinterlacing during playback
3) deinterlacing before encoding

Hylas
4th January 2004, 12:14
Originally posted by chilledinsanity
Also, it will probably be more accurate than a post-processing method depending on how you do it.

No! On the playback size you can use a dynamic 50fps deinterlacer that will give you good temporal and spatial resolution (E.g. Dscaler's Greedy Filter), or use your TV, which essentially can do the same. This is particulary useful for sport transmissions.

I agree with your other points though. The bitrate impact is quite significant. :(

K(c)offee
4th January 2004, 16:41
Thanks for the replies I guess Ill stick with deinterlacing.

avih
6th January 2004, 00:23
although i didn't check this one out too much, i have a hunch that keeping the video interlaced will have better quality/bits ratio than deinterlacing 1st (asumming that deinterlacing to 50fps [i.e. PAL])

Asmodian
6th January 2004, 02:09
I thought the problem with Xvid using more bits (or less quality at the same size) occurred when encoding interlaced material as non-interlaced, i.e. before the interlaced option. Doesn't the interlaced option make Xvid encode field based instead of frame based? This would then be the preferred mode for viewing on an interlaced display device (TV) and should have similar quality/bits as de-interlacing (to the same 25/30fps, not doubling to 50/60fps) before the encode.
I must admit that I target all of my encodes to PC so do not have much experience with interlaced encoding, please correct me if I am wrong.

Asmodian

K(c)offee
6th January 2004, 03:25
LOL ok now im confused. I was so happy before I checked back here after a few days. Maybe ill have to test it out myself god forbid I do it on my own. :)

Hylas
6th January 2004, 07:57
Originally posted by avih
although i didn't check this one out too much, i have a hunch that keeping the video interlaced will have better quality/bits ratio than deinterlacing 1st (asumming that deinterlacing to 50fps [i.e. PAL])
Yes. But I don't think many people consider deinterlacing to 50/60 fps (before encoding) at all. Deinterlacing on playback is definitely the better choice.

Deinterlacing to 25/30 fps on the other hand looses some information and thus reduce the needed bitrate.

Originally posted by Asmodian
I thought the problem with Xvid using more bits (or less quality at the same size) occurred when encoding interlaced material as non-interlaced, i.e. before the interlaced option.
This is just about codec efficiency. It doesn't change the video like deinterlacing does (to increase compressibility).

This would then be the preferred mode for viewing on an interlaced display device (TV) and should have similar quality/bits as de-interlacing (to the same 25/30fps, not doubling to 50/60fps) before the encode.
No, it will have higher quality (better temporal resolution), but higher bitrate as well.

K(c)offee
6th January 2004, 09:29
How would I go about encoding at 60 FPS in GK? Does it happen on its own if you pick say 29.970 in the FPS dropdown and pick interlaced in Xvid options?

Hylas
6th January 2004, 12:11
First of all, I wouldn't advise you to do 60 fps progressive encoding. Playback compatibility is probably not higher than with 30 fps interlaced (how would you feed that to your TV?), and the bitrate consumption is considerably increased. Also, the encoding process will be much slower, although there is no information gain.

Don't know about GK, there are some framerate doubling filters available for Avisynth (TomsMoComb?).

Leak
6th January 2004, 12:27
Originally posted by Hylas
Don't know about GK, there are some framerate doubling filters available for Avisynth (TomsMoComb?).

Actually, any smart bob filter (like DGBob or KernelBob) will do framerate doubling.

np: Underworld - Mmm Skyscraper I Love You (Underworld 1992-2002)

K(c)offee
6th January 2004, 12:32
Ok im really confused now. What i thought people suggested here is that I encode interlaced content at its full speed so 60interlaced FPS. I think thats how it works. Each frame is only half the image. So while its called ~30FPS its really 60half frames... and im lost because the last reply seems to suggest I would be addings extra frames. So seeing each frame 2x each to equal 60... and my head hurts. :)

Leak
6th January 2004, 12:42
Originally posted by K(c)offee
Ok im really confused now. What i thought people suggested here is that I encode interlaced content at its full speed so 60interlaced FPS. I think thats how it works. Each frame is only half the image. So while its called ~30FPS its really 60half frames... and im lost because the last reply seems to suggest I would be addings extra frames. So seeing each frame 2x each to equal 60... and my head hurts. :)

Okay, let's give this a try: when you use "interlaced" encoding, you still feed the codec 30 (for NTSC) full-height frames per second, but since each frame consists of 2 fields that have been woven together (giving those icky combs when something's moving when played back on your PC without deinterlacing) you practically feed it 60 fields/second.

The codec then takes the full-height frames and separates the fields (even numbered lines go to field 1, odd numbered lines to field 2) and encodes these separately.

This should take less bitrate than just encoding the whole frame as said combs would be fine detail to the codec and would (unneccessarily) take more bitrate to be (imperfectly) reproduced.

Hope this makes things a little clearer. :)

np: Underworld - Rez (Underworld 1992-2002)

Hylas
6th January 2004, 12:50
Ah sorry. :p I'll try to explain:

30 fps interlaced means 30 full frames, each consisting of two fields (640*480*30). The picture is interlaced (has stripes). This is practically the same (i.e. carries the same information) as what you meant with 60 fps half frames (320*480*60).

There are reasons, however, for not using 320*480*60 simply scaled up to full height. While you get a great temporal resolution this way, the picture will usually flicker and you will loose spatial resolution in slow moving scenes (You can check this in DScaler (TV-program) with Simple Bob as Deinterlacer).

Clever deinterlacing algorithms can produce a 640*480*60 video by interpolating in high motion and leaving the original in not moving scenes (e.g. Greedy).

ffdshow, for example, can use such deinterlacers while playing 640*480*30 interlaced content.