Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th June 2003, 15:19   #1  |  Link
redeemer-dk
Registered User
 
Join Date: Oct 2002
Location: Copenhagen, Denmark
Posts: 121
Why deinterlace?

Why do we deinterlace? MPEG2 supports interlaced contents fine, and if you uncheck the "Progressive" 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
redeemer-dk is offline   Reply With Quote
Old 10th June 2003, 16:53   #2  |  Link
gerti67
Reloaded!
 
gerti67's Avatar
 
Join Date: Dec 2001
Location: The Matrix
Posts: 824
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
__________________
"We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know this is not true." - Robert Wilensky, University of California, 1997
gerti67 is offline   Reply With Quote
Old 11th June 2003, 03:20   #3  |  Link
Justinus
Anime Otaku
 
Justinus's Avatar
 
Join Date: Jul 2002
Location: Hinatasou
Posts: 220
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.
__________________
Trust is a social good to be protected just as much as the air we breathe or the water we drink. When it is damaged, the community as a whole suffers; and when it is destroyed, societies falter and collapse. - Bok (1978)
Justinus is offline   Reply With Quote
Old 11th June 2003, 15:33   #4  |  Link
redeemer-dk
Registered User
 
Join Date: Oct 2002
Location: Copenhagen, Denmark
Posts: 121
hmm

I can understand the bitrate issue. But when i watch interlaced DVDs in PowerDVD they look fine...
redeemer-dk is offline   Reply With Quote
Old 11th June 2003, 15:46   #5  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
Interlaced SVCD will also look fine - if you are using Bitrates much higher than SVCD-Standard (2/3 of DVD-Standard).
Kika is offline   Reply With Quote
Old 11th June 2003, 21:17   #6  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
@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.

Quote:
Why do we deinterlace? MPEG2 supports interlaced contents fine, and if you uncheck the "Progressive" checkbox in CCE the players will treat it as interlaced content
If you uncheck "progressive" in CCE it will use a different method for encoding the material most suitable way. For progressive video content, CCE uses something called "Zig-Zag scan" and for interlaced it uses "Alternate scan". When you uncheck "progressive", 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.
Swan is offline   Reply With Quote
Old 12th June 2003, 07:33   #7  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
I agree with everything Swan said, well done. But just to make sure, when encoding interlaced material, besides unchecking "Progressive frames", you'll also have to uncheck "ZigZag scan" (CCE 2.50) and set scanning order to "Alternate" (CCE 2.66+).
RB is offline   Reply With Quote
Old 12th June 2003, 11:37   #8  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
RB, you are absolutely right, thanks for adding the info.
The "progressive" checkbox in CCE (2.66+) just sets the flag in the Mpeg-2 header to "progressive".
Unchecking "Zig-Zag scan" and selecting "Alternate" 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.
Swan is offline   Reply With Quote
Old 12th June 2003, 12:15   #9  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
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
Kika is offline   Reply With Quote
Old 12th June 2003, 13:19   #10  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
I'm sorry, Bach, but I was talking about interlaced video and assumed everyone else was too.
For me, the words "interlaced video" 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 "artifically interlaced", 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.


Last edited by Swan; 12th June 2003 at 13:37.
Swan is offline   Reply With Quote
Old 12th June 2003, 16:45   #11  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
Quote:
where the "|" means that you have a scene cut/edition at this point. As you can see, the video starts as "top field first" and suddenly becomes "botton field first". The decoders doesn't have problems with it, because it reads the "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.

Last edited by Swan; 12th June 2003 at 16:52.
Swan is offline   Reply With Quote
Old 12th June 2003, 21:33   #12  |  Link
slk001
Registered User
 
Join Date: Apr 2002
Posts: 399
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.
slk001 is offline   Reply With Quote
Old 13th June 2003, 12:53   #13  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
I should not have been so quick to say DVDs with "variable" 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 "wrong" way. Duh!

So, there is no way to deinterlace just those 60 seconds or change the field order on that particular spot?
Swan is offline   Reply With Quote
Old 13th June 2003, 14:58   #14  |  Link
auenf
avatar doesn't support IE
 
auenf's Avatar
 
Join Date: Feb 2002
Location: The Great Southland
Posts: 2,238
Quote:
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...
__________________
Sometimes I get halfway through a paragraph explaining something, then I just completely forget what I was thinking about
which is when you will notice that the paragraph just ends rather abruptly...
auenf is offline   Reply With Quote
Old 13th June 2003, 16:48   #15  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
Bach, I'm not skilled with Avisynth, so I'm probably doing something wrong. But this script won't open in Virtualdub:

I get "Avisynth open failure, script error,expected a, or )
(F:\music\concert.avs, line 6, column 40)"

Code:
LoadPlugin("C:\PROGRA~1\GORDIA~2\mpeg2dec3.dll")
mpeg2source("F:\music\concert.d2v")
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.
Swan is offline   Reply With Quote
Old 13th June 2003, 22:17   #16  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
Bach! I encoded the video, a portion of the "normal" (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.
Swan is offline   Reply With Quote
Old 14th June 2003, 18:09   #17  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
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 "reconstruct the frames of the problematic segment" using "weave ()" which
"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."
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.
Swan is offline   Reply With Quote
Old 15th June 2003, 20:38   #18  |  Link
Swan
It's more fun to compute
 
Swan's Avatar
 
Join Date: Apr 2002
Location: Scandinavia
Posts: 536
Quote:
For me avisynth is a so marvelous tool that it deserves a "how to use" advertising.
For, me, Bach is a marvelous Avisynth function writer who takes the time to help out.
Thank you so much!
Swan is offline   Reply With Quote
Old 18th June 2003, 14:05   #19  |  Link
TheJez
Registered User
 
Join Date: Feb 2003
Posts: 57
Quote:
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 & 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
TheJez is offline   Reply With Quote
Old 18th June 2003, 14:15   #20  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
This depents on the Tape and the VCR. On some VCRs, older tapes do result in "jerky Lines". To encode this interlaced, you need a lot of Bitrate or real heavy filtering.
My old VCR was one of them with this "problem". 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.

Last edited by Kika; 18th June 2003 at 14:52.
Kika is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.