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 5th February 2004, 02:09   #1  |  Link
Master Yoda
Registered User
 
Master Yoda's Avatar
 
Join Date: Apr 2003
Location: Somewhere On This Planet
Posts: 724
encodeing progressive interlaced

Now i have a video stream that seems to start progressive then goes interlaced.Now if i encode it interlaced would thise do any damage to the small progressive part??
__________________
UK PAL User.......
Master Yoda is offline   Reply With Quote
Old 5th February 2004, 02:14   #2  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
The progressive bits may be better encoded using zigzag, but if using alternate I doubt you'd notice the difference. Similar deal with using interlaced=true rather than interlaced=false in your avisynth script. I wouldn't worry about it...
Matthew is offline   Reply With Quote
Old 9th February 2004, 12:00   #3  |  Link
auenf
avatar doesn't support IE
 
auenf's Avatar
 
Join Date: Feb 2002
Location: The Great Southland
Posts: 2,238
Re: encodeing progressive interlaced

Quote:
Originally posted by Master Yoda
Now i have a video stream that seems to start progressive then goes interlaced.Now if i encode it interlaced would thise do any damage to the small progressive part??
90%+ of FILM based movies which are just sped up to 25fps are encoded as interlaced even tho they are really progressive frames.

the interlaced flag wont matter to playback, as long as you dont let CCE shift the video down a little.

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 9th February 2004, 20:26   #4  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
Little note:
1) CCE accepts/threats only YUY2 for input
2) MPEG2 and DVDs are effectively coded in YV12 (even by CCE)

Quote:
90%+ of FILM based movies which are just sped up to 25fps are encoded as interlaced even tho they are really progressive frames.
Indeed, I confirm too this is a common problem.
Quote:
the interlaced flag wont matter to playback, as long as you dont let CCE shift the video down a little.
But careful, because using the progressive route the UV chroma channels gets rearranged in a different way...

One may think in this case he can add a simple "ConvertToYUY2(interlaced=true)" to his Avisynth script and than config CCE for progressive encoding, since the material is progressive itself.

Ok the avisynth addition is right,
but since original stream is (by unknown reason) stored in interlaced structure the chroma lines have indipendent values for odd and even lines.
My advise in this scenario (very common) is to configure CCE for interlaced material otherwise the chroma will result overall blurred or blocky, with a 4x2 pixel pattern. (!)

now MY QUESTION IS, when encode "false-interlaced material" with CCE using interlaced mode too (progressive flag off) is it advised to use zigzag or alternate block scanning ?
unplugged is offline   Reply With Quote
Old 9th February 2004, 23:29   #5  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
@unplugged, for progressive content marked as interlaced, I've always used interlaced=false in avisynth and checked progressive in CCE.

I was of the opinion that the interlaced flag means absolutely nothing for progressive content...are you sure about it being best to mark the content as interlaced?
Matthew is offline   Reply With Quote
Old 10th February 2004, 11:06   #6  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
Quote:
Originally posted by Matthew
@unplugged, for progressive content marked as interlaced, I've always used interlaced=false in avisynth and checked progressive in CCE.
The problem is that it's not a matter of marking, it is *stored* as interlaced.
The chroma lines are combed (interlaced), I have made a simple test and VirtualDub shows that when encoding as progressive the lines get blurred together.

YV12 interlaced ---> YV12 progressive conv. is a disaster for chroma dynamics whether the content is combed or not!

In few words there is a total loss in vertical chroma resolution.
unplugged is offline   Reply With Quote
Old 11th February 2004, 01:21   #7  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
Could you tell me how to replicate this test please?

I just tried encoding a chapter from one of these DVDs (source interlaced and zigzag) with interlaced=true in avisynth and CCE and then repeated with interlaced=false. Used zigzag both times.

Used 1 pass Q20 and couldn't see any obvious differences (of course that is not exactly reliable, to say the least). The "interlaced" encoded file is 1.2 percent larger.
Matthew is offline   Reply With Quote
Old 11th February 2004, 18:02   #8  |  Link
Eki
Registered User
 
Join Date: May 2003
Posts: 27
Quote:
Originally posted by unplugged
The problem is that it's not a matter of marking, it is *stored* as interlaced.
The chroma lines are combed (interlaced), I have made a simple test and VirtualDub shows that when encoding as progressive the lines get blurred together.

YV12 interlaced ---> YV12 progressive conv. is a disaster for chroma dynamics whether the content is combed or not!

In few words there is a total loss in vertical chroma resolution.
How can you distinguish if video has been flagged as interlaced or progressive encoded in interlaced mode?
Eki is offline   Reply With Quote
Old 11th February 2004, 23:47   #9  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
Quote:
Originally posted by Matthew
Could you tell me how to replicate this test please?
Make 2 avisynth scripts, one with ConvertToRGB(interlaced=true) and the other with ConvertToRGB(interlaced=false), this is intended for testing.
Load the scripts using 2 VirtualDub sessions and set 300% zoom, search a colorful or red part in your test movie and see which has better luma-chroma matching, especially on edges.
Original movies stored as interlaced should have the right luma-chroma matching with the parameter set to true.
Sadly, there are movies encoded as interlaced but without chroma channels originally rearranged for interlaced encoding (not RGB/YUY2, but YV12 need this!), these appears better with interlaced set to false.
Quote:
Originally posted by Eki
How can you distinguish if video has been flagged as interlaced or progressive encoded in interlaced mode?
Use DVD2AVI, load the movie, shift cursor inside the movie (to skip initial screens that maybe saved differently) press the left bracket button to select from that position, than press 'F5' and look at the preview panel on the right: it can give "progressive" or "interlaced".
You can also use Bitrate Viewer program.
unplugged is offline   Reply With Quote
Old 12th February 2004, 01:36   #10  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
I know this is stupid but i can't figure out how to zoom in virtualdub

That aside, why use the convert to RGB - we are not using it for DVD backups.

I believe what Eki was asking was how to determine whether for progressive content reported as interlaced by BV or DVD2AVI:
A) The movie has been encoded in an interlaced fashion; or
B) Whether the movie has been encoded in a progressive fashion, but has just been marked as interlaced (the flag can be set in pulldown, for example, without re-encoding - not that authoring houses would do that, obviously).
Matthew is offline   Reply With Quote
Old 12th February 2004, 09:12   #11  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
Quote:
Originally posted by Matthew
I know this is stupid but i can't figure out how to zoom in virtualdub
Use recent VirtualDub(Mod) version and right-click over video.
(but before, please uncheck DirectX accel. in preferences, set 24-bit output, save options and restart VirtualDub)
Quote:
Originally posted by Matthew
That aside, why use the convert to RGB - we are not using it for DVD backups.
As I have said, that ConvertToRGB it's just for visual testing, the VDub screen image and only the screen image would be converted *anyway* in RGB (whatever is the input: YUY2, YV12...), it's not for encoding of course.
Quote:
Originally posted by Matthew
I believe what Eki was asking was how to determine whether for progressive content reported as interlaced by BV or DVD2AVI:
A) The movie has been encoded in an interlaced fashion; or
B) Whether the movie has been encoded in a progressive fashion, but has just been marked as interlaced (the flag can be set in pulldown, for example, without re-encoding - not that authoring houses would do that, obviously).
I think this can be checked visually with the 2 scripts mentioned in my post.
But I *guess* that if a movie is encoded in interlaced way, it's internally divided in 2 fields per frame (encoded indipendetly), in this case "interlaced" can't be only a flag (can't be not considered for correct playback, because it's part of structure).
unplugged is offline   Reply With Quote
Old 12th February 2004, 11:58   #12  |  Link
Eki
Registered User
 
Join Date: May 2003
Posts: 27
Quote:
Originally posted by unplugged
I think this can be checked visually with the 2 scripts mentioned in my post.
But I *guess* that if a movie is encoded in interlaced way, it's internally divided in 2 fields per frame (encoded indipendetly), in this case "interlaced" can't be only a flag (can't be not considered for correct playback, because it's part of structure). [/B]
So if Bitrate viewer reports Pic. structure: Frame and Frame type: Interlaced then it's actually progressive flagged as interlaced?

Last edited by Eki; 12th February 2004 at 12:21.
Eki is offline   Reply With Quote
Old 12th February 2004, 13:08   #13  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
Yes
Interesting, I have just tryed Bitrate Viewer (I mosty use DVD2AVI) and I found (as you) two infos: "picture structure" and "frame type". The first info can be "frame" or (?)"field", the second, and I am sure of this, can be "interlaced" or "progressive".
Now I would say that picture structure is the parameter to take with care!
Doh, I have never noticed it before, thus maybe the other called "frame type" is only player related but now expert is needed here.
DVD2AVI surely reports only this last flag (it seems to match with Bitrate Viewer "frame type").

Last edited by unplugged; 12th February 2004 at 13:11.
unplugged is offline   Reply With Quote
Old 12th February 2004, 13:34   #14  |  Link
unplugged
Registered User
 
unplugged's Avatar
 
Join Date: Oct 2001
Location: Italia
Posts: 412
My apologies Matthew, that you have referred as flag was right because the property commonly called "interlaced" or "progressive" it's NOT struture related.
"Picture structure" should be the trusted value:
for "frame" --> YV12 progressive --> ConvertToYUY2(interlaced=false) --> CCE set to progressive
for "field" --> YV12 interlaced --> ConvertToYUY2(interlaced=true) --> CCE set to interlaced
unplugged is offline   Reply With Quote
Old 12th February 2004, 22:50   #15  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
mmmm...I'm as perplexed as ever...a few things:
-CCE only outputs as picture structure = frame
-I've had a commercial DVD which is mixed content and picture structure is frame
-Procoder says following in regards to its picture structure settings:
"This determines how the field data is stored in the MPEG stream,
possibly optimizing compression.
This does NOT determine whether the output is interlaced or
progressive.
Automatic Selection will have the encoder will handle still and
low-motion frames as full frames, and handle motion frames as
interlaced. Some players may have problems with this method, in
which case you should use one of the other options.
Always Frame Structure will have the encoder store as full frames
and tends to be the most compatible mode.
Always Field Structure will have the encoder store as fields."

So if picture structure was the guide, would that not mean truely interlaced content with picture structure = frame should have interlaced=false in avisynth script? That doesn't seem to make sense.
Matthew is offline   Reply With Quote
Old 13th February 2004, 08:16   #16  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
Matthew is right, field pictures don't necessarily mean interlaced video. So far I think Procoder is the only encoder that supports this and I have rarely seen it on DVDs. I have exactly one DVD that is encoded with field picture structure.

Anyway unplugged, you are making a good point. I think you are right in that if the source MPEG2 stream was encoded as frame_type interlaced (DVD2AVI or BitrateViewer are good to check this), then it should be converted to YUY2 with interlaced=true. Also check out this post: http://forum.doom9.org/showthread.ph...800#post354127 which further explains this. Looks like always using ConvertToYUY2(Interlaced=True) is the best compromise.

Now as for how to set up CCE. Thinking about it, it should really be set according to the encoding parameters of the source MPEG. That is, 'progressive frame off/alternate' if that's what the source is according to BitrateViewer, no matter whether the source actually "looks" interlaced or not.

However, if the source is not "truly" interlaced (no interlacing artifacts visible), I would at least set block scanning order to ZigZag as this only effects motion search and storing of the DCT coefficients but not the croma.

I just did a short test with a DVD source that according to BV was interlaced/alternate but really loked progressive (like most DVDs), setting CCE to interlaced/alternate, interlaced/zigzag and progressive/zigzag. It did not make any difference in the Q factor levels, just the alternate setting slowed CCE down by about 0.2 RT. Looking at the output, I honestly can't tell any difference, but anyway interlaced is the "more accurate" setting as we now know.

This begs for a new FAQ item I think...

Last edited by RB; 13th February 2004 at 08:29.
RB is offline   Reply With Quote
Old 13th February 2004, 13:32   #17  |  Link
Eki
Registered User
 
Join Date: May 2003
Posts: 27
Bitrate viewer also reports DCT type which can be frame or field. So what does this mean? I did quick test with few DVD's and it seems that all video's encoded as progressive have DCT type frame.
Eki is offline   Reply With Quote
Old 15th February 2004, 05:40   #18  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
Quote:
Originally posted by RB
Now as for how to set up CCE. Thinking about it, it should really be set according to the encoding parameters of the source MPEG. That is, 'progressive frame off/alternate' if that's what the source is according to BitrateViewer, no matter whether the source actually "looks" interlaced or not.
But is it possible that in some cases at least, the interlaced flag is just that - a flag, and the video stream has actually been encoded in a progressive manner? Because we do know that the interlaced flag can be losslessly inserted, and we don't know (well I don't anyway) how the expensive commercial hardware encoders operate.

I'm hoping (perhaps unrealistically) that this is possible and a regular occurance, because I've encoded all of these types of DVDs (and they are extremely common) using progressive settings. At least it seems I was right to use zigzag even when alternate was used on the original DVD, though.
Matthew is offline   Reply With Quote
Old 16th February 2004, 20:20   #19  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
@Eki: http://www.bretl.com/mpeghtml/fldfrm.HTM

Quote:
However, if the source is not "truly" interlaced (no interlacing artifacts visible), I would at least set block scanning order to ZigZag as this only effects motion search and storing of the DCT coefficients but not the croma.
Oops, looks like I was wrong. Reading http://www.bretl.com/mpeghtml/zigzag.HTM, it appears that ZigZag really should be used only for progressive (that is, not encoded as alternate) sources.
RB is offline   Reply With Quote
Old 17th February 2004, 00:11   #20  |  Link
Matthew
jdgljlfljg
 
Join Date: Jan 2002
Location: Tony Abbott's electorate
Posts: 1,393
So what if a progressive source is marked interlaced/zigzag, as that's quite common? Should we use interlaced/alternate?

*sigh*, I want my mummy.
Matthew 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 16:36.


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