Back Forum Reply New

Why deinterlace?

Why do we deinterlace? MPEG2 supports interlaced contents fine, and if you uncheck the quotrogressivequot; checkbox in CCE the players will treat it as interlaced content. All the titles i have encoded that were deinterlaced has come out fine... so why deinterlace?

-Rune Svendsen

Hi reedeemer-dk,

try to do an interlaced encode with a max bitrate of 2788 kbit/s (SVCD max standard) - and you will see why people want to deinterlace at such low bitrates.

Greetz,
Gerti

It would give you better compression ratio when you deinterlace the video. Also, if you plan to watch that movie on computer monitor, you better deinterlace. It looks much more better.

I can understand the bitrate issue. But when i watch interlaced DVDs in PowerDVD they look fine...

Interlaced SVCD will also look fine - if you are using Bitrates much higher than SVCD-Standard (2/3 of DVD-Standard).

@redeemer-dk
I think deinterlacing ruins the material completely.
Never deinterlace interlaced material unless you resize it below 576 (PAL) or 480 (NTSC) vertical lines of resolution, use a format that doesn't support interlace, and aim to view it *only* on the computer monitor.

Deinterlacing for DVD and SVCD creation is something I find especially awful.
Yes, PowerDVD deinterlaces the video on the fly, that is what one wants when watching interlaced video on a computer monitor (which is progressive). Then, when one pops the SVCD in the standalone DVD player, it will look good on the TV as well.
So, by *not* deinterlacing, one gets the best of both worlds.

Sure, deinterlacing may save bits and there'll in some cases be less blocking.
But it also totally ruins motion, if you ask me. Plus, you'll get ghosting and other unsightly effects from the deinterlacing and I find that much more offensive to the eye than a little blocking every now and then.
Some material just isn't suited for SVCD. Music videos, interlaced video like sports (lots of action, rapid motion, many scene changes), for example. Progressive video is of course the best, because it's easier for the Mpeg-2 encoder to deal with, but interlaced material can look smashing too. Documentaries looks great, sitcoms, talkshows, well, most material looks great when one makes an effort to set up the encoder right. But only when kept interlaced.

Why do we deinterlace? MPEG2 supports interlaced contents fine, and if you uncheck the quotrogressivequot; checkbox in CCE the players will treat it as interlaced content
If you uncheck quot;progressivequot; in CCE it will use a different method for encoding the material most suitable way. For progressive video content, CCE uses something called quot;Zig-Zag scanquot; and for interlaced it uses quot;Alternate scanquot;. When you uncheck quot;progressivequot;, it uses alternate scan which is better for interlaced material.
The same goes for most encoders, such as TMPGEnc, they can switch between these algorithms.
You can read more about it if you do a search on the web. But you are absolutely right, there is no need to deinterlace Mpeg-2. In fact I think it is wrong to do so.

I agree with everything Swan said, well done. But just to make sure, when encoding interlaced material, besides unchecking quotrogressive framesquot;, you'll also have to uncheck quot;ZigZag scanquot; (CCE 2.50) and set scanning order to quot;Alternatequot; (CCE 2.66+).

RB, you are absolutely right, thanks for adding the info.
The quot;progressivequot; checkbox in CCE (2.66+) just sets the flag in the Mpeg-2 header to quot;progressivequot;.
Unchecking quot;Zig-Zag scanquot; and selecting quot;Alternatequot; is *very* important.

I'm glad someone agrees with me, most people don't seem to understand why deinterlacing is wrong when encoding interlaced material to SVCD/DVD.

I agree.
Hehe, i guess some people are thinking interlacing is an error in the Video  

There are only a couple of reasons for Deinterlacing:
Very low bitrates
Output-Format does not support interlacing
Captures from very old VHS-Tapes

I'm sorry, Bach, but I was talking about interlaced video and assumed everyone else was too.
For me, the words quot;interlaced videoquot; means genuinely interlaced material (shot on a video camera which takes 29.97 frames per second, 59.94 fields for NTSC, 25 frames per second, 50 fields for PAL), and not quot;artifically interlacedquot;, i.e. telecined.

Deinterlace is something that is done on interlaced video and is damaging. In contrast, to perform IVTC on NTSC telecined material is 100% correct. That is not damaging at all. If done right, of course.
I don't call that procedure deinterlacing, I call that inverse telecine.

But just as you say, when the video is neither fish nor fowl, that's when it gets tricky (a bad telecine, like snip.avi the one I stumbled upon and you mention above). I'll try your script.
I ended up encoding it as interlaced, in order to not risk add any more ghosting and blending. And the resulting SVCD looked as bad as the DVD, in terms of blended fields. But at least not worse.

So.. I stand by what I wrote:
Deinterlacing interlaced material is wrong.
Because degrading the quality of the material, to me, is wrong.
where the quot;|quot; means that you have a scene cut/edition at this point. As you can see, the video starts as quot;top field firstquot; and suddenly becomes quot;botton field firstquot;. The decoders doesn't have problems with it, because it reads the quot;field order flag of the

I understand 100% about field order.
I have never encountered a DVD (or video elsewhere) with both Top and Bottom field first order, but I can see how it can happen and why it doesn't matter on, say a DVD, where the decoder just reads the flags.

Luckily, these things are rare.
All I am saying is that I am against deinterlacing *genuinely* interlaced video (shot on a video camera which takes 29.97 frames per second, 59.94 fields for NTSC, 25 frames per second, 50 fields for PAL). Artifical interlace (telecining) is something else. At least to me.
And that in some cases, it's better to leave a badly telecined film to DVD transfer as it is, as opposed to just blending already blended fields and creating an even uglier video.

Swan,
You are 100% correct - never deinterlace true interlaced video.  However, I think that redeemer-dk was confusing interlaced video with telecined video - which should be IVTC'ed.

I should not have been so quick to say DVDs with quot;variablequot; field order are unusual. I just stumbled upon one. :-(
One minute (!) of the DVD has bottom field first, while the rest it top. It's interlaced (genuinely interlaced) NTSC video. And it happens right in a scene, not on the start of one scene or at the start of a chapter.
Now, I don't want to deinterlace the entire video for one minute's worth of wrong field order.
I can see the field order problem with the naked eye when watching the SVCD I did on the TV, but also when using bob () in a script loaded into VirtualDub. Motion is fluid until that 1 minute starts, the everything moves backwards and forwards in the quot;wrongquot; way. Duh!

So, there is no way to deinterlace just those 60 seconds or change the field order on that particular spot?

Originally posted by Swan
So, there is no way to deinterlace just those 60 seconds or change the field order on that particular spot?  

when it was orginally authored, it was probably made up of two files so maybe are different cells or something.

or just cut the m2v and encode the 2 parts separate

back on the topic, as ive said many times:

Deinterlacing improves compressability at the expense of motion

(i know that doesnt apply to IVTC tho, so dont pick me up on that )

Enf...

Bach, I'm not skilled with Avisynth, so I'm probably doing something wrong. But this script won't open in Virtualdub:

I get quot;Avisynth open failure, script error,expected a, or )
(F:\music\concert.avs, line 6, column 40)quot;Code:
LoadPlugin(quot;C:\PROGRA~1\GORDIA~2\mpeg2dec3.dllquot;)
mpeg2source(quot;F:\music\concert.d2vquot;)
i=fi/196867
f=fe/200601
a=trim(0,i)
b=trim(i+1,f).separatefields().trim(1,2(f-i)-1).weave()#.swapfields()
c=trim(f+1,0)
new_stream=a+b+c
new_stream
Plus, I found a second problematic spot on the DVD. :-(
So there are two of them.

Bach! I encoded the video, a portion of the quot;normalquot; (top field order), that went into the problematic area (bottom field order) and even the transition between them looks perfect. It works!

The script you so kindly wrote is like a magic spell to me, though.
It's the most intricate Avisynth script I've ever seen.
If you have time, could you please explain what it does?
Would it be possible to add another section (I have another place, 4 minutes, on the DVD backup needs the same treatment)?

I don't know how to thank you.

It looks great, Bach.

So, I can put in several
reverse_field(last, first_field, last_field)
wherever I need them?

But you overestimate me if you think I understand this script.
You remove the first problematic field. Then quot;reconstruct the frames of the problematic segmentquot; using quot;weave ()quot; which
quot;takes pairs of fields from the input video clip and combines them together to produce interlaced frames. The new clip has half the frame rate and frame count. Weave uses the frame-parity information in the source clip to decide which field to put on top. If it gets it wrong, use ComplementParity beforehand or SwapFields afterwards.quot;
I understand the words, but this is way above my level, right now.
So only the problematic parts of the video are touched?
And the video in the problem areas will still be interlaced? You just changed the field order?

I am very grateful to you. Thanks for taking the time to help me out like this.

For me avisynth is a so marvelous tool that it deserves a quot;how to usequot; advertising.

For, me, Bach is a marvelous Avisynth function writer who takes the time to help out.
Thank you so much!

Originally posted by Kika
I agree.
Hehe, i guess some people are thinking interlacing is an error in the Video  

There are only a couple of reasons for Deinterlacing:
Very low bitrates
Output-Format does not support interlacing
Captures from very old VHS-Tapes

I'm capturing amp; converting old VHS-Tapes to DVD at the moment, and don't do deinterlacing. Could someone explain to me why deinterlacing would be better for old VHS-Tapes ? What's the criterium for this decision (e.g. how old or how bad does the tape need to be..?)

The Jez

This depents on the Tape and the VCR. On some VCRs, older tapes do result in quot;jerky Linesquot;. To encode this interlaced, you need a lot of Bitrate or real heavy filtering.
My old VCR was one of them with this quot;problemquot;. My new one (S-VHS-ET)provides a digital stabilisation, so there's no need to do any deinterlacing only for the reason that the Tape is an old one.
That's all.
¥
Back Forum Reply New