Log in

View Full Version : Mpeg 2 capturing, better then AVI (uncompressed)?


dvd_master
22nd July 2003, 19:00
Would capturing in AVI uncompressed (I have the HD space for it) be higher quality or the same as capturing in MPEG2 mode (ATI AIW 9000) ?

I'm not sure which to do.

Another note, is there any freeware programs good for capturing? VirtualDub says "capture driver not available. grrrr.

bb
22nd July 2003, 20:05
If you call yourself "dvd_master" you should know ;)

MPEG-2 captures result in soso quality. Use it, if you want to watch your capture only once and then throw it away (or don't use it at all).

Uncompressed AVI captures are not recommended either - you stress your hardware unnecessarily. Use the lossless Huffyuv codec to get exactly the same quality as an uncompressed capture, but at a ratio of 2.5:1.

Should the machine be too weak for Huffyuv (in this case it would very likely be too weak for uncompressed captures, too), or if HDD space is an issue, then use MJPEG compression, e.g. the PicVideo codec at q18 or q19 (compression ratio around 10:1).

Regarding your All-in-wonder card: use the search button. There are hundreds of posts about this topic.

bb

dvd_master
23rd July 2003, 02:17
Hey, never said I earned the title. :D :D :D

Thanks ,I'll stick with AVI.

FredThompson
24th July 2003, 10:50
ATI's version of MPEG is junk, yes, but don't just throw MPEG2 out altogether. If you have a proper hardware MPEG2 encoder, quality can be quite nice. For NTSC captures, MPEG2 at a high bitrate can be better than DV because you don't get the 411 bleed of saturated colors nor do you get some of the swimming pixels on the edges of logos.

ppera2
24th July 2003, 14:50
Originally posted by dvd_master
Would capturing in AVI uncompressed (I have the HD space for it) be higher quality or the same as capturing in MPEG2 mode (ATI AIW 9000) ?

I'm not sure which to do.

Another note, is there any freeware programs good for capturing? VirtualDub says "capture driver not available. grrrr.

I just get one Sapphire ATI 9000 PRO VIVO for testing. I can fine capture with Virtual Dub VCR in full PAL res. Maybe you should visit ATI's site and dl. newest WDM drivers (or they call it MMC?).

Iuvcr doesn't work, and it's not free too. There is couple other free, but V Dub VCR is far best.

Picture quality is not so good as by Pinnacle PCTV.

yg1968
31st July 2003, 16:11
Fred,

From what I have read 4:1:1 is better than 4:2:0 (DVD and PAL DV) for multi-generations work. Anyways, mpeg is harder to edit.

while 4:2:0 works well with PAL and SECAM color encoding and broadcasting, interlace already diminishes vertical resolution, and the heavy filtering needed to properly process 4:2:0 images causes noticeable losses; as a result, multigeneration work in 4:2:0 is much more subject to visible degradation than multigeneration work in 4:1:1.

See these links:

http://www.adamwilt.com/DV-FAQ-tech.html#colorSampling
http://www.lafcpug.org/feature_capture_card.html

See also this link (text is reproduced below):
http://www.dv.com/columns/columns_item.jhtml;jsessionid=HSH5F1JY4W4W0QSNDBCCKHSCJUMEYJVN?category=Technical%20Difficulties&LookupId=/xml/feature/2003/wilt0603&_requestid=331761


Adam Wilt

The 4:2:0 Follies

4:2:0 chroma sampling is used in PAL DV, PAL DVCAM, MPEG-1, and several flavors of JPEG and MPEG-2, including DVDs and over-the-air DTV. It's so widespread, it must be pretty good, right? Although it potentially offers a decent trade-off between picture quality and compressive efficiency, it has pathologies you should understand before rushing off to embrace it in production applications.

A quick review for those not tuned into our last episode: In 4:2:0, the chroma (color) information is sampled at half the resolution of luma (brightness) information, both horizontally and vertically. In PAL DV, for example, the luma-sampling grid is 720 x 576 while the chroma-sampling grid is 360 x 288. To a first approximation, each chroma sample spans two luma samples horizontally (i.e., two pixels) and two luma samples vertically (two scanlines).

Because the eye is less sensitive to color detail than brightness detail, subsampling chroma this way lets you represent an image with only half the data required for full-resolution 4:4:4 sampling. Yes, the color signal winds up a bit soft as a result, but 4:2:0 sampling softens the color equally in the horizontal and vertical directions. At first glance, this seems like a good idea. But the first glance doesn't take interlace into account.

Figures 1a - 2c - Chroma in 4:2:0 (Matrox DV; chroma filter on, interpolation off).

The problems with interlace

When a 4:2:0 codec samples two lines vertically for chroma, which two lines does it sample: two adjacent lines in the frame, or two adjacent lines in one field (skipping over the interlaced lines from the other field)? Because the vast majority of material in video is interlaced, you might assume that field-based, interlaced sampling is the best. Certainly it deals better with the fact that the material in one field might be quite different from the material in the other field when there's motion in the frame. Unfortunately, interlaced 4:2:0 results in its own sort of serrated edges, most noticeable on brightly colored, near-horizontal diagonals (see Figure 1a). Because interlaced color sampling plays hopscotch--skipping every other line in the frame-sharp vertical transitions in chroma, depending on where they occur in relationship to the sampling structure, often result in orphaned or spurious lines of color appearing two lines above or below the object they should be applying to.

Most of the video servers used in broadcast utilize interlaced 4:2:0 sampling, and this error often shows up on-air, especially when newsreaders or commentators wear bright red jackets in front of muted blue backgrounds, or when thin red lines are used in lower-thirds. The effect is exacerbated by the fact that the line-skipping hopscotch means that the area sampled for a chroma value is really four scanlines tall: the two lines sampled, plus the two lines of the other field. Those other two lines may not contribute to the value of the chroma sample, but they spread apart the vertical extent to which that chroma sample applies. In 4:2:2, a chroma sample (in the first approximation) is responsible for painting two pixels in a 2 x 1 array; in the oft-denigrated 4:1:1, a chroma pixel fills in color for four pixels in a 4 x 1 array. In field terms, a 4:2:0 chroma sample fills in four pixels in a 2 x 2 array, but those four pixels are really spread out over a 4 x 2 array--an area of eight pixels--when the intervening lines of the other field are accounted for.

Progressive 4:2:0 sampling ignores interlacing and processes both fields as a single frame. The chroma information isn't spread across such a vast area, and the odd color artifacts that interlaced 4:2:0 is prone to don't occur. For still images, it's clearly superior.

But they're motion pictures

Unfortunately, stills aren't the stock and trade of videographers. Motion happens, and interlacing along with it. The uncorrelated nature of the two fields means that errors occur along moving chroma edges, resulting in what might be called coarse chroma combing.

The combed edges we normally see on frames pulled from interlaced video with fast motion result from the temporal displacement between the fields when viewed as a still, frozen in time; when we watch interlaced video moving in realtime, the combing isn't present. But the coarse chroma combing of progressively sampled 4:2:0 images is present within a single field (see Figure 2c); it's not a frame-based artifact of seeing the two fields at the same time, but a field-based artifact caused by sampling and reconstructing chroma across two unrelated fields. Even as your eye tracks motion across the screen, the chroma information grows jagged edges, like the tassels on a Persian carpet, which appear in proportion to the amount of horizontal motion within the image. Most annoying!

Overall, progressive sampling looks better on static imagery, while interlaced sampling is preferable on moving images. What's a DV editor to do? The decoding you get depends on the codec you use. Apple and Avid, for example, use interlaced sampling; Microsoft appears to use progressive. Recent versions of the Matrox VFW codec (I'm using 2.5.0.72) use progressive by default but let you choose interlaced (Control Panel>Sounds & Multimedia>Hardware>Video Codecs>Properties> Matrox VFW Software Codecs>Settings> Chroma Sampling for Fast-motion Video).

Unfortunately, most video has combinations of static and moving subjects within the same frame, but no 4:2:0 codec works in a content-adaptive way; it's one method or the other. In either case, 4:2:0 incurs heavy compromises in image quality. No wonder Panasonic's DVCPRO broke with the DV standard; it uses 4:1:1 even in PAL.

Adam Wilt is a professional film and video geek who maintains a DV FAQ at www.adamwilt.com/DV.html

FredThompson
31st July 2003, 17:00
That's interesting but why assume capturing as MPEG2 requires you to edit as 4:2:0? Use AviSynth and convert.

yg1968
31st July 2003, 17:07
That would defeat the purpose of saving time by capturing in mpeg.

FredThompson
31st July 2003, 18:12
What?!?!

Are you capturing to your final format/size?!?!

That's the best way to guarantee the worst quality.

Or are you seriously proposing you can edit MPEG2 without having to re-encode it?

yg1968
31st July 2003, 18:34
I capture and edit in DV and then convert to mpeg. That's my point. DV is easy to edit. Mpeg isn't. Besides, you do not have to re-render the whole clip if all you are doing is cutting parts of the video.

Furthermore, going from mpeg to huffyuv back to mpeg seems a recipe for losing video quality. Here is a somewhat related article on the mistaken assumption that going from DV to uncompressed back to DV is a good option. The article says that this isn't a good idea. I assume that this holds true for mpeg as well.

http://www.lafcpug.org/feature_capture_card.html

FredThompson
31st July 2003, 19:23
If at all possible, don't edit in DV. Do all your editing with AviSynth. Search for my name and you'll find lots of stuff about why NTSC is difficult. I'm literally walking out the door and won't be back for a week.

I'm aware cutting doesn't require re-encoding of DV. Perhaps you should think through what you type first because you were talking about MPEG2 and now jump to DV. Your comment was editing defeats the time savings of capturing to MPEG2. The only way that saves time is if you are capturing to your final format. It looks like you know what you mean to say but that's not what you're typing.

You can start here for DV solutions: http://forum.doom9.org/showthread.php?s=&threadid=58294

There's some outdated stuff on my page here: http://www.geocities.com/fredthompson6

There's also other threads here and in Donald Graft's forum and possibly some at KVCD.

yg1968
31st July 2003, 20:55
Your comment was editing defeats the time savings of capturing to MPEG2.

People that buy an mpeg card such as the PVR-250 usually do so because they do not want to take the time to re-encode. So I stick to my original comment: If you are going to re-render the video, don't use mpeg to capture.

In other words, I don't see the point in capturing in mpeg if you will be editing the video. I don't capture in mpeg because it is not easily editable. So I am saying that it is better to capture in DV avi. You are the first person that I have heard suggest capturing in mpeg is better. It might be faster (if you don't have to re-render it) but not better.

FredThompson
1st August 2003, 09:44
Originally posted by yg1968
People that buy an mpeg card such as the PVR-250 usually do so because they do not want to take the time to re-encode.Can you support this assertion with independant, verifiable statistical studies or is it your assertion based on your opinion?

In other words, I don't see the point in capturing in mpeg if you will be editing the video. I don't capture in mpeg because it is not easily editable. So I am saying that it is better to capture in DV avi. You are the first person that I have heard suggest capturing in mpeg is better. It might be faster (if you don't have to re-render it) but not better.
Seems you didn't follow the links I gave, attribute to me statements I did not make and do not have a lot of experience with AviSynth. We should agree to disagree and leave it at that.

jggimi
1st August 2003, 16:13
The following announcement is published with necessary regret:One of the reasons we have rule #12 (http://forum.doom9.org/forum-rules.htm) is to reduce the amount of heated argument. A reminder for everyone reading this thread is that personal opinions on "what's best" or "better" are just that... personal opinions. If we cannot continue this thread like ladies and gentlemen, I will close it.When I first began capturing, I captured in MPEG-2. I found it "just as easy" to edit as any AVI, due to my post-capture encoding procedure.

My procedure was to create .d2v projects, allowing me to select start and stop frames and demux audio, and use AviSynth to frameserve to my encoder. AviSynth allowed me resizing/cropping, IVTC, or any other filters necessary. The Trim() filter could be used to excise commercials as necessary.

I initially switched to AVI, not because of "ease of use," but because I was getting unacceptable levels of dropped frames in MPEG-2 when capturing full size video. My capture bitrates in MPEG-2 were high enough (typically 10,000kbps) that I could not visually discern any degradation of quality, even though I was capturing in a lossy format. I found that, to reduce dropped frames, I had to set the GOP to 100% I-frames (keyframes), which lowered CPU consumption and may have improved perceived quality.

However, as this was software MPEG-2, not hardware, the level of dropped frames was still unacceptable, and I made the switch to AVI, where I found I could eliminate all dropped frames. Had I purchased a hardware MPEG-2 encoder, I'd probably never have switched.

In summary, my personal experience found them "the same" from an ease-of-use perspective, but my hardware limitations forced me to use AVI, as there is less CPU consumption with the HuffYUV codec.

ppera2
1st August 2003, 17:12
I think that discussion according to thread's title is complete unnecessary.

It's clear that uncompressed AVI is better than Mpeg2 capture.

Question is only: what better fit user's hardware?

Slow and little HD is not good for such AVI, and slow CPU is not good for Mpeg2. Clear. Log off... :)

yg1968
1st August 2003, 22:57
Fred,

I have no choice but to use DV because I capture with my digital camcorder's passthrough feature. I admit not to use avisynth that much. It seems a bit complicated for my needs (basic editing).

If you read newbie posts on vcdhelp, many of them want an mpeg-2 card in order to save time. For most video enthusiasts or beginners, this is a hobby and time is a consideration. Getting the best quality is a factor but they are not willing to wait 12 hours for TMPGEnc to encode.

As far as NTSC DV, you haven't convinced me that 4:1:1 is garbage just because your camcorder's passthrough doesn't properly display colour details. For all I know this might be specific to your camcorder or Canon camcorders in general. Anyways, Adam Wilt seems to think that 4:1:1 is better than 4:2:0 (for NTSC interlaced video). So it can't be all that bad.

Jggimi,

As far as mpeg editing, I have read that cutting part of the video is harder because it must be done on a reference frame.

http://tangentsoft.net/video/mpeg/edit.html

jggimi thanks for your input. Interesting practical experience,

yg1968

jggimi
2nd August 2003, 02:18
To directly edit an MPEG frame (any MPEG: -1,-2, or -4), edits need to be made on an I-frame, also called a keyframe.

My method (.d2v project via DVD2AVI) frameserves uncompressed video to the AviSynth filter set, bypassing keyframe limitations.

kastro68
2nd August 2003, 18:21
I capture in mpeg2 10000kbps 720x768 frequently since it takes up less space than mjpeg. After filtering in Avisynth, I can't tell any discernable difference b/w mjpeg and mpeg2

The only reason I try to steer away from this format is because I am too lazy to work out the audio delay.

FredThompson
4th August 2003, 03:17
@yg1968,

NTSC 4:1:1 DV artifacts are because of 4:1:1, they are not dependant on hardware. It tries to use one chroma value for 4 adjacent pixels. THAT is where the problems come from. It does not matter if you use a camcorder or other device. If you have NTSC DV format, that is the problem. It does not handle sharp edges well, nor does it handle slight angles like 15-20%.

When you take 4:1:1 and want to turn it into 4:2:0, the chroma problem gets even worse.

This is why I mentioned AviSynth and sent you a link to one of the discussions about filtering DV. Filter DV to help correct problems before encoding.

I do not understand your comment about TMPGEnc and dvdrhelp (the name changed a few months ago.) Length of encoding time is a function of the software and the hardware. You most certainly can put everything you want onto DV tape and store it that way or as large hard drive files. If you want something smaller than 13G/hour, you've got no option but to reduce the data somehow. Most often that means encoding to MPEG2 or MPEG4. Or, I suppose, you could record it to videotape.