PDA

View Full Version : Interlaced video - I want it :-)


Swan
19th August 2002, 22:10
I hope this isn't a dumb question.

I'm wondering if anyone knows of a video compression codec, other than MPEG-2, that supports interlaced video. I've read the MPEG-4 specification on the MPEG Org's web site and there is support for interlaced video in MPEG-4. But are there any codecs "readily available" that one can use? DivX 3.11 clearly doesn't support interlaced video, I assume DivX 5 and Xvid doesn't either?

I'm asking because I capture TV shows into the computer, and output it to the TV. I capture interlaced MPEG-2 and the result looks incredible when output to the TV. The quality of the recorded video is much, much better than any "regular" VCR I've ever had.

But the problem is the file sizes. Since I don't have a DVD burner, I need a way to compress the MPEG-2 files, like, say one does with DivX, fitting a 60 minutes show on 1 700 MB CD. I want high quality video, even though its been compressed, and I want to keep the video interlaced. Is this possible today?

/Swan

Doom9
19th August 2002, 22:30
xvid has a mode for interlaced input.

Swan
19th August 2002, 22:43
Thanks a billion! I will try it immediately.
Is there any particular build or so that I need?
I have Nics binaries (XVID - 28/06/02)installed.

/Swan

Doom9
20th August 2002, 08:10
Nic's binaries will do just fine... and all later builds also contain the interlaced mode.

avih
20th August 2002, 08:25
although i remember -h saying that he's implemented it incorrectly (1 bit was the other way or something). it's still working, and -h will supply a tool to convert the encoded clip to true mpeg4 compliant interlaced.

Swan
20th August 2002, 09:37
I gave it a shot last night. I encoded a clip using the 1 pass quality mode and checked the "Enable Interlacing" option. However, the final file did not appear to be interlaced when viewed on the TV.
It looked exactly like what I see on the computer monitor..

When I pause the interlaced Xvid-encoded video in a high motion scene, I see the "combing effect" of two fields on the monitor and sort of ghosting on the TV. That didn't look right to me.

When I pause an interlaced MPEG-2 clip in a high motion scene, I get the well-known combing effect on the computer monitor, but on the TV set, the picture is sort of shaking (like when you pause a regular VCR on a frame that contains two fields, taken at slightly different times). The TV tries its best to create a steady, paused image, but it switches between the two fields, which makes the image not steady. With the Xvid clip, I see the two fields smacked together on the TV, with serious ghosting. I'm sorry about my English. :-)

How well tested is the Interlace option in Xvid?

/Swan

avih
20th August 2002, 10:44
the effects you're describing does not concern with xvid's interlaced option.

you can encode interlacd content with any codec, even without interlaced 'support' the encoding doesn't modify the clip, it just makes better use of the bits available, when it 'knows' the content is interlaced.

the problems you're seeing are related to playback of interlaced content using tv-out.

you can do this using 2 methods:

1. playback the actual interlaced encoded clip as-is. you'll have to make sure the vertical resolution of the desktop is exactly 576 for pal or 480 for ntsc. you'll also need to have a fast enough computer that's able to keep playing the clip at exactly 25fps (pal) or 30 (ntsc). you might also have fields shifted. search the forum for interlaced playback and tv-out

2. you can create an on-the-fly 50fps (pal) clip from your interlaced 25fps clip using avisynth (clip.bob or clip.bob(0.3,0.3.clip.height/2)). but the audio might have problems. the last version of avisynth that i tried supported only pcm, but i know there's some work regarding acm support for avisynth. might be worth a try.

Swan
20th August 2002, 15:05
the problems you're seeing are related to playback of interlaced content using tv-out.
Are you sure about that? When I output interlaced MPEG-2 (through Windows Media Player, using Ligos MPEG decoding filters (which does not support deinterlacing), the video I see on the TV is absolutely 100% interlaced. And it looks stunning. :-)
I can tell that the video is interlaced for sure by pausing the playback in a high motion scene, like I described in my earlier post. When I freeze the video here's what I see:
1. On the computer monitor: An image with the two fields clearly visible, offset from each other, with the combing effect.
2. On the TV: A frozen image that "trembles" or "shakes". It switches between the fields, very rapidly. This makes perfect sense to me, as the image has been paused in a frame that contains 2 fields with content that was not shot at the exact same time period. The TV "jumps" between the two.

When I output the Xvid clip and pause, I do not get the same effect on the TV. Instead I see a frame which clearly contain the two fields, but the TV does not switch rapidly between the two. I see a image that is "ghosted". It has the same appearance as a video that has been poorly deinterlaced. I see ghosting and also, movement looks unnatural, just like video that was originally interlaced and then deinterlaced before being encoded, does.
What I'm trying to say is that the Xvid clip does not appear to be interlaced.

Does the Xvid playback filter deinterlace?
If so, that could explain why I don't see interlaced video on the TV.
If I output my interlaced mpeg-2 clips using a software DVD player, like WinDVD or PowerDVD, these programs automatically deinterlace, and this deinterlaced video is then sent to the TV via the overlay. So, in order to view interlaced video on the TV, I have to use Ligos MPEG-2 filters. Other than having to use Ligos filters, output of interlaced MPEG-2 looks great on the TV, so I'm not having problems outputting interlaced video to the TV.

1. playback the actual interlaced encoded clip as-is. you'll have to make sure the vertical resolution of the desktop is exactly 576 for pal or 480 for ntsc
I have a Matrox G450 eTV card, it uses the video overlay to output to the TV, so the resolution on my desktop, etc, does not matter.

you can encode interlaced content with any codec, even without interlaced 'support' the encoding doesn't modify the clip, it just makes better use of the bits available, when it 'knows' the content is interlaced.
Yes, I am aware of that. But if I take an interlaced MPEG-2 clip and encode it to DivX (3.11), the video is no longer interlaced after having been encoded. It does not look right afterwards. I see the "combing" etc on the monitor, but on the TV, the clip looks like it's been badly deinterlaced (ghosting, bad movement, etc). Just like the Xvid clip does. What I want to do is encode MPEG-2 into a high-quality and highly-compressed format, without losing the interlacing.

SirDavidGuy
20th August 2002, 21:21
Out of curiosity, does XviD's "Interlaced" mode make any changes other than using the different scan pattern?

avih
20th August 2002, 21:54
it uses [slightly] different storage scheme, still complying to mpeg4 standard. but that's only internal.

when using it for playback, it produces a standard output, but it keeps interlaced information better and with less bits.

SirDavidGuy
21st August 2002, 01:39
it uses [slightly] different storage scheme, still complying to mpeg4 standard. but that's only internal.

I assume by "storage scheme" you mean scan pattern?

-h
22nd August 2002, 00:10
Agh sorry I didn't notice this thread earlier.

Currently there is a bug in XviD's interlacing whereby it writes non-MPEG-4-compliant bitstreams. Thus it's not MPEG-4.

I will be able to fix this in a few days, though hopefully someone else can patch cvs in the meantime.

I will work on a converter to "correct" invalid streams, as the problem only concerns writing bits that shouldn't be there, it's not that huge a deal.

I assume by "storage scheme" you mean scan pattern?

It feeds lines to the DCT function in field-order, instead of frame-order. This results in much better compression (i.e. because DCT doesn't have to deal with scanline artifacts) without any quality loss, if the same quantizer is used.

There are other tricks for decreasing the bitrate of interlaced content in MPEG-4, however I have not found the time to implement them yet.

-h

SirDavidGuy
22nd August 2002, 01:57
It feeds lines to the DCT function in field-order, instead of frame-order. This results in much better compression (i.e. because DCT doesn't have to deal with scanline artifacts) without any quality loss, if the same quantizer is used.

So... No, then.

Mpeg-2 had a special mode for interlaced content in which the scan pattern was optimized better (than the normal zig-zag) to make sure that there was long runs of zero's before going into the RLL encoder.

Mpeg-4 (I was sure, it's possible I'm wrong) also has this.

Is it not implemented in XviD?

-h
22nd August 2002, 09:06
Mpeg-2 had a special mode for interlaced content in which the scan pattern was optimized better (than the normal zig-zag) to make sure that there was long runs of zero's before going into the RLL encoder.

Yep, MPEG-4 has this, XviD does it, and it works better than MPEG-2's old manual method.

-h

Antti
22nd August 2002, 13:03
I thought special interlacing support was core profile feature. Doesn't that make interlaced XVid streams a strange mixture of simple profile and core profile features? Can a simple profile decoder decode those streams?

If only there was a player that could support realtime 50fps deinterlacing... I haven't gotten ZP+Dscaler Dshow filter to work. That would be a DV user's dream!

-h
22nd August 2002, 15:57
I thought special interlacing support was core profile feature. Doesn't that make interlaced XVid streams a strange mixture of simple profile and core profile features? Can a simple profile decoder decode those streams?

It's an "Advanced Simple Profile" feature, along with B-frames, quarter-pel motion estimation and global motion compensation. Core profile has even more fun toys.

-h

ChAoS Overlord
22nd August 2002, 15:59
Originally posted by Swan
I want to keep the video interlaced.

I'm sorry, half of this thread I don't understand, but isn't it better to encode it with for example decomb to get create a progressive avi/ogm? I think this way when playing back you'll get the least artifacts, no?

Swan
22nd August 2002, 17:20
I'm sorry, half of this thread I don't understand, but isn't it better to encode it with for example decomb to get create a progressive avi/ogm? I think this way when playing back you'll get the least artifacts, no?

No. What I absolutely do not want is to *deinterlace*.
I capture stuff from TV that is filmed with video cameras, i.e truly interlaced material. When you deinterlace genuinely interlaced stuff, you actually destroy the video. But if you only wish to compress the files to Xvid or DivX and watch the captured files on your computer monitor, then yes, you need to deinterlace.
But.. Since I want to output the videos I capture to the TV, it doesn't make sense to deinterlace.

I want to *keep the video interlaced*, but convert the MPEG-2 files into a more compressable-friendly format, yet keep the fine image quality of my files.

That's what I'm asking for help with. Is there a way to compress a one hour MPEG-2 file (mine usually are 3.50 GB) into any other format (similar to how we compress a DVD to a DivX or Xvid file) with all the lovely interlacing in place? :-)
I am aware that there will be quality loss. The DivX or Xvid files doesn't look as good as the DVD, but the quality is most often very good enough.
Perhaps it isn't possible yet? To squeeze the 3.50 GB file into 700 MB, with high video quality, using 2-pass encoding, *with the interlacing intact*?

It's been said here that Xvid supports interlacing. However, when I test coded a video, the final file did not appear interlaced. It looked as if the codec had slapped two fields into one frame; it looked (on the TV) just like bad deinterlacing does. What is the problem? Am I doing anything wrong or is it that the playback filters?


/Swan

ChAoS Overlord
22nd August 2002, 17:34
I really don't understand the problem, because when I save a source that's interlaced in divx5 (because thats the codec I normally use) with DEinterlacing it, all the "lovely" interlacing remains, e.g. you have those "very nice" combing.

But perhaps you want to say that you want the codec to KNOW it's interlaced so it effectively works like this.

Scanline 1 (which contains video data) --> encode
Scanline 2 (empty) --> skip it
Scanline 3 (which contains video data) --> encode
Scanline 4 (empty) --> skip it
...

More as a means to save space and achieve a higher quality than encoding "black scanlines" too? I don't know if it works well, perhaps this is a very good idea, because that way if we have a post processing filter for progressive scan monitors/tv's that does deïnterlacing, we could reduce filesize by more or less half the amount/increase quality to more or less twice the amount.

Is it that which you mean to do?

Swan
22nd August 2002, 17:55
I really don't understand the problem, because when I save a source that's interlaced in divx5 (because thats the codec I normally use) with DEinterlacing it, all the "lovely" interlacing remains, e.g. you have those "very nice" combing.

Yes- You will have the combing effect on your *computer monitor*.
But.. if you output this "interlaced" DivX 5 file to the TV you'll see that is is not truly interlaced any more. Look at the motion.. It will be slow and unnatural, just like after deinterlacing, look at the ghosting (where you see two fields that have been combined into one).

That DivX 5 file is not interlaced. Nor was the Xvid clip I encoded. Or...It could also be that the playback filter does not know how to decode it correctly or send it to the TV correctly.. I am by no means an expert in these things. But my MPEG-2 files look great on the TV, as long as I output them using mpeg-decoding filters that do not deinterlace. I can tell that the videos are interlaced, not just by the smooth motion and the non-existing ghosting, but by pausing the playback in a high motion scene. The "shaking effect" you will see when the TV quickly displays 2 fields that aren't taken at the exact same point in time is a sure sign the video is interlaced. Pause a progressive video and you won't see it.

/Swan

Zhnujm
22nd August 2002, 21:25
Originally posted by Swan

But.. if you output this "interlaced" DivX 5 file to the TV you'll see that is is not truly interlaced any more. Look at the motion.. It will be slow and unnatural, just like after deinterlacing, look at the ghosting (where you see two fields that have been combined into one).
/Swan

that will only happen if you use a "bad" tv-out. if you would set up your tv-out with a resolution of XXXx576 (PAL) or XXXx480 (NTSC) with overscan so that the picture is not resized (not by the player software and not by the tv-out chip) this clip would look also perfect "interlaced".
unfortunately is that not possible with all cards (it works with my geforce + tvtool).

does your card use any special feature (like dvdmax ?) if you play mpeg-2 files through the tv-out ? and maybe its not used with avi files ? that would explain why it works with mpeg-2 and not with the other files.
how exactly do you play the files ?


btw, if you want to play the mpeg-2 files with powerdvd or windvd try to set the "weave" option manually in the video options. maybe this disables the deinterlacing, but im not sure about that.

Swan
22nd August 2002, 22:29
does your card use any special feature (like dvdmax ?) if you play mpeg-2 files through the tv-out ?

Yes. I have a Matrox G450 eTV card. It uses the "video overlay". Basically how it works is that as soon a video is detected as playing, the graphics card outputs video on the TV-Out. Very simple. :-)

My desktop resolution, etc, is not relevant at all, as I know it is on many other cards. As soon as I play a video file (either in Windows Media Player, WinDVD, or any other software), the signal is sent to the TV. It works exactly the same whether I'm outputting av avi file or an mpeg file.

I play files through Windows Media Player 6.4 (the old one). I play all files with it. For MPEG-2 decoding, I use Ligos's filters, as they do not deinterlace. When I play DivX 3.11, I use the 3.11 filters, for DivX 5, I use its filters, the same for Xvid, etc. I am not using any filters that change the resolution during playback (like the DivXG400 filter from PRR).

I have seen that the weave function in WinDVD does not deinterlace. God knows what it does. :-)
To weave is a way to deinterlace, so even if it appears it's not working, I'm leaving it alone. I prefer to keep it simple, I like the old Media Player, which lets me easily check what filters are in use, etc. :-)

/Swan

avih
22nd August 2002, 23:31
look, it's very simple, the encoder does NOT blend the fields, unless u use low enough bitrate.

let's say u capture from true interlaced source.

encode, let's say, in svcd res of 480x576 (pal) using xvid at 3000kbps (either interlaced checked or not), the clip SHOULD keep the interlaced nature of the source. you can for comparision capture with mjpeg codec (interlaced if more than xxx enabled).

now play these files as u usually play. if you still don't see it play correctly on tv then u have a playback problem. very simple. if you don't see the combing effect on the monitor, same, playback problem.

checking interlaced for xvid just makes it compress interlaced content BETTER. but anyway, it does NOT blend nor deinterlace...

Swan
23rd August 2002, 00:28
look, it's very simple, the encoder does NOT blend the fields, unless u use low enough bitrate

I hear ya, Avih and I appreciate your efforts in replying (and the others who have replied too, thanks to you all). I will try this out a.s.a.p! This is just what I wanted: a practical experiment.

Now, just to make one thing clear, I have to keep the resolution of the video at a minimum of 576 pixels in height, right?

/Swan

avih
23rd August 2002, 00:31
the width doesn't matter, but the height MUST be EXACTLY 576 for pal or 480 for ntsc.

Zhnujm
23rd August 2002, 20:59
Originally posted by Swan

God knows what it does. :-)


i know it , i know it :D
it simply takes the 2 fields and produce a frame WITHOUT deinterlacing.

good luck !

^^-+I4004+-^^
25th August 2002, 22:03
here's a question that (i think) matters the most:
can xvid play interlaced video in the manner that mpeg2 can?
(ie. can it produce field based playback of the frame based recorded video?_this is needed for correct display on tv.. mpeg2 supports this_so all the dvd-players' owners get nice picture (on their tv's) out of 25fps dvd's..)

and no,i'm not aware of any other digital format that can do this(except for mpeg2)
but i'm hell sure mpeg1,divx311,xvid(builts i've got) cannot do this!

[sorry if something similar was mentioned in thread,i've got limited surfing time&i'm responding without thoroughly reading the whole post]

thanks

-h
26th August 2002, 00:16
here's a question that (i think) matters the most:
can xvid play interlaced video in the manner that mpeg2 can?
(ie. can it produce field based playback of the frame based recorded video?_this is needed for correct display on tv.. mpeg2 supports this_so all the dvd-players' owners get nice picture (on their tv's) out of 25fps dvd's..)

I'm not sure what you mean - you want XviD to output a 50 fps field-based video? That's not XviD's job, it's the player's. The MPEG-2 codec you're using isn't outputting fields, it's outputting whole frames which are separated afterwards, and that I can promise you.

MPEG-4 handles interlacing quite a bit better than MPEG-2 did, I assure you. It just doesn't have the hardware support necessary for your MPEG-2 playback trick (yet).

But yes, MPEG-4 has built-in flags like video-is-interlaced and top-field-first, along with a suite of coding tricks to reduce the bitrate of interlaced content. XviD already supports this, however as you may have noticed there is a bug which I still haven't had access to fix yet.

-h

^^-+I4004+-^^
26th August 2002, 19:23
-h>I'm not sure what you mean - you want XviD to output a 50 fps field-based video? That's not XviD's job, it's the player's. The MPEG-2 codec you're using isn't outputting fields, it's outputting whole frames which are separated afterwards, and that I can promise you.


_ok,i can live with that....
player's&hardware's job_if it was just the software i'm sure there would be some kinda playa out there to play these correctly...(?)





-h>MPEG-4 handles interlacing quite a bit better than MPEG-2 did, I assure you. It just doesn't have the hardware support necessary for your MPEG-2 playback trick (yet).



_so we narrowed the problem->you mean tv-out(or GPU itself) chips don't know how to handle these streams correctly?
ok,then problem solved_waiting until mpeg4 goes mainstream!(what a long wait it'll be!)

-h>But yes, MPEG-4 has built-in flags like video-is-interlaced and top-field-first, along with a suite of coding tricks to reduce the bitrate of interlaced content. XviD already supports this, however as you may have noticed there is a bug which I still haven't had access to fix yet.

_that's nice,but completely useless without "on-die" support (which obviously isn't realised yet)...if i got all stuff correct?

however_the question was following:
S>Perhaps it isn't possible yet? To squeeze the 3.50 GB file into 700 MB, with high video quality, using 2-pass encoding, *with the interlacing intact*?

then_can't you take some quality input format(huffyuv,maybe mjpeg at "20"),capture your hi-res video&then transfer this to svcd?svcd is mpeg2 and with some luck you can get 1h into 1cd....
(capturing process is always the same:for mpeg2 or huff or mjpeg:2 fields are blended into 1 frame: you can get them separated again on playback(only with mpeg2)_digital image on disk always stays in "frame-mode")
perhaps you can reencode your mpeg2 to svcd...(with some resizing&two pass encoding_isn't "cinemacraft" encoder used for this?)




it would be the best if the capture cards could mimic the VCR's operation(completely separated fields on recording&playback)
ie. keep "field-mode" from the beginning till the end(then the player would just play the video as it was recorded:interlaced)
but it seems we're stuck on 25/30FPS....(so help us god..heheh)
i think this problem arose(hope that's the word) because of low-capabilities of early capture devices&thinking in terms of purely progressive displays
+oversimplifying problem of tv on PC-display.....(but that's just me..)





[note:i myself am not into interlaced plb on tv-out,but interlacing interests me alltogether_it's kinda complicated fun_hehe]

-h
26th August 2002, 21:10
_ok,i can live with that....
player's&hardware's job_if it was just the software i'm sure there would be some kinda playa out there to play these correctly...(?)

How are you playing your MPEG-2 content at the moment?

_so we narrowed the problem->you mean tv-out(or GPU itself) chips don't know how to handle these streams correctly?
ok,then problem solved_waiting until mpeg4 goes mainstream!(what a long wait it'll be!)

No, all you need is a TV-card that can send a 50 fps signal to a TV. Yours already does this (if it's playing interlaced MPEG-2 properly, it has to). Thus, you just need a player which will do the same thing to MPEG-4 as yours does to MPEG-2. I don't know what exactly that is though. It certainly doesn't require a hardware change.

_that's nice,but completely useless without "on-die" support (which obviously isn't realised yet)...if i got all stuff correct?

No, it's very useful, I just can't name a player that does the same trick that your MPEG-2 player does to send a proper field stream to the TV.

Perhaps it isn't possible yet? To squeeze the 3.50 GB file into 700 MB, with high video quality, using 2-pass encoding, *with the interlacing intact*?

Sure. I don't see why not, depending on the source.. also XviD will get much better at compressing interlaced content when I fix this bug and implement field-based motion estimation.

but it seems we're stuck on 25/30FPS....(so help us god..heheh)
i think this problem arose(hope that's the word) because of low-capabilities of early capture devices&thinking in terms of purely progressive displays
+oversimplifying problem of tv on PC-display.....(but that's just me..)

Actually, you can compress interlaced video better if you keep it in frame format, because you can exploit the fact that most of the time the fields complement each other (i.e. areas without movement look like they're frame-based), and then turn on interlaced coding tricks only when you actually detect interlacing artifacts. Separating the frames into a 50 fps field-based stream would mean more motion vectors and more spatial complexity for the DCT (same detail squeezed into half the pixel height).

-h

Swan
27th August 2002, 10:06
-h, thanks for responding. ^^-+I4004+-^^'s post was a mix of quotes from me and from him, so Ill try to respond to the ones that were mine. :-)

How are you playing your MPEG-2 content at the moment?

Straight via Windows Media Player 6.4, with Ligos MPEG decoding filters. They do not deinterlace. When I play Interlaced MPEG-2 via WinDVD or PowerVCR (which automatically deinterlaces), the video signal that is sent to the TV is no longer interlaced. If what I see on the computer monitor is deinterlaced, so is the output on the TV. The filters in use during playback, affects what gets sent to the TV.

No, all you need is a TV-card that can send a 50 fps signal to a TV. Yours already does this (if it's playing interlaced MPEG-2 properly, it has to). Thus, you just need a player which will do the same

Yes, it plays interlaced MPEG-2 perfectly. Am I understanding you when I summarize what you say as "video encoded with Xvid can be interlaced, but there are currently no players that can output it as a 50 fps signal to the TV"(as Media Player with Ligos MPEG-2 decoding filters does)?
So my "trick" (pausing video) wont work with Xvid, even if I encode a video with 576 in vertical resolution?

Sure. I don't see why not, depending on the source..

I'm just thinking that it'll be difficult to output one hour mpeg-2 video to 700 MB worth of good looking Xvid compressed video when one is limited to one resolution in height (576). With DivX and Xvid, normally I use GordianKnot and rarely am I able to get a good first pass compressability result if I use a higher resolution than 576 x 432. Approx. 432 of course, that value differs, but I've never set it to 576, it's not even available as an resizing option (using the resolution slider).

^^-+I4004+-^^:
then_can't you take some quality input format(huffyuv,maybe mjpeg at "20"),capture your hi-res video&then transfer this to svcd?svcd is mpeg2 and with some luck you can get 1h into 1cd....

I capture several hours of video almost every day and if I didn't use MPEG-2, but HUFFYUV, my disks would fill up in no time. I have three drives, 2 60 GB and one 80 GB and I doubt even the 80 GB one would hold one hour of HUFFYUV compressed video at 720 x 576. Just capturing a few minutes, a 3-minute music video or so, makes a file that is over 1 GB... so one hour? Nahh. :-)

I don't like the SVCD format. I think the image quality is much higher with DivX or Xvid. I just wish to keep the video field-based, interlaced. I don't have a stand-alone DVD player, I output everything from the computer. But thanks for the suggestion, I appreciate it.

/Swan

ronnylov
27th August 2002, 15:09
Perhaps if you decrease the post-processing settings in the playback filter of XVid you may get less blurring between the fields. I tried the Xvid interlaced mode once and I found that it's hard to playback the video without field order change during playback and to get a smooth playback on TV. I remember that I got better qulity when disabling post-processing and using a low resolution like 368x576.

-h
27th August 2002, 15:31
Straight via Windows Media Player 6.4, with Ligos MPEG decoding filters. They do not deinterlace. When I play Interlaced MPEG-2 via WinDVD or PowerVCR (which automatically deinterlaces), the video signal that is sent to the TV is no longer interlaced. If what I see on the computer monitor is deinterlaced, so is the output on the TV. The filters in use during playback, affects what gets sent to the TV.

That sure is weird. Perhaps there is a way to notify the DirectShow framework that a video stream is field-based, and only the Ligos filter does it? I say that because XviD can output the same video as MPEG-2, pixel for pixel, and it doesn't seem to be working for you.

And yes, here we have it: http://www.microsoft.com/Developer/PRODINFO/directx/dxm/help/ds/ref/structs/struct_VIDEOINFOHEADER2.htm

I guess XviD's dshow filter should be modified to fill these values?

So my "trick" (pausing video) wont work with Xvid, even if I encode a video with 576 in vertical resolution?

I guess not, if the dshow filter itself has to be aware of the interlacing status.

I'm just thinking that it'll be difficult to output one hour mpeg-2 video to 700 MB worth of good looking Xvid compressed video when one is limited to one resolution in height (576). With DivX and Xvid, normally I use GordianKnot and rarely am I able to get a good first pass compressability result if I use a higher resolution than 576 x 432. Approx. 432 of course, that value differs, but I've never set it to 576, it's not even available as an resizing option (using the resolution slider).

That's a bitrate of ~1500 or so isn't it? That's not too outrageous, and if it's displayed on a TV it shouldn't look too bad at all.

I capture several hours of video almost every day and if I didn't use MPEG-2, but HUFFYUV, my disks would fill up in no time. I have three drives, 2 60 GB and one 80 GB and I doubt even the 80 GB one would hold one hour of HUFFYUV compressed video at 720 x 576. Just capturing a few minutes, a 3-minute music video or so, makes a file that is over 1 GB... so one hour? Nahh. :-)

Wow. Why are you capturing at full resolution? 480x576 should be sufficient for TV input. I dare say XviD could compress that in real-time given enough CPU power, straight into interlaced mode.

Failing that, I'm working on a lossless codec that should be a tad slower than huffyuv, but have significantly better compression (well, maybe 10 or 15%).

-h

Swan
27th August 2002, 16:33
That sure is weird. Perhaps there is a way to notify the DirectShow framework that a video stream is field-based, and only the Ligos filter does it?
You know more about these things than I. I'm sure. ;-)
But I am 100% sure that the Ligos MPEG Decoding filters I have (version 3.0 and 3.5) are not capable of deinterlacing. Since I get TV-Out via the Matrox card's "Video Overlay" method, I think it makes sense that what I see is what I get, i.e if the video is deinterlaced by the DirectShow filters that are in use, then this deinterlaced video is also sent to the TV, and vice versa.
How it works on my computer is this:

If the video gets deinterlaced during playback by the filters in use: Deinterlaced video is sent to the TV.
If the video is not deinterlaced (the Ligos filters are unable to deinterlace): Interlaced video is sent to the TV.

And yes, here we have it: http://www.microsoft.com/Developer/...INFOHEADER2.htm
I'll rush right over and read it. I'm rather new to this, but it's fun learning new things and video really interests this gal. :-)

I guess not, if the dshow filter itself has to be aware of the interlacing status.
Hmm. I guess we won't know for sure until I have test coded something and keeping 576 in vertical resolution. I was clumsy enough not to do this in my initial tests (making sure 576 was the resolution). But doesn't my Ligos filters test, versus outputting the video using Intervideo's, Elecards or Cyberlinks (which all deinterlace,) prove that there's more to outputting interlaced signal to the TV than just that the video codec has built in support for it? Tha playback filter, or application, has to read it correctly too.

That's a bitrate of ~1500 or so isn't it? That's not too outrageous, and if it's displayed on a TV it shouldn't look too bad at all.
I always do a compressability test in GKnot and often, I can't get up to the Doom9 recommended 70% quality without sacrificing resolution. Very rarely can I go above 512 in horizontal resolution. Almost never on a one hour long video, only on short, 20-30 minute programs. Since I want the quality to stay close to what I get when I encode with DivX, it seems difficult to do so when I have to use a fixed vertical resolution... Resolution is one of the things I can use to play with in order to get an acceptable value in the first pass and compressability test....
What are some of the other "legal" resolutions for PAL MPEG-2 that has 576 in height? Is it only 352x576, 704x576, 720x576 and 768x576? Is 480x576 vaild for PAL?

Wow. Why are you capturing at full resolution? 480x576 should be sufficient for TV input.
Some of the stuff is priceless and I want to save it for the future. Those things I pack with Winrar and burn to 3, 4 or 5 CD's. I always use full resolution because I think it is easier to play around with material that is of great quality. If the quality is so-so to begin with, it's much harder to get pleasing results. I have the same philosophy when it comes to working with photos. It's easier to make a great-looking small jpg file if I have high-quality, high-resolution images to work with, then, when I'm done, I resize and save in a lossy format.

Failing that, I'm working on a lossless codec that should be a tad slower than huffyuv, but have significantly better compression (well, maybe 10 or 15%).
Sounds interesting! I'll keep an eye out. ;-)

Ronnylov:
Perhaps if you decrease the post-processing settings in the playback filter of XVid you may get less blurring
I will test code a file as soon as I find the time and will pay attention to your suggestions.

Thanks for all your help

/Swan

Swan
27th August 2002, 22:20
Success! :-)

I encoded a clip using Xvd at 480 x 576 and the resulting file pased my "pause-to-check-if-interlaced-test". :-)
When output to the TV, I had to use Bsplayer. It was the only program that could scale the image to 4:3. Playing the file with Windows Media Player did not work (it does not resize the 480 x 576 to a correct 4:3 aspect ratio).

I noticed two things.
1. There was a green line in the right side of the video when viewed on the TV (not on the computer monitor).

2. The video looked weird. Movements looked jumpy and sometimes the whole image "trembled" (in lack of a better word). I have never seen a video with the wrong field order, but from what I have read about it, this could very well be what is happening here. The MPEG-2 file from where the Xvid was encoded plays fine.

Is there anything I can test to verify this? Or is this a known bug in Xvid? Anything I can do?

/Swan

-h
27th August 2002, 23:31
1. There was a green line in the right side of the video when viewed on the TV (not on the computer monitor).

I have no idea what could possibly cause this :)

2. The video looked weird. Movements looked jumpy and sometimes the whole image "trembled" (in lack of a better word). I have never seen a video with the wrong field order, but from what I have read about it, this could very well be what is happening here. The MPEG-2 file from where the Xvid was encoded plays fine.

It sounds like your TV-out chip is sending fields in the wrong order. I've no idea what you can do about that. Perhaps swap the fields in an avs script before encoding with XviD?

-h

^^-+I4004+-^^
28th August 2002, 00:20
---



S>Straight via Windows Media Player 6.4, with Ligos MPEG decoding filters. They do not deinterlace. When I play Interlaced MPEG-2 via WinDVD or PowerVCR (which automatically deinterlaces), the video signal that is sent to the TV is no longer interlaced. If what I see on the computer monitor is deinterlaced, so is the output on the TV. The filters in use during playback, affects what gets sent to the TV.


_so,what is needed is a player (or a filter in between) that (knowing the hardware ie. GPU & tv-out chip) will produce fields out of xvid frames...
another thing: -h,how are things with divx311 & interlacing?any support there?(or even there all is needed is correct dshow filter?)






S>Yes, it plays interlaced MPEG-2 perfectly. Am I understanding you when I summarize what you say as "video encoded with Xvid can be interlaced, but there are currently no players that can output it as a 50 fps signal to the TV"(as Media Player with Ligos MPEG-2 decoding filters does)?
So my "trick" (pausing video) wont work with Xvid, even if I encode a video with 576 in vertical resolution?

_let me jump in here:until there's a player or playback filter you'll get the same thing as till now.....
also i would recommend you to judge picture(on tv-out) overall,not just freezed-frames.....if the moving video looks the same( on xvid as with mpeg2),then perhaps it's just that ligos handles still images differently:
if you can't see the difference between these two (mpeg2 & xvid on tv-out on 576) in normal motion video,then why bother?

let me quote you:
"When I pause an interlaced MPEG-2 clip in a high motion scene, I get the well-known combing effect on the computer monitor, but on the TV set, the picture is sort of shaking (like when you pause a regular VCR on a frame that contains two fields, taken at slightly different times)."
before this you mentioned that xvid pix have "ghosting".........

shaking on tv means videosignal isn't field-correct_this happens on older vcr's in the space between the fields(when you use frame advance function):tape is moved,but not enough for the videoheads to read complete video-trace(recorded signal) so heads read HALF of the field A & half of the field B!ie. fields are not in the phase with the spinning video-head cylinder
newer vcr's introduce a fix for this:tape is always moved in such steps so that v.head reads exactly correct&complete fields(not just half of it!)
so in newer vcr's it's more of an "GHOSTING" effect (you mentioned in xvid contest) than "SHAKING" (that you connect with mpeg2) _so perhaps GHOSTING is better than SHAKING(what looks beter it's for you to judge!)

another thing GHOSTING is different than COMBING(from your posts i presume you didn't get any of COMBING on tv-out-with xvid OR mpeg2?)









S>I capture several hours of video almost every day and if I didn't use MPEG-2, but HUFFYUV, my disks would fill up in no time. I have three drives, 2 60 GB and one 80 GB and I doubt even the 80 GB one would hold one hour of HUFFYUV compressed video at 720 x 576. Just capturing a few minutes, a 3-minute music video or so, makes a file that is over 1 GB... so one hour? Nahh. :-)


_yeap,you can hardly call huff a "compression"
at round 9MB/s(for 704x576 capturing) it sums up to round 33Gb 1 hour...
for space saving use mjpeg(at quality of "19" there aren't much artifacts & bitrate is round 3,7MB/s(source:tv,704x576_i think this resolution better captures the PAL aspect ratio than 720 or more....)


S>I don't like the SVCD format. I think the image quality is much higher with DivX or Xvid. I just wish to keep the video field-based, interlaced. I don't have a stand-alone DVD player, I output everything from the computer. But thanks for the suggestion, I appreciate it.


_yeah,your lack of dvd-player(same applies for me,and i don't intend to buy one soon...)explains it:i've heard people saying that svcd played on dvd gives better picture than xvid(or divx) on monitor or tv-out......(i myself dont know)_however i agree on NOT using svcd on PC(mpeg2 overall is bitrate eater(+ adjusted for dvd players)& i can easily live with this "unfluent" motion that happens on this A/D conversion(tv/vhs->avi->(deinterlace)divx311 or xvid(still prefer 311 though)






-h>I guess XviD's dshow filter should be modified to fill these values?

_there,there:just slight modification to xviddshow could be enough to set thing straight?that would be nice.....




S>If the video gets deinterlaced during playback by the filters in use: Deinterlaced video is sent to the TV.
If the video is not deinterlaced (the Ligos filters are unable to deinterlace): Interlaced video is sent to the TV.


_so tv-out chip gets the same signal as the monitor?that's logical.....
& deint. is done before the tv-out chip:thats also logical....





S>I'll rush right over and read it. I'm rather new to this, but it's fun learning new things and video really interests this gal. :-)

_gal?whhoohooow!(hehe)





S>Hmm. I guess we won't know for sure until I have test coded something and keeping 576 in vertical resolution. I was clumsy enough not to do this in my initial tests (making sure 576 was the resolution). But doesn't my Ligos filters test, versus outputting the video using Intervideo's, Elecards or Cyberlinks (which all deinterlace,) prove that there's more to outputting interlaced signal to the TV than just that the video codec has built in support for it? Tha playback filter, or application, has to read it correctly too.


_offcourse:we've already established that all video on disk(or medium) looks the same:there are frames and NOT fields(switches in files tell decoder what kind is it& then decoder should handle it in that manner_apparently xvid's dshow doesn't know how to differentiate or display interlaced streams)

i myself intend to do some testing soon on 704x576 res. so it won't be a problem to put that on tv-out in its pure form_i'll report if i do this........
(it would be the best to do 1clip in mpeg2&xvid versions & compare...)





S>I always do a compressability test in GKnot and often, I can't get up to the Doom9 recommended 70% quality without sacrificing resolution. Very rarely can I go above 512 in horizontal resolution. Almost never on a one hour long video, only on short, 20-30 minute programs. Since I want the quality to stay close to what I get when I encode with DivX, it seems difficult to do so when I have to use a fixed vertical resolution... Resolution is one of the things I can use to play with in order to get an acceptable value in the first pass and compressability test....
What are some of the other "legal" resolutions for PAL MPEG-2 that has 576 in height? Is it only 352x576, 704x576, 720x576 and 768x576? Is 480x576 vaild for PAL?

_my recent tests(704x576(mjpeg)->576x480(divx311,filtered(denoised)+deinterlaced(d.graft's smart smoother),Vdub 1 pass(!),SCD tab:both values to MAX...)show excellent quality with moderate bitrate (divx was set to 1400,outputed(in final video) was lil less than 1200kbits)_576x480 isn't quite full pal,but its pretty decent...

i guess 480x576 is ok for pal mpeg2(decoders/dvd players should strech that horizontal enough)





-h>Wow. Why are you capturing at full resolution? 480x576 should be sufficient for TV input.

_in my case i get LESS drop outs on 704x576 than on 352x288,352x576....
(for some really weird stuff)



S>Some of the stuff is priceless and I want to save it for the future. Those things I pack with Winrar and burn to 3, 4 or 5 CD's.

_look at this scenario:cd gets badly scratched->rar is damaged beyond repair:what'll you do?(only copy was on cdr)
i DON'T think thats good idea!{i was thinking of this in terms of my files:documents in html,txt or other form:if i rar-it,i don't have transparency(keepin catalog of all documents by merely exporting cd contents with simple dos command) AND if archive is damaged(i've heard people complaining they can't open their .rar because of errors reading cdr..)i'm loosing ALL the contents:if it's not in the archive,i get the full list of CDR contents AND if 1 file is damaged(or destroyed) the others WILL WORK!
if rar archive is damaged ALL IS LOST!-this applies to avi too:partially damaged avi's WILL PLAY_}

this is the usual on newsgroups for sending videos(rar-ing it)_but to tell you the truth i think its BAD idea( it has some justification on news groups if the files(parts) are missing you can dload PAR fill-ins & complete the file)_rar doesn't reduce the file size,just introduces the fact you have to dload ALL the parts to view video(if video isn't rar-ed i can easily import for instance 1st part of it in vdub(which repairs it,makes it viewable)_look at it & decide if i'll dload it complete_RAR just destroys this & i have to dload the whole stinking thing(off course i won't do that!)to see what is it......[although recently i dloaded some .rar video,dload was incomplete& i opened this incomplete rar with WinAce,WinRar couldn't open it!]

here is some Avery Lee's stuff on this(vdub help file)
(my experience proves this right!)

quote:

"Don't compress AVIs to ZIP, ARJ, RAR, etc.

If you can gain any significant compression (>5%) with general purpose utilities such as WinZIP and RAR, then you're not making your AVI correctly. If you can reduce the file a lot, it means either you have wasted space in your file (JUNK chunks) or your compression codecs are inefficient. Remove JUNK chunks with VirtualDub and compress the audio. There are few advantages to packing AVIs and it is a royal pain for those receiving the file.

In addition, packing an AVI file makes it impossible to view a partial download, because the file cannot be decompressed until the entire archive has been received. If the file is not packed, downloaders can play and repair the incomplete file."





S> I always use full resolution because I think it is easier to play around with material that is of great quality. If the quality is so-so to begin with, it's much harder to get pleasing results.


_only it takes much more time to code:& with vhs ripping at hi-res..huh i don't know if its worth it(for tv-rips IT IS!)




S>Thanks for all your help


_thank you for such an interesting topic.......

^^-+I4004+-^^
28th August 2002, 00:24
pt2(or 1?)_sorry for the inconvenience_

-h>How are you playing your MPEG-2 content at the moment?


_Just like Swan:Ligos filters [that is:"Ligos mpeg splitter" & "Ligos mpeg decoder") i think these were installed by MainActor software(bundled with my graphic card)-MA has mpeg2 support for editing&playing (obviously)



-h>No, all you need is a TV-card that can send a 50 fps signal to a TV. Yours already does this (if it's playing interlaced MPEG-2 properly, it has to). Thus, you just need a player which will do the same thing to MPEG-4 as yours does to MPEG-2. I don't know what exactly that is though. It certainly doesn't require a hardware change.

...I just can't name a player that does the same trick that your MPEG-2 player does to send a proper field stream to the TV.

_are you sure that thus program exists?& if not,what are you guys waiting?(hehe)




-h> .. also XviD will get much better at compressing interlaced content when I fix this bug and implement field-based motion estimation.

_don't forget the player.....(but it's ok to first be able to produce such clips&THEN to make a player that decodes them as intended because what good is a player without appropriate clips to play)





-h>Actually, you can compress interlaced video better if you keep it in frame format, because you can exploit the fact that most of the time the fields complement each other (i.e. areas without movement look like they're frame-based), and then turn on interlaced coding tricks only when you actually detect interlacing artifacts. Separating the frames into a 50 fps field-based stream would mean more motion vectors and more spatial complexity for the DCT (same detail squeezed into half the pixel height).

_you're right!

^^-+I4004+-^^
28th August 2002, 00:34
S>Success! :-)



I noticed two things.
1. There was a green line in the right side of the video when viewed on the TV (not on the computer monitor).

2. The video looked weird. Movements looked jumpy and sometimes the whole image "trembled" (in lack of a better word). I have never seen a video with the wrong field order, but from what I have read about it, this could very well be what is happening here. The MPEG-2 file from where the Xvid was encoded plays fine.

_you call this a success?why?(hehehe)
jumpy movements are typical for fast motin on deint. streams
(or am i wrong?)
i can bet you've never seen that on mpeg2 streams!

i think someone(somewhere,sometime hehe) mentioned some green line in coded video,i'll see if i can find the post on my NG....

Swan
28th August 2002, 09:40
-h:
It sounds like your TV-out chip is sending fields in the wrong order. I've no idea what you can do about that. Perhaps swap the fields in an avs script before encoding with XviD?

I think I saw an example of it somewhere in this forum. I'll give it a shot. Strange, though, that the TV-out works perfectly with the MPEG-2 and not with the Xvid version of the same file. :-)

I also checked the Forum for the green vertical line problem I got in the right vertical area of the video. Didn't see anything that looked like a solution to me; I did not use Smartdeinterlace to resize, I used Bicubic in GordianKnot. I'll have to check on how to resize in Gordian, when dealing with SVCD resolution. There isn't much in the guides about it. Any help would be appreciated.

^^-+I4004+-^^ you call this a success?why?(hehehe)

He, he, yes! It was interlaced! The green line and the weird movement in the Xvid clip can be worked out, I'm sure. I just need to find out what I have to do to avoid it.
The only reason this failed for me was that I didn't pay attention to the vertical resolution. Had I just made sure it was 576, I wouldn't have started this thread. But I learned something, so I'm glad I did. :-)
So, no special player is needed; the video is sent interlaced to the TV all right. But, since the appearance of it looks wrong (possibly a field order problem), it remains to see if it is something I can fix or if the playback filter sends it in an erroneous way to the TV.
I use the Direct Show filter installed by Xvid to play the files, by the way.

jumpy movements are typical for fast motin on deint. streams (or am i wrong?)
i can bet you've never seen that on mpeg2 streams!
No, I've never seen this phenomena on my MPEG-2 clips. But the playback of the interlaced Xvid on the TV does not display deinterlacing artifacts. I know deinterlacing when I see it. :-)
When interlaced material has been deinterlaced and output to TV, I see motion that looks unnatural. Not jumpy or anything like that, just "slow", just, unnatural. :-) It's not too bad, you can watch it, but it's not that exquisite experience that you get with an interlaced MPEG-2 clip. But the Xvid video I output looked really bad, it was not pleasant to watch. It really trembled, movement looked really-really weird.

also i would recommend you to judge picture(on tv-out) overall,not just freezed-frames.....if the moving
Sure. I can see when a video is interlaced easily. It's not that hard. But the still picture test reveals it instantly.

before this you mentioned that xvid pix have "ghosting".........
Yes, because I hadn't made sure the encoded clip had the correct resolution. It was an error on my part.
So, if you encode interlaced material with a height smaller than 576, you're going to get a video that looks badly deinterlaced. It has to have 576 in height, otherwise it won't be interlaced any more. I was really sloppy not to think about that fact. :-)

yeap,you can hardly call huff a "compression"
It's been a while since I used it, but as I recall, files that I captured with HuffYUV compression where smaller in file size than those I captured totally Uncompressed. I think a music video was 4 gigs uncompressed and about 1.3 with HuffYUV.

for space saving use mjpeg(at quality of "19" there aren't much artifacts & bitrate is round 3,7MB/s
I don't like MJPEG either. :-)
The stuff I've captured with it (I tested it a few times) did not appeal to me. Why is everyone so against MPEG-2? Seriously, I've never seen anything that looks better. Since I started capturing in MPEG-2, I've not used the VHS VCR again. The quality is just stunning! When you watch a captured clip on TV, the quality is so good that you hardly notice that the video is captured and you're not watching something live. I promise, the quality is *that* good! I am blown away by it. ;-)
I just need to find a way to save it, or compress the stuff I care less about, or wish to share with someone who also wishes to see it on their TV, into a format that keeps image quality and interlacing. Now, it's just down to experimenting with Xvid, I guess.:-)

so tv-out chip gets the same signal as the monitor?that's logical.....
Yes. That's how it works for me.

manner_apparently xvid's dshow doesn't know how to differentiate or display interlaced streams)
It does, but the question is why it looks so strange on my TV. I really need to find the time to experiment some more tonight. :-)
Why don't you give it a shot too, ^^-+I4004+-^^ ? I could use some help here..:-)

look at this scenario:cd gets badly scratched->rar is damaged beyond repair:what'll you do?(only copy was on cdr)
True, true. But a VHS tape can get lost or damaged too.

If you can gain any significant compression (>5%) with general purpose utilities such as WinZIP and
I'm not using Winrar's compression at all. It is pointless, as you stated here, the files are already compressed. It's like putting jpeg's in a zip file, it doesn't make sense, other than as a way to group a series of images together in order to send them to someone. I use Winrar's Store setting (which doesn't compress) which chunks the MPEG-file into nice pieces that I can put on CD's. I also use the Recovery Record setting. I then create a SFV file to create a check sum file. After that, I unpack the stuff to the HD, to see that it really works. Then, I burn it to CD, using a safe, low speed and turning Data Verification on in Nero.

How else can you burn a 3-4 gig file on CD-R? You have to chop them up and in the safest manner possible, be able to put them together again.
Yes, I will buy a DVD burner, when the standard is 100% set and the discs cost less. :-D

only it takes much more time to code:& with vhs ripping at hi-res..huh i don't know if its worth it(for tv-rips IT IS!)
I believe in the saying "sh*t in, sh*it out". I believe in good raw material, whatever situation we're talking about, I always want good raw material. :-)

/Swan

int 21h
28th August 2002, 12:50
Uhm. AVI is a frame based format. To support truly interlaced video... correctly, you need a field based format.

AFAIK.

^^-+I4004+-^^
29th August 2002, 00:41
S>I also checked the Forum for the green vertical line problem I got in the right vertical area of the video. Didn't see anything that looked like a solution to me; I did not use Smartdeinterlace to resize, I used Bicubic in GordianKnot. I'll have to check on how to resize in Gordian, when dealing with SVCD resolution. There isn't much in the guides about it. Any help would be appreciated.


_i've looked for "line" problem but it turned out that guy in my NG had different kind of line....


S>He, he, yes! It was interlaced! The green line and the weird movement in the Xvid clip can be worked out, I'm sure. I just need to find out what I have to do to avoid it.

_in my case the tv-out slows down the whole system(pretty hard)_so on bigger res.my cel600 has problems in playback...
[update]this was due to the fact that my original graphic card drivers send picture to monitor&tv-out simultaneously...and that's BAD!


S>So, no special player is needed; the video is sent interlaced to the TV all right. But, since the appearance of it looks wrong (possibly a field order problem), it remains to see if it is something I can fix or if the playback filter sends it in an erroneous way to the TV.


_your sentence is contadictory:video ISN'T sent to "tv all right" if the plb filter sends it in erroneous way!

S>I use the Direct Show filter installed by Xvid to play the files, by the way.

_my filter is xvid's [21.5.2002]



S>I don't like MJPEG either. :-)
The stuff I've captured with it (I tested it a few times) did not appeal to me. Why is everyone so against MPEG-2?


_can you send few vidcaps so we can see the sharpness of the picture?
i think it won't do well with the noise in video....
(mpeg2 is after all a final codec,not intermediate one..)

btw. what hardware do you use for capturing?(cpu,capture card...?)


S>It does, but the question is why it looks so strange on my TV. I really need to find the time to experiment some more tonight. :-)
Why don't you give it a shot too, ^^-+I4004+-^^ ? I could use some help here..:-)


_ok,i tried this(plb of interlaced xvid on tv-out(i have bt chip for tv-out))
res. was 704x576 & it looked just like on monitor(only lil worse cause of tv-out's lesser resolution)
interlace,combing everywhere........
[update]ok,i have to correct this:this was due to the fact i tried it with original graph.card's tv-out drivers.....&they don't even support resolution of 720x576(!)
when i tried with "tvtool"(at 720x576) things changed drastically!!
xvid showed NO INTERLACING(no combing) on tv-out(the same xvid that combs on monitor)_
so Swan you were right!IT DOES WORK WITH XVID_
now i'll try mpeg2(interlaced) stream& if that goes well i won't mention it....(only problems are interesting....heheh)






S>I use Winrar's Store setting (which doesn't compress) which chunks the MPEG-file into nice pieces that I can put on CD's. I also use the Recovery Record setting.

_archive can be damaged beyond recovery also if you used RR....
you can split mpeg with a number of programs....(i can't name any of them cause i'm not into mpeg myself)
you're just wasting space on RR.....


S>How else can you burn a 3-4 gig file on CD-R? You have to chop them up and in the safest manner possible, be able to put them together again.

_mpeg has pretty good protection on it's own,&you CAN?T damage your cd enough so that whole mpeg is lost(for instance when you dload partial mpeg streams from net,they play fine_unlike avi....)
the risk of damage is much greater if you put it into archive(although at first glance it seems different)
it doesn't matter you don't use compression,its still in archive& archive is one file(damage to 1 chunk destroys whole):mpeg video can be viewed as series of images& if 50 frames are missing rest is good.......

lately i came to think of archives as a good stuff for compressing text thats to be sent via modem.....nothing more.....nothing less.....
(if you record cdr's in "mode1" way then you have nothing to worry_mpeg is so protected that vcd's & svcd's are recorded in mode2(without ecc for cdr)& work fine....)

i think converting video to rar(for any purpose) is useless overkill

Swan
30th August 2002, 15:59
This is getting a bit off topic, but I'll reply anyway as some you had some questions, ^^-+I4004+-^^, and I have some for you.

_your sentence is contadictory:video ISN'T sent to "tv all right" if the plb filter sends it in erroneous way!
Perhaps you misunderstood. What I meant was that an interlaced signal is sent to the TV. But there remains a problem with the field order, or the playback filter.

_can you send few vidcaps so we can see the sharpness of the picture?
If you have an ftp, sure!

btw. what hardware do you use for capturing?(cpu,capture card...?)
Athlon XP 1900+, 768 MB DDRAM, Aver TV Studio.

xvid showed NO INTERLACING(no combing) on tv-out(the same xvid that combs on monitor)_
Did you have a green line in the right vertical area?
Did motion look OK or like the field order was wrong?

_archive can be damaged beyond recovery also if you used RR.... you can split mpeg with a number of programs....(i can't name any of them cause i'm not into mpeg myself)
you're just wasting space on RR.....

Sure, but a VHS tape can break too (tape salad, etcetera). :-)
An MPEG-file chopped up in smaller MPEG files and burned to CD can also be corrupted by buffer underruns, other write errors, etc.
I am *not* using WinRAR to *compress* the 3,4 0r 5 gigabyte large MPEG-file, just as a mean of splitting it into pieces that'll fit on 700 MB CD's. And since I am careful and take all precautions (sfv, test-unpack, burn at slow speed, use good media and verify the CD before deleting the original files), I have yet to fail in unpacking one of my MPEG-files.

Sure, I could split the MPEG with TMPGEnc, M2-edit or MPEG-VCR into 700 MB chunks, burn to CD and then put back together when I want to watch it. I think this is what you're trying to tell me is a better method. But that is not a good solution at all, in my opinion.
If you've ever tried to piece together video files you'll know about all the problems that arise with audio/video going out of sync, etc. Also, MPEG-2 isn't a format that was created with editing in mind, it's a distribution format. That's why there are so few programs on the market to perform editing tasks on MPEG-files.
The 5 gigabyte MPEG has to be split, if it is to be burned on regular CD's. In my knowledge there are only two ways of doing it and the method I use is the only one that makes any sense.

/Swan

^^-+I4004+-^^
30th August 2002, 21:58
S>This is getting a bit off topic, but I'll reply anyway as some you had some questions, ^^-+I4004+-^^, and I have some for you.

_one topic leads to another.....purely human......



S>[screenshots?]If you have an ftp, sure!

_i'll send some pix here,i guess you can too....


S>Did you have a green line in the right vertical area?
Did motion look OK or like the field order was wrong?

_no green line,picture is ok!motion problems do not correspond to wrong field order--->i'm sending you vidcaps of wrong field order(i guess that's on topic?hehehe)&right field order_(although you can see for yourself: in vdub capture there's function "swap fields"_)
i did not had motion problems either...
(ie.wrong field order(swapped fields) avi has normal motion just as correct one!_only it looks like its lackin every other line)


S>If you've ever tried to piece together video files you'll know about all the problems that arise with audio/video going out of sync, etc.

_yes:divx goes off-sync during merge with vdub,but there's aviutil to fix that!(hehe)


S>Also, MPEG-2 isn't a format that was created with editing in mind, it's a distribution format. That's why there are so few programs on the market to perform editing tasks on MPEG-files.
The 5 gigabyte MPEG has to be split, if it is to be burned on regular CD's. In my knowledge there are only two ways of doing it and the method I use is the only one that makes any sense.

_ok,i'll take your word for it!
(as i've said mpeg2:NOT my domain)

i would just like to mention the problem i got with MA exporting mpeg2 stream:somehow,this program's timeline dimensions have to be set to proper resolution to export fine:i did this & got working mpeg2 interl. streams(they too work fine on tv-out....i know i've said i won't mention good things,but when i'm here.......hehe)


as i can remember you've said you use gknot to make xvid?why bother:use just vdub/asynth[mpeg2dec.dll] & xvid.....
anyway try different method of encoding to fix the green line problem...

Owen
31st August 2002, 02:27
This discussions been good fun.
You may like to take a look at my posts in the Capture Forum.

http://forum.doom9.org/showthread.php?threadid=31172&perpage=20&pagenumber=2

No one has mentioned the source of the video.

25fps Film converted to PAL or NTSC.
Or source from a video camera like news or other tv programs.
And last NTSC video converted to PAL or PAL to NTSC

All three are different.

It is my understanding that for film (24fps) transferred to PAL, the film is played slightly fast at 25fps to match the PAL standard.
Each frame of film is then converted to 2 fields, or 50 fields per second.
But both fields are of the same FRAME of film and are therefore not time shifted.
Both fields are almost identical and cannot produce nasty jagged edges on moving scenes.
Film to NTSC conversion is much more complex and I won’t go into that here.

Now for source from video cameras things are Very different.
For PAL, FIELDS are recorded at 50 per second. (60 NTSC)
The Fields are then combined to make FRAMES at a rate of 25fps. (60 NTSC)
Think of this as 50 half resolution frames per second. (60 for NTSC)
Each field was recorded 1/50 of a second apart, so that if the subject being recorded moves between fields the fields will be different.
The worst case is for fast horizontal movement, where each field will contain Very different information, so that when the fields are combined into FRAMES, vertical lines in the picture look stepped or jagged because they are time shifted.

PAL DVD movies made from film masters should not need deinterlacing if played back on a TV or on a computer monitor running at 50Hz refresh rate.
100Hz should work even better, e.g. no flicker.
Any other monitor refresh rate e.g. 75Hz should cause problems.


Now a word on TV out.

I have used many video cards with Crontel CH700x TV out chips and have found that even though TV output resolution is set to PAL 768-576 with TVTool and recorded video is played back at 768-576 in Zoom Player, that interlacing artifacts still occur on some, but not all program material due to reasons outlined above.
It also seems that this chip is unable to reproduce the interlaceing accurately.

I have now upgraded to video card using the new Conexant CX25871 series TV out chip, used on must Geforece 3 cards.
This chip used with TVtool gives perfect interlaced output and programs that I have captured before using DIVX and Xvid and wanted to deinterlace so that they would playback properly now play perfectly.

So for me the TV out was the problem.
DVD’s always played fine though the old TV out.

So now I capture with BT8x8 chip TV card Svideo input and the wonderful Xvid codec at 720-576 1pass Quant 2 and play back to my Toshiba rear projector TV over Svideo cable with full DVD quality and no interlace problems.

See my other posts for more info.

Have fun and keep on capturing - testing.

Regards,

Owen.


P.S. Why do so many people want to ruin there video by resizing or over compressing just so they can copy them to CD's ?
Hard disks are so big, cheap, convenient, reliable until 50-100Gig removable media becomes available / cheap.
Just a thought.
:D

^^-+I4004+-^^
31st August 2002, 06:15
>No one has mentioned the source of the video.

didn't matter!it was understood we talk of pal 25fps capturings
(or is it that you just want to enlighten us with your exquisit
interlace knowledge?hehe)

we were talkin about interlaced/or not plb on tv-out of xvid/mpeg2
so your part on the tv-chips comes in handy
i've got bt869(conexant is new name for bt)and it sends nice interlaced tv-signal.......
(theres more info on tvtool website on chips&tvtool program.....
seems conexant/bt is a way to go.....)

Swan
31st August 2002, 15:54
No one has mentioned the source of the video
The source is material captured from TV. I personally capture many music videos from VH1. The file I tested Xvid encoding on and then output to the TV with was George Michael's "Shoot The Dog". :-)


I have now upgraded to video card using the new Conexant CX25871 series TV out chip, used on must Geforece 3 cards.
Owen, thanks for the interesting info. Are Matrox cards the only consumer cards on the market that use the video overlay to output signal to the TV the way it does?

Have fun and keep on capturing - testing
Ha, ha. Seems that's all I do these days. Today I'm struggling with getting Ulead Video Studio 6 (the only software, apart from Media Studio and DVD Workshop, I know of that can capture interlaced MPEG-2) to understand that my card can capture in other color spaces than RGB24. With the original drivers from Avermedia, YUY2 is available in the color space drop-down box in Video Studio's configuration, but since I switched to btwincap, all I can select is RGB24. I know that's a waste, so I want to enable YUY2. I just wonder if it’s the driver or Ulead's software that's to blame. YUY2 is available in AMCap, so I'm leaning towards blaming Ulead. :-)

P.S. Why do so many people want to ruin there video by resizing or over compressing just so they can copy them to CD's ?
I want to be able to share my files with friends, so size matters. Also, some shows are fun to save, but not fun enough that I want to sacrifice 5 CD's on it. I also capture a LOT of stuff, several gigs a week. A hard drive would fill up in a month. :-) I already have three drives; one is dedicated to video, photos, etc. The second drive is for music files and C I never use for anything valuable (just software and the OS of course). :-) I will buy a DVD burner as soon as everything is worked out as far as standards are concerned and the discs become affordable, that's for sure.

^^-+I4004+-^^
_i'll send some pix here,i guess you can too....
I can't take a screenshot of the TV screen. :-) What I see on the TV is not what I see on the computer monitor. On the monitor, I get regular combing, on the TV, a different, weird looking image. :-)

vidcaps of wrong field order(i guess that's on topic?hehehe)&right field order_(although you can see for yourself: in vdub capture there's function "swap fields"_)
Yes. But the "weirdness" is only on the TV. It looks like ordinary interlaced stuff on the computer monitor. But when I have more time, I'll try to locate the avisynth arguments to swap the fields and do some more testing.

would just like to mention the problem i got with MA exporting mpeg2 stream:somehow,this program's
What is MA? I didn't get that..

as i can remember you've said you use gknot to make xvid?why bother:use just vdub/asynth
I used GordianKnot to crop the video and to get a good Aspect Ratio and a proper bit rate suggestion for the quality and file size I was after. After that, I selected "Save" and clicked the SVCD resolution box and saved the avs-file. I loaded it into Virtualdub and encoded with the bit rate suggested by GordianKnot. Is there a better method/software of cropping and resizing with good AR for SVCD resolution? I am a bit worried that Gordian Knot's resolution slider played a part in how the video was resized, even though I used "SVCD Resolution".

/Swan

Owen
1st September 2002, 04:25
Sorry I rambled on about source material.
I read the full thread and can see that you know this stuff already.
I only mentioned the source because it gave me much grief.
Some things encoded with Xvid or Divx played fine on the TV and others did not.
The interlace setting in Xvid dose not seem to make a differance.
I even found that some things played best when I output to TV in NTSC.(Multi standard TV)
Remember I capture in PAL.
Hows that for strange!
Since I upgraded to the new video card with CX25871 TV chip everything now plays perfectly.
Im a very happy camper.

Swan.

The Matrox cards are different to most other types.
They can have two independent output DACs (Digital to Analogue Converters)and can output to monitor and TV with different resolutions simultaneously.
Others usually output the PC desktop only, and you play video in a window or full screen at the desktop resolution.
It is likely that the Matrox card is creating an overlay of 800-600 or some other PC standard desktop resolution. And then converting that to a standard PAL 768-576 for output to the TV.
This will cause problems with SOME source material due to the internal conversion.
Mainly with American NTSC mastered source.
It is VERY important that your videos are xxx-576 or xxx-288 and that your TV out is 768-576 WITHOUT any vertical scaling by the video card.
I think this was mentioned before by avih.
If you play a non 4/3 video like 704-576 res file does it play full screen 4 by 3 on TV ?
If so, your player is obviously scaling.
Zoom player is great for scaling horizontal size to anything needed.
I play 720-576 Xvids at 768-576 with no problems.
Dont know if you can control output scaling with the Matrox in overlay mode.
Can you output the desktop to TV and play video in a window?
If you can, you should find Zoom player works great.
You will need to set desktop res to 768-576 and make a preset in Zoom player for a centered 768-576 picture.
Its great for DVD playback as well.
You can scale picture to remove overscan or whatever you like.

Is your capture card based on the BT8xx chip if so I recommend that you try the drivers from here.

http://btwincap.sourceforge.net/

They give you control over the sharpness filter in the BT8xx and allow a much sharper image than with most other drivers which leave sharpness at a low default value.
It may fix your YUV2 problem as well.


As for you success with capturing to Mpeg2
What encoding codec are you using for Mpeg2.
I’m very interested to know as I’m a quality junky.
I mainly capture music video like you, for playback direct to TV.
I have never seen a Mpeg2 codec that could capture anywhere near the quality of Xvid for full res. PAL ?

For the people who dislike Mjpeg (and I was one) all I can say is that you haven’t seen a good one.
I’ve used Miro DC10 and DC30 hardware Mjpeg cards and the quality is outstanding.The best I have seen, and the choice of pros.

As for software codecs the Morgan Mjpeg codec Version 3 is near as good as the Miro cards (limited by BT8xx capture card)and much better than the Picvideo codec.
This codec fully supports interlaceing and I think it can do field swap on capture or playback.
That could be usefull for you.

Regards.

Owen

Yusaku
1st September 2002, 08:27
Ad matrox overlay: nope, Matrox cards use really native NTSC/PAL resolutions for TV-OUT using DVDMax; or a lower ones if the video source is smaller. So as long as you have correct number of lines in source file (480/576) and you're lucky with field order, it'll play fine.

BTW: AFAIK matroxes are the only cards, that can hassle-free, out-of-the-box output fully interlaced DVDs to TV-Out. Not to mention that you can minimize the DVD player and continue to work on something else on the computer while playing files :)

Swan
1st September 2002, 11:28
Yusaku: AFAIK matroxes are the only cards, that can hassle-free, out-of-the-box output fully interlaced DVDs to TV-Out. Not to mention that you can minimize the DVD player and continue to work on something else on the computer while playing files
I'm pleased with it.:)
It has a few issues, of course, but I've found workarounds for most of them. I would not say the Matrox G450 eTV I have was hassle free to use, though. Certainly did not work out-of-the-box. It took a couple of driver updates and bios updates for it to work as advertised. Plus, getting to know it and getting around its peculiar bugs.:)

in source file (480/576) and you're lucky with field order, it'll play fine.
I know I selected Field Order A when I captured the MPEG-2, and it played fine on the TV. I did not change anything when I encoded it to Xvid, so I assume the field order was untouched. It's strange then, that the Xvid clip looked so strange on the TV.

If you play a non 4/3 video like 704-576 res file does it play full screen 4 by 3 on TV ?
To my eyes, a captured 720x576 clip looks exactly the same when I output it to the TV (has the same aspect ratio, same amount of overscan) as when I watched the video playing on the TV while capturing. The player is not doing any scaling, Media Player 6.4 does not handle Aspect Ratio and scaling, right? The George Michael clip looked the same on the TV, whether as an MPEG or XVid (same proportions, same AR).

Can you output the desktop to TV and play video in a window?
Yes, if I enable "dual head clone", I think it is called. That is; I can output my Windows desktop to the TV. If I then play a video, it will of course show on the TV. If I use that method, I will have to maximize the video playing software's view to full screen. This method does not work well, though. Video playback is nowhere as smooth as with the normal TV-out with DVDMax. I much prefer the DVDMax feature.

Is your capture card based on the BT8xx chip if so I recommend that you try the drivers from here.
Indeed, it is and I have been using BTWincap drivers since a few months time now. With the original drivers, I could not capture in full resolution (avi-format), only MPEG. Yesterday I made custom card profile for my card, since the BTSpy utility is now available for Windows 2000. :-)

What encoding codec are you using for Mpeg2.
Let's see.. I have tried Cyberlink's PowerVCR. It has the best scheduler and is very reliable all together. Never hangs or acts strange. Sadly, it records deinterlaced. Although I've managed to tweak a setting in the registry to make it capture interlaced, the file won't be recognized as interlaced by any software. I think if a file is flagged as Interlaced or Progressive is set in the MPEG sequence header and PowerVCR obviously doesn't do that. I have not found a utility to let me change it either. Perhaps it isn't feasible. But the clips play fine on the TV, interlaced. The quality of PowerVCR's recordings are good, but I wish there was a "capture interlaced option" available. The encoding filters are from Cyberlink.
One strange thing is that it is supposed to use Constant Bit Rate but seems to use Variable Bitrate. And the video bitrate I set is not the bit rate I get. If I set 8000, I get 6000, etc. Perhaps that's just in my machine, with my card, I don't know. It's odd.

I've tried WinDVR, but not used it as much as PowerVCR. It does not have an option for interlaced capturing either and I have not found a method to make it stop deinterlacing. The image quality it produces is good too. The encoding filters are from Intervideo.

The highest quality I have achieved is with Ulead's VideoStudio. It used Ligos filters in the past, but this changed with the latest version (or patch). In GraphEdit, they are listed as "ULead MPEG Encoder". Media Studio and DVD Workshop from the same company use the same configuration boxes for the MPEG-settings, so I think they use the same filters. The higher quality can be attributed to the fact that these titles allow you to capture interlaced. I am on the lookout for other softwares that let me do that because I'm having problems with them and the BtwinCap drivers. I cannot select any other Color Space than RGB24 and I can't find where VideoStudio stores these settings. I searched the registry, but found nothing. The author of Btwincap says it should work too. Any help with this would really be appreciated!

I have never seen a Mpeg2 codec that could capture anywhere near the quality of Xvid for full res.
The quality of the MPEG clips depend on a lot of things. It's important to set them up right. The video and audio bitrate, motion estimation, whether to use p and b frames, etcetera, all these things greatly affect the image quality.
I'd like to test capturing with Xvid. If you like, and have the time, please give me a few suggestions on settings and I'll give it a shot.
I've been sceptical towards using DivX or Xvid for capturing as I thought that in order to get the very best of them, one needed to use 2-pass encoding. I mean, that Xvid performs the best in 2-pass encoding situations. Perhaps the 1-pass quality is the mode you use? And set it to a high bitrate?

For the people who dislike Mjpeg (and I was one) all I can say is that you haven’t seen a good one.
That's very possible. I only did a few tests with Morgan's codec version 3, I think.
I'd like to stick with MPEG-2, though. I really like the quality (I'm a quality junkie too) and I'm getting the hang of how to get the best out of it. But I appreciate your suggestions.
:)

/Swan

Chibi Jasmin
1st September 2002, 15:46
Originally posted by Yusaku
BTW: AFAIK matroxes are the only cards, that can hassle-free, out-of-the-box output fully interlaced DVDs to TV-Out. Not to mention that you can minimize the DVD player and continue to work on something else on the computer while playing files :)

Well, you know any MPEG2-DShow-Decoder that does not deinterlace or some way to stop Cyberlink or Intervideo ones from deinterlacing?

Swan
1st September 2002, 18:58
Originally posted by Chibi Jasmin


Well, you know any MPEG2-DShow-Decoder that does not deinterlace or some way to stop Cyberlink or Intervideo ones from deinterlacing?

Yes! Use Ligos MPEG decoding filters. Version 3.0 and 3.5 do not deinterlace. It's the ones I use.

Also, I just came to think that it may be an idea to rename the deinterlacing filters from Intervideo and Cyberlink to .bak. I'll try this myself. :-)
Graphedit reveals a few suspects... Sadly though, I suspect the deinterlacing function is built into the MPEG decoding filters, not a separate filter. :-(

/Swan

Chibi Jasmin
1st September 2002, 19:33
Where can I get the Ligos filters, please? I will happily try them...hope they will work in a chain with css-encrypted dvds...someone recommended the elecard filters a while ago, but mentioned they don't work with css-encr. dvds...and in fact, unregistering ivivideo.ax and registering the elecard filter didn't work...well, I will try the ligos ones then...

btw: the deinterlacing really seems to be build into the filter...but in case of intervideo it can be configured via registry to bob or weave...just not deactivated...

UPDATE: Well, on www.100fps.com weave is called doing nothing to the frame...not sure, if this is really true for intervideo, but you also said, it does not deinterlace further up in the discussion...if it works, it should leave you with the original interlaced frame and playback at 25 fps...I know, this is not what you want, but as far as my experiments go, outputting 25 fps truly interlaced video with right field order etc. leads to fluid motion on tv. When I been playing with tv captures, 25 fps video with two fields per frame (true interlace, where each field is different point in time) worked fine on tv. I personally see no need in outputting 50 fps field based video...

I will try the weave function of windvd again now...

Zhnujm
1st September 2002, 20:30
you can force both windvd and powerdvd to use the weave option. no deinterlacing is then done. thats what its made for - to recreate a full frame out of 2 fields, when the 2 fields came from a progressive source.
any deinterlacing would be stupid in such a case.

Chibi Jasmin
1st September 2002, 21:09
Yeah, just got that far, too...the WinDVD Weave option works fine for displaying my interlaced content (mostly extra stuff on dvds...) on tv...great!

Thanx...I won't disturb the ongoing discussion then anymore...but I am still curious what the point is in sending interlaced material as 50 fps field based to the tv...

My interlaced content here 25 fps frame based (with two fields different point in time -> 50 fps field based) works fine, when sent as 25 fps interlaced frames to the tv (using Matrox card btw).

I understand it like this. TV updates it's picture every 1/50 second...it get's a new frame every 2/50 (1/25) second, so it has exactly the time to draw both fields from every frame you sent it. And if field order etc. is correct in the frame based interlaced stream, everything is fine...at least it worked for me...when I been capturing from tv this was the way it worked fine...I verified this with very critical content (newstickers scrolling from right to left), where I could see every field order/interlacing etc. problem...

I'd say, just keep the video 25 fps frame based with two fields per frame and encode it with an interlace option like the one from xvid (treat it as fields and encode every second line, first odd then even or something like that).

I don't think there really is a hardware, also not the matrox card with your mpeg-2 content, that sends 50fps field based. I think it sends exactly what I say 25 fps with two fields per frame...because that is what you see on monitor and matrox outputs exactly that...

...well, still doesn't solve the problem...why don't your encodes work!? They should work...without any 50 fps tricks...sometimes you have to change field order or shift the image one row up or down on playback, but this shouldn't be necessary, if you just encode the working mpeg-2 without modifications...good luck in further research...I just wanted to share my experience...

Swan
1st September 2002, 23:09
Chibi Jasmin: Yeah, just got that far, too...the WinDVD Weave option works fine for displaying my interlaced content (mostly extra stuff on dvds...) on tv...great!

Thanks for the suggestion, Zhnujm, and for trying it, Chibi. I'll try this on my DVD's too.

Thanx...I won't disturb the ongoing discussion then anymore...but I am still curious what the point is in sending interlaced material as 50 fps field based to the tv...
Please, don't feel like your're disturbing. I appreciate your input.
I have not said I wanted to output 50 fps field, have I? :-)
I just wish to output interlaced Xvid, like I output my MPEG-2 files.
I do not see 50 fps field based (splitting each field into 2 frames, effectively reducing the resolution in half) as an option at all.

I'd say, just keep the video 25 fps frame based with two fields per frame and encode it with an interlace option like the one from xvid (treat it as fields and encode every second line, first odd then even or something like that).
I selected Interlaced in the XVid options and I did not add any deinterlacing filter or filter that changed the field order. The strange thing is why it didn't work. If the MPEG-2 file played interlaced on the TV, how come the interlaced Xvid file created from the MPEG-2 did not? I did not modify it, other than resize it to 480x576 and encode it to Xvid. It was clearly sent interlaced on the TV, yet the motion looked strange. It puzzles me!
Perhaps I did something wrong in the resizing process?
If anyone's got any suggestions on how to write an avs file for svcd resolution and a software for calculating cropping and AR, please let me know. Perhaps GordianKnot is not suited for it?


I don't think there really is a hardware, also not the matrox card with your mpeg-2 content, that sends 50fps field based. I think it sends exactly what I say 25 fps with two fields per frame...because that is

I think so too.

sometimes you have to change field order or shift the image one row up or down on playback, but this shouldn't be necessary, if you just encode the working mpeg-2 without
Please tell me how I do that on playback, Chibi?

/swan

avih
2nd September 2002, 04:04
@swan:

can u try pls with avisynth:

clip.bob
or
clip.complementparity.bob
(and let us know which worked smooth)
on your xvid clip.
play the avs file with wmp or zoomplayer or whatever.

if you have a low cpu/resuolution ratio or your cpu is at 100% all the time, then you could try replacing the bob function(s) with bob(0.3,0.3,clip.height/2) which will resize vertically by half.

does it look smooth? (you can try this both with tv out and/or monitor, they should both be smooth).

also, if you have ffdshow installed, and one of the resizing options is enabled, then you're lost. resizing kills interlaced content (unless it's a interlace-aware-resizing, which i've seen only in specialized filters but afaik, NOT in ffdshow). also, if you have any other resize filter in your dshow filters chain (divxg400 or bicubicresize or others), that's prob what screwing you. (try with graphedit to see if there are any hidden filters in your chain).

cheers
avi

Chibi Jasmin
2nd September 2002, 06:31
Originally posted by Swan

Thanks for the suggestion, Zhnujm, and for trying it, Chibi. I'll try this on my DVD's too.


Please, don't feel like your're disturbing. I appreciate your input.
I have not said I wanted to output 50 fps field, have I? :-)
I just wish to output interlaced Xvid, like I output my MPEG-2 files.
I do not see 50 fps field based (splitting each field into 2 frames, effectively reducing the resolution in half) as an option at all.


I selected Interlaced in the XVid options and I did not add any deinterlacing filter or filter that changed the field order. The strange thing is why it didn't work. If the MPEG-2 file played interlaced on the TV, how come the interlaced Xvid file created from the MPEG-2 did not? I did not modify it, other than resize it to 480x576 and encode it to Xvid. It was clearly sent interlaced on the TV, yet the motion looked strange. It puzzles me!
Perhaps I did something wrong in the resizing process?
If anyone's got any suggestions on how to write an avs file for svcd resolution and a software for calculating cropping and AR, please let me know. Perhaps GordianKnot is not suited for it?




I think so too.


Please tell me how I do that on playback, Chibi?

/swan

Well, I played with this a while ago, so I don't remember every step I took exactly...first, you have to get the field order right...there is a picture in the thread about incorrect field order...as your mpeg2-content works, I assume you have it right...let's take a next step...compare one frame from your encoded video with the original video...should be the same (except some quality loss) concerning the placement of interlaced lines...then play with some DShow based player? The trick is to get the output match the PAL TV exactly...normally this should be no problem with matrox cards, if the clip is 720x576 and card is configured for pal tv, if the mpeg2 worked...but maybe the player somehow screws something...the only thing I can suggest is to kick DivXG400 into the chain and try it's 'shift image by one row' option...this shifts the image by one field, this helped in some cases...I don't remember anymore at the moment, I'm afraid...sorry...

Another thing to try is to do the same thing, but just encode to DivX3 or 5 just for reference...these codecs don't have any special interlace option, but if you keep quality high enough, it should be suited for testing, if they screw up on playback also...

Hope this helps...good luck...

Ah yeah, and don't use DivXG400's overscan compensation option or some other video manipulating filter while testing...

Owen
2nd September 2002, 13:35
Swan,

Did you say that your Xvid test file was made from an Mpeg2 Capture?
It would be a much better test to capture direct to Xvid.
I suggest 720-576 YUV2
Xvid set to 1pass Quant. Mode.
Set Quant. to 2
Select Interlace mode (just for fun)
Set motion search as high as you can without frame drops.
I use HIGH on a P4 2.1Gig WinXP
All other setting to default.

For capture I use FlyDS
http://asvzzz.narod.ru/

or Virtual VCR (freeware)
http://www.digtv.ws/

Hopefully one of the above will let you capture YUV2.
They both work for me.

These setting gives a data rate of around 3.5-4Gig per hour with uncompressed audio.

How dose that compare to your Mpeg2 captures ?

Quality is as good as original, limitted only by BT8x8 cature card with 8bit ADCs.

Cant wait for the new Conexant 10bit TV cards to become available.


I will reinstall PowerVCR and test.
This is going to be interesting.


Regards,

Owen.

P.S. If I capture in RGB24 I get a very dark picture and have to adjust capture driver settings to compensate.

Swan
2nd September 2002, 14:26
Now, here are the results of my tests.
This was the procedure I used this time:
1. Create d2v project from interlaced MPEG-2 file (George Michael music video, 720x576 in size)
2. Create avs script, by hand, NOT using Gordian Knot.
3. The script contained two lines:
LoadPlugin("c:\program files\gordianknot\mpeg2dec.dll")
MPEG2Source("george.d2v")
Note that I did not use any arguments to crop or resize.
This clip played interlaced, perfectly smooth on the TV, using Media Player 6.4 and had the correct 4:3 AR! I used the Xvid playback filters (not ffdshow) and I did not load any additional filters. I did not see a green line this time (if there was one, it was in the overscan area, which doesn't matter anyway). :-)

I suspected the cropping I did in Gordian Knot to remove the black bars was the suspect. When I capture I get black areas around the bottom and left hand side in the clips (my card captures more than the overscan area). When encoding to DivX, I always remove these black areas, as using up bits on them is a waste. But, this is a no-no when encoding to interlaced Xvid! I wonder if you guys crop out the black on your captures that you Xvid-encode? If so, how do you do it and make sure you maintain the aspect ratio? If you've encoded to DivX using GordianKnot you know what a great resize/crop tool it is.

My next test was taking the same d2v file and changing the avs script to:
LoadPlugin("c:\program files\gordianknot\mpeg2dec.dll")
MPEG2Source("george.d2v")
BicubicResize(480,576,0,0.75)
This clip looked stretched (of course) when output with Media Player, so I had to use Bsplayer and set it to 4:3 for the image to be scaled correctly on the TV. This clip too, played perfectly and was interlaced!

So, there was never anything wrong with the Field Order. It was wrong to resize and crop the clip using GordianKnot! Or perhaps I used it the wrong way.
This brings me to an interesting conclusion: it's not possible to crop clips that are to be 576 in vertical resolution. It's "stick with the black junk or else".:-)
I'd love to know how you resize your 704x576 and 720x576 clips to 480x576, and if you crop off the black. I understand that cropping in the vertical area is bad (since it has the 576 lines, which is what is needed to get PAL interlaced content), but it should be OK to crop black junk out off the horizontal area. And since cropping in the vertical 576 lines is out of the question, this means I'm forced to waste bits on black junk (there's always black junk in the bottom area of the stuff I capture). Hmmmm.. :-)

Owen, I'll give Xvid capturing a shot. Thanks for the suggestions on how to set it up.

How dose that compare to your Mpeg2 captures ?
It's close. It depends on the settings I use. But at least 4 gigs per hour, using p and b frames and a video rate of about 6000 should produce 4 gigs. So the figure sounds reasonable.

Hopefully one of the above will let you capture YUV2
Yes, it will. All other software's I've tried can access YUY2 and all possible other color spaces *except* Ulead VideoStudio! I wonder where the h**l it reads the available color spaces from! I've mailed Ulead, but am not too hopeful they'll give me an answer I can use.

I will reinstall PowerVCR and test.
Try VideoStudio or DVD Workshop instead. Set it up not to deinterlace. Then you'll get the "crème de la crème", I promise. :-)

If I capture in RGB24 I get a very dark picture and have to adjust capture driver settings to compensate.
I get thin black and white lines over the picture, that come and go. :-(

/Swan

Chibi Jasmin
2nd September 2002, 14:33
As you found out the hard way you have to keep the original captured 576 lines...anything else will screw the TV output...you can resize horizontally to everything you want...just keep the height 576! That's the trick...the reason is your tv displays exactl 576 lines, that have to fit exactly the interlacing in your video file. If you reduce the height of the video, the image is upscaled by your video card and is sent with 576 lines to the tv, but then the interlacing is screwed...this also means you have to keep the black junk at the top and bottom, but it should be okay to crop it at the left and right...after that you can resize to any XXXx576, depends on if you want the clip encoded with correct aspect ratio or not (setting it later in the player).

Swan
2nd September 2002, 20:39
As you found out the hard way you have to keep the original captured 576 lines...anything else will screw the TV output...you can resize horizontally to everything you want...just keep the height 576!
Yes, and I feel like an idiot, Chibi! I should have known better. I better crawl under a rock and hide for a while. :-D
But I learned something valuable and I hope others who read this thread and may not have dared to ask the things I did, also had some use of this discussion.

Owen: It would be a much better test to capture direct to Xvid.
I tried the settings you gave me (using a res. of 720x576) but it didn't work for me. Massive frame dropping! :-(
I then tried lowering to 704x576, same result. At 352x288, there were no drops. I played around with the motion search setting and only at "low" could I capture for a while without frame drops. Capturing with Xvid compression must put much more of a strain on the machine than MPEG-2 because I never get any frame drops at video bitrates of 8000-10.000, highest possible audio quality (real-time layer II encoding), and I can encode using I-frames only. I also tried 1 pass Quality, enabling and disabling Interlace and changing the Quantization type. I'll try some more, but it didn't look promising. :-(

/Swan

Chibi Jasmin
2nd September 2002, 21:26
Originally posted by Swan

Yes, and I feel like an idiot, Chibi! I should have known better. I better crawl under a rock and hide for a while. :-D
But I learned something valuable and I hope others who read this thread and may not have dared to ask the things I did, also had some use of this discussion.

:D Well, now you know it, have fun experimenting with capturing...maybe don't compress the audio in realtime and then capture to xvid...or just try the old way...capture high-bitrate mpeg-2 (or maybe huffyuv?)...and then compress to xvid...shouldn't be that bad...

One other thing I thought of, but it's more theory for now...

One possibility to cut the black junk at the top and bottom is, to find a video filter to add into the DShow chain, that adds black bars at the top and bottom on playback to make exactly 576 lines...but I don't know of any filter at the moment that could do it... :D DivXG400 does something similar at left and right, but that's of no use here...

BTW: I also got something out of this thread...the fact, the weave option from intervideo decoder is quite useful :)

One more thing...you said, the black bars at top and bottom are in your captured material? Just a tip...if they are not really black, but kinda noisy or something from the capture, you can try Crop and then AddBorders in your AVS Script to make them really black, this should save some bits when encoding...

Swan
2nd September 2002, 23:07
realtime and then capture to xvid...or just try the old way...capture high-bitrate mpeg-2 (or maybe huffyuv?)...and then compress to xvid...shouldn't be that bad...
:D I did not use any compression on the audio in my Xvid capturing tests. Perhaps the 'puter isn't fast enough, he, he. But you bet I'll keep on experimenting. ;)When I can get back to MPEG-2 interlaced capturing with VideoStudio, all will be well again. I am quite bothered that I can't do it at the moment.

DShow chain, that adds black bars at the top and bottom on playback to make exactly 576 lines...but I
Yeah! That would be great! Hopefully someone with programming knowledge will have the need for it and construct one. :)

One more thing...you said, the black bars at top and bottom are in your captured material? Just a tip...if they are not really black, but kinda noisy or something from the capture, you can try Crop and
Thanks for the tip. No, the bars are pitch black. All three (!) of my capture cards capture more than the overscan area, leading to black stuff that I crop out when DivX-encoding. Perhaps all capture cards do this? How many pixels of black and where they are located (top, bottom, left, right) depends on the channel I'm capturing from.

Now I need to find a way to compress to Xvid (480x576) using GordianKnot if possible, for a compressability test (that's one of my favorite features of it, plus the crop and resize tool). I'll take this question to the GordianKnot forum. :-)

Again, thanks to everyone who helped me reach a conclusion as to why I was failing.

/Swan

Owen
5th September 2002, 13:44
Swan,
Sorry to here that your Xvid capture was unsuccessful.
You do need lots of CPU power.
I upgraded from Athlon 1.4 to P4 2.1 just so I could real-time capture to Xvid.

I have installed Video Studio 6.5 and cant get capture quality that looks as clear and natural as Xvid.
Mpeg2 suffers from noise/grain and pixel crawl in motion areas which I find distracting.

I've tried different setting, all with Performance set to 15.

Could you post some recommended settings?

I cant get YUV2 working in Ulead either.
RGB24 just does not look as good no matter how much I tinker with settings.

Regards,

Owen.

norxh
7th September 2002, 11:46
wow i just tried the xvid interlace option and the dffshow filter.

it seems to work great. i captured directly to 480x480 1500kbps from satellite, and the quality was near perfect, when displayed on the tv. i set the tv output to 640x480, and i used bsplayer to scale it properly. when playing, on the monitor you see all the ugly combing, but on the tv (27" jvc iart) it looks beautifal, even when paused there is no combing.

if i want to view on my computer, i just fire up bsplayer, using the latest dffshow build, check xvid, decode using xvid, and deinterlace (median works nicely for me), and again it looks beautifal.

so does anyone see anything wrong with this method for archiving video? by this method i mean, storing the video interlaced using xvids interlace option, and deinterlaceing as neccesary? are there any disadvantages? it should compress just as well correct?

edit: did some more testing, it appears that interlaced video with interlace checked, has far more artifacts, than deinterlaced video with it unchecked. this is dissapointing, since its supposed to be doing field based encoding, as -h said "It feeds lines to the DCT function in field-order, instead of frame-order. This results in much better compression (i.e. because DCT doesn't have to deal with scanline artifacts) without any quality loss, if the same quantizer is used. "

midiguy
7th September 2002, 16:02
swan, are you resizing vertically? that could really mess up interlaced content. don't resize vertically.

trbarry
7th September 2002, 16:21
Or if you absolutely must resize interlaced video before encoding, use the InterlacedResize option of SimpleResize. It will avoid blending the fields, much as Xvid does with the IDCT.

- Tom

-h
7th September 2002, 17:17
edit: did some more testing, it appears that interlaced video with interlace checked, has far more artifacts, than deinterlaced video with it unchecked. this is dissapointing, since its supposed to be doing field based encoding, as -h said "It feeds lines to the DCT function in field-order, instead of frame-order. This results in much better compression (i.e. because DCT doesn't have to deal with scanline artifacts) without any quality loss, if the same quantizer is used. "

By artifacts, do you just mean blocking? If your content is really interlaced, enabling interlaced coding should *never*, under any circumstances, look worse than progressive coding.

-h

norxh
8th September 2002, 03:03
well, it maybe just me but it looks like the interlaced video, with interlaced checked has alot more artifacts (blocking) than the deinterlaced video stored progressively. please tell me if i'm wrong.

here are 3 short samples from spongebob squarepants. i captured to huffyuv 480x480 in vdub. all are encoded to xvid 1000kbit cbr.

first (http://home.attbi.com/~thrackensditch2/testpredeinter.avi) , deinterlaced with avisynth, encoded to xvid, interlace unchecked.

second (http://home.attbi.com/~thrackensditch2/testwithinter.avi), encoded to xvid, with interlace checked.

third (http://home.attbi.com/~thrackensditch2/testwithinternocheck.avi), encoded to xvid, with interlace unchecked.

avih
8th September 2002, 05:34
Originally posted by norxh
well, it maybe just me but it looks like the interlaced video, with interlaced checked has alot more artifacts (blocking) than the deinterlaced video stored progressively. please tell me if i'm wrong.


if you deinterlace but keep the framerate (i.e. keep it at 25 or 30) then you have less (half) temporal information, since it's 25 images/sec instead of the original 50 images/sec when not de-interlaced. in this case, for the same bitrate, the interlaced method might have more blocks since it has twice temporal info. if you do de-interlace, the frame size doesn't change (i.e. still 480x480) but removing the interlacing artefacts makes the video more compressible, so less blocks, in the cost of half temporal resolution.

if your want to make a true comparision, you should compare the encoding with interlaced enabled against "separateFields.<whatever deinterlacer u use that's working on fields>" either at 480x480 or 480x240.

Swan
8th September 2002, 20:24
Wow, lots of replies. I have been away for a few days and thought this was a closed subject. I'm glad you're all interested in this in keeping the discussion going, though! :)

You do need lots of CPU power.
I have an AMD Athlon XP 1900+. Perhaps it's not fast enough?

I have installed Video Studio 6.5 and cant get capture quality that looks as clear and natural as Xvid.
Okay. Perhaps it's a matter of taste. ;)
But, just to make sure: Did you install the patch from Ulead? It's crucial, as it replaces the Ligos encoding filters with Ulead's MPEG Now! filters, which IMHO are much better!
I have noticed that among the most demanding things to MPEG-2 encode (scenes that will contain visible blocks) are scenes with smoke, fog and fire. But raising the video bitrate and fiddling with the GOP settings normally gives good results, even on fire, fog and smoke in my experiements.

I've tried different setting, all with Performance set to 15 Holy smokes! :) If I go above 8-9, I start getting dropped frames. I usually set the audio bitrate to 384, video bitrate to 8000 and under Advanced you could try setting the software to just encode I-frames. I can't access to my computer right now and check my settings (it's busy capturing "classic videos weekend" on VH1:)), but if there are any other options that I use that are important, I'll add them to this message later.

I cant get YUV2 working in Ulead either.
Really? Ohh!! And you're using btwincap drivers? Please, please, write to Eduardo who makes the btwincap drivers and tell him that you also have this problem. It works for him with Media Studio 6.5, he wrote to me, so if someone else mentions that it's not working, perhaps he can find it in his heart to look into it. Yes, I am really depressed about not being able to capture interlaced MPEG-2 with Ulead's software's (I prefer VideoStudio, btw). And I'm an Mpeg-2 nut, I know. :-)

midiguy: swan, are you resizing vertically? that could really mess up interlaced content. don't resize vertically.
I accidentally did. But no more! :) I learned the hard way. I should have known better, I must have left my brain on the bus that day I encoded my first Xvid test file.

/Swan

midiguy
9th September 2002, 06:44
Originally posted by Swan

I accidentally did. But no more! :) I learned the hard way. I should have known better, I must have left my brain on the bus that day I encoded my first Xvid test file.

/Swan

actually, something that I noticed is that you can resize vertically if it is resized to exactly half of the vertical resolution

example: resizing 640 x 480 to 320 x 240
not sure exactly how that works, I suppose its because since it is half, it could just discard one of the fields? or what it probably does is just blend the 2 fields exactly together... since it is exactly half, I guess that makes sense (the video looks de-interlaced BTW, as if you de-interlaced it by blending, just, you don't really get the annoying bluring or ghosting). any comments?

sadownik
30th September 2002, 06:30
To Swan:
Not only Ligos filters plays MPEG2 interlaced, Intervideo DVD XP pack play, BUT...only at integrated XP driver (nvidia).
When detonators installed (no matter which vers.) mpeg2 plays non-interlaced (!).
I suppose that might be with other players...
Next thing:
Divx5 and interlaced: Divx5.00 encoding videos are interlaced, BUT... divx5.01 and 5.02 no matter which option switch, output is non-interlaced:(.

dyrektor@hotmail.com

mf
20th April 2003, 12:11
Ok, after a few replies I started page-downing, cause I had an idea and I didn't want to read everything until posting. So if the problem is already solved, just bash me on the head. If your TV-out has a "flicker-filter", it might help to turn it off. That should display any interlaced video as truly interlaced. Even if you just drew it in MSPaint (I did that once, flicker hell! :D).

Karl Beem
21st April 2003, 23:17
DivX 5.0.4 supports interlaced content, encoding takes 50% longer. Currently, if you write the MV log, you get crap - otherwise, it looks fine