PDA

View Full Version : Capturing with analog card using DV-Codec


communist
9th August 2003, 15:24
I'm not sure if anyone has ever tried / done that but I was curios to if its possible... ( I needed to capture a bit more with less file-size since I dont have too much free space right now)

I was browsing the DV forum when I stumbled across the various Stickys. I was wondering if those DV-Codecs were mainly decompression codecs.
So I downloaded the Panasonic DV-codec and installed it. Started Vdub 1.5.4 and captured a bit around ;)
Settings
720x576 @ RGB24 (required by the codec)
25fps / no audio
Filesize for 20s: ~69MB
It works - however CPU usage went up to 75% - average @ 50%.

I also captured with HuffYUV to compare file-size / quality.
Settings
720x576 @ YUY2
25fps / no audio
Filesize for 20s: ~135MB

One things sure - HuffYUV looks better but not significantly iMO if your going to decrease res / encode to XviD...

Testing System:
XP 2000+ (@ 2.139GHz)
384 SD-RAM
Samsung 7200rpm / 40GB (grr..)
PV 951 TV-card (BT8x8 chip)

bb
10th August 2003, 11:05
DV is a good capture codec, but I'd rather use MainConcept for it's speed, and because Panasonic uses RGB colorspace. There's one limitation over e.g. MJPEG codecs, though: resolution is fixed to 720x576 (PAL) or 720x480 (NTSC), respectively.

bb

FredThompson
12th August 2003, 08:26
If you're going to do this and plan any post-processing or conversion to MPEG, use trbarry's Avisynth filter or Xesdeeni's VirtualDub filter to correct NTSC DV 4:1:1 bleed.

communist
12th August 2003, 11:56
Thx for the tip - but unfortunately I'm in europe (PAL).

bb
12th August 2003, 17:16
Originally posted by communist
Thx for the tip - but unfortunately I'm in europe (PAL).
Haha, you'd better say fortunately, because for PAL DV material you don't need the fix.

bb

FredThompson
13th August 2003, 02:23
Don't get too excited. PAL DV uses 4:2:0. It's convenient when going to MPEG but there's still a problem with it, especially with saturated red and blue.

http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html

ppera2
13th August 2003, 14:59
I tried Mainconcept DV 2.04 codec with Virtual Dub VCR. It works well, and quality is good. However, compression ratio is relatively little - 5.8 all time, and it's no good for case of little space on HD. Other bad thing is that it costs.
I think that it's better to capture with software suplied by capture card - in case when it's good, lika Pinnacle PCTV vision or Win DVR. Quality is slightly lower, but compression is much better, so it needs 4-6 times less space.

FredThompson
13th August 2003, 15:06
I've got 2 updates to the MainConcept encoder since 2.04, they really should updated the demo version. Compression for DV will be the same data size regardless of which codec is used. The fact it's larger means it has more information and less loss, not necessarily a bad thing.

communist
13th August 2003, 16:47
I tried the Panasonic and Sony DV codec - both compress with a 8.6:1 ratio according to Vdub.
Also the Sony codec seems to be more cpu-intensive here.
Anyone knows of any other free DV codec?

FredThompson
13th August 2003, 17:17
You can get a read-only from Canopus. It's not full luma.

ppera2
13th August 2003, 17:31
Canopus is for playback only.

I tried Pinnacle's DV codec (suplied with card, but didn't used until now, because it playbacked only via Pinnacle's player). Now, with installed Mainconcept DV demo I can playback it and work in V Dub.

It's quite good - funny thing is that card (with lot of software) is cheaper than Mainconcept DV codec itself :) .
As I see bitrate (so copmression rate is very similar to Mainconcept's DV).

I tried japanese Iris DV codec - it's free. Installation in XP went good, in Win 98SE failed. So I couldn't test how captures it (in XP WDM driver allows not full vert. res). I just made some recode - it looks fine, but by playback CPU load was extremely high, aprox 2.5 times more than with Mainconcept DV playback.

lilhobo
14th August 2003, 12:49
Capturing to DV with get a larger file AVIs, correct??? but the quality will be as good as the source will ever get in digital format???

edit: hang on huffuy has high file size....which is better for editing??? DV i would guess

ppera2
14th August 2003, 14:53
Analog capture can't be so good as direct digital transfer (via firewire port).
Both are same good for editing...

communist
14th August 2003, 14:59
Originally posted by ppera2
I tried japanese Iris DV codec - it's free. Installation in XP went good, in Win 98SE failed. So I couldn't test how captures it (in XP WDM driver allows not full vert. res). I just made some recode - it looks fine, but by playback CPU load was extremely high, aprox 2.5 times more than with Mainconcept DV playback.
Just tested it and yeah CPU usage is quite high in playback :eek:

Also in the config. dialog there is option for 'threads' 1 - 2 - 4 > is this for dual / quadro CPU systems?

FredThompson
14th August 2003, 15:13
DV is lossy. There are many lossless codecs. So, no, DV isn't the highest quality you can have with digital video. However, it can be convenient to use because it is smaller than HuffYUV. If you use proper filtering, you can create interim source which is better than pure DV.

lilhobo
14th August 2003, 15:51
so the question remains...whats the best capturing codec, that allows the easiest editing, and conversion to SVCD or VCD

communist
14th August 2003, 16:32
HuffYUV / MJPEG / DV
Depends on your system (fast cpu / big or small hd-space...).

ppera2
14th August 2003, 16:35
If quality is essence huffyuv is undoubtly best codec for capture (and not only for that). But it takes lot of space - for full PAL YUY2 you need aprox 30 GB for one hour.

For editing is good every codec which has no delta frames (only keyframes) - huffyuv, Mjpeg, DV. However, this is not required, you can edit video with delta frames too, just must care about keyframe points if make not full processing.
It's not important to what resulting format you want convert your capture - you need to are much more about other things, like interlace, resolution etc.

FredThompson: did you make direct compare in real life (amateur) - comparing camera's DV got via firewire port with capturing DV camera's analogue video with very good quality card?

Digital one must be better, even with lossy DV compression. Reason is that, that in camera you will get for each CCD sensor cell one pixel in digital output. When digitalizing analogue source we make samples periodically, but it will never match exactly cameras CCD sensor cells.
By capturing from analogue camera with vidicon it's not the case, but sure that such (old) amateur cameras can't compete with new DV cameras in sharpness.

lilhobo
14th August 2003, 16:38
oh silly me, editors like premiere will read from the codecs themselves!

so what do the Dazzle hollywood bridge use for their "DV" codec if its in hardware??

lilhobo
14th August 2003, 16:50
DV cameras are so small coz the companies cut out all the digital-to-analogue conversion circuitry, so if a DV camera has DV-Analogue hardware, the quality of output will depend on the quality of the hardware to convert.

so in effect, Dv is probably the best option for sources of analogue type. i think thats what i meant....i wouldnt think it would be ideal to capture to HUFFYUV from VHS

lilhobo
14th August 2003, 16:56
Originally posted by ppera2
Pinnacle PCTV vision or Win DVR. Quality is slightly lower, but compression is much better, so it needs 4-6 times less space.

this WinDVR that this person is talking about is the canopus one right??? NOT the intervideo DVR??

FredThompson
14th August 2003, 20:52
@ppera2, no, just firewire. I can so no reason to use analog capture from a firewire device, it would give lower quality. However, I have noticed unfiltered NTSC DV is not good for thin details due to 4:1:1. That's why there are now corrections for the luma to take it to 4:2:2.

@lilhobo, are you SURE you meant what you just typed? Look at it again, your first statement makes no sense.

The "best" option is to capture with no loss, exceeding the source resolution. (Remember, you are digitizing an analog signal and that requires 4x the frequency to get a good match.) It's also best to have as much color depth as possible.

When that isn't possible/practical, something has to be sacrificed. Quality digitizing of analog material starts with the most accurate, high-resolution digitization possible/practical, then filtering, then down-mixing.

I use DV for VHS if it is convenient. Usually, I'm using a hardware MPEG2 device at a very high bitrate because the files are smaller and, with filtering, the result is quite good.

lilhobo
14th August 2003, 21:53
so which part makes no sense again???

any time u use filtering you add "artifact" !! the product will become "better" but its not the original product....eg. analogous to the glossy magazine touch-up of their glamour pictures.

i may be wrong so i will expect you to tell me :P but it is like scanning a grainy photo...you get the same product thru a medium ranged scanner as you would thru a supa dupa scanner. you cant have more information than it already is there !!!

u can add more information "artifact" and make it eye-appealing but you realistically have a "better" product than the original just by having better raw capturing equipment

/reply :D

FredThompson
14th August 2003, 22:25
Originally posted by lilhobo
[B]so which part makes no sense again???What you typed said DV camcorders are small because there is no digital->analog electronics then you talked about analog output from such a device.

They're small because the tapes are small and to make the consumer models easy to use.

any time u use filtering you add "artifact" !! the product will become "better" but its not the original product....eg. analogous to the glossy magazine touch-up of their glamour pictures.

i may be wrong so i will expect you to tell me :P but it is like scanning a grainy photo...you get the same product thru a medium ranged scanner as you would thru a supa dupa scanner. you cant have more information than it already is there !!!

u can add more information "artifact" and make it eye-appealing but you realistically have a "better" product than the original just by having better raw capturing equipmentFiltering doesn't necessarily add an artifact, meaning distortion. In any event, you can't get a perfect digital copy of something which is analog. WRT scanners, you are correct to an extent. (That's a very different topic and we could discuss it for a long time. I sell printing equipment so line screen is something I'm quite familiar with...) Even so, all good results from scanners use filtering. I know what you meant to illustrate but scanners are a bad example because of the different colorspaces of film, print, video screens, etc.

NTSC DV is 4:1:1, PAL DV is 4:2:0, neither is 4:2:2. If you convert the chroma to 4:2:2, operations which are supposed to work in 4:2:2 colorspace will give far better results.

There are some screenshots here: http://wwwl.geocities.com/fredthompson6 but some of the other info on that page is very outdated. I will update it soon. I ran out of room and needed to put the DV samples up so some screenshots aren't there.

To some extent, filtering cannot restore what is already obscured, you are absolutely correct. It's not like washing mud off a piece of pottery.

Sometimes, however, it is best to filter to get a quality product. If your source was a film, converting to the original progressive frames makes sense. If it was a low-quality original with bad black and white points, color correction makes sense. Dropouts from analog tape, sparklies from analog satellite, there are lots of reasons to filter. Capture equipment won't make a difference there because it's a quality problem with the source.

DV isn't always the "best" way to capture. Almost all my work is with NTSC. I can tell you, emphatically, NTSC 4:1:1 doesn't work well at all with CG or thin, sharp objects. This includes video overlays and lots of real-world subjects like the dividers in windows on a building. My understanding, from talking with people who do PAL, is that interlaced PAL 4:2:0 is an even bigger headache.

There's also the issue of what aspects of your capture are due to limitations/corruptions in the carrier. Cropping junk from the edges and adding borders would make sense. So would hiss removal from the audio track. If it's an interlaced TV recording (apparently PAL support progressive, sure with NTSC did) of a progressive original...

FWIW, my comment about 4x oversampling has to do with digitizing a curve. It's not something which is directly available to us.

ppera2
15th August 2003, 12:04
Sure that dimensions have nothing with D/A converter built in DV cameras.
In fact, D/A converter from CCD is not complicated, and it's only partially D/A coverter.

ppera2
15th August 2003, 12:17
Originally posted by FredThompson
@ppera2, no, just firewire. I can so no reason to use analog capture from a firewire device, it would give lower quality. However, I have noticed unfiltered NTSC DV is not good for thin details due to 4:1:1. That's why there are now corrections for the luma to take it to 4:2:2.


What corrections? I don't see right way to make color sharper than what is it. Why they made NTSC DV with 4x littler color res. ?

Is it because of some old tape formats with similar limitation?
Perhaps it explains that color bleeding is no problem in PAL world (or very rare).

FredThompson
15th August 2003, 17:42
Look at threads I've started in the past month or so in teh DV and AviSynth development forums. I think the DV one has a title about color correction and the AviSynth title mentions Lanczos. Chroma is resized down then back up with Xesdeeni's approach. trbarry's filter works differently.

4:1:1 can have benefits over 4:2:0. Neither is perfect.

I'm not sure what causes tape smear. Probably cheap electronics. If you look at the opening scene for Highlander or Excalibur (I forget which one) on NTSC VHS you'll see red text on a black background. It's illegible but not that smeary. Copy it and it smears.

ppera2
15th August 2003, 18:05
Originally posted by FredThompson
4:1:1 can have benefits over 4:2:0. Neither is perfect.


I think that 4:2:0 is better according to human eye color resolution.
It's aprox half as b/w in hor. and in vert. axis.
PAL has also halved vertical color res. because it combines 2 lines in one - 2 phase alternated lines to avoid color errors.
4:2:2 has better vertical color res. - but is it really visible?


I don't have here much chance to get some NTSC VHS tapes, even less to get NTSC VCR, I played some tapes with PAL VCR which had pseudo PAL output at 30 fps, so not real NTSC.

FredThompson
15th August 2003, 19:02
Unfortunately, I cannot comment on 4:2:0 because I work with NTSC. In any event, the idea is to take the image to 4:2:2 then do whatever filtering then encode. The differences can be subtle but think about it this way:

With 4:2:0 each chroma value represents four pixels in a square, as you mentioned. That is a "best fit" guess chroma value based on all four original pixels.

If you increase the resolution of chroma before filtering, the non-integer math done on the pixels should be more accurate.

Granted, when you encode to 4:2:0 some of the extra information will be "lost" but the determination of chroma should be more accurate and with fewer visible problems than if you filtered with less acurate chroma.

Unfortunately, I cannot advise how to convert 4:2:0 to 4:2:2. If you look in the Lanczos thread in AviSynth development forum you'll see some code which might give a starting point for developing an interpolation routine.

lilhobo
15th August 2003, 21:54
well, firstly...i meant that "if" it had a D/A converter it would need extra space for ports and circuitry anyways, notwithstanding the size of tape (kinda obvious)....so the D/A convsersion would take up space....

Secondly, 4:2:0 to 4:2:2 conversion is the whole heart of this discussion it would seem.

If the CCD signal is converted to 4:2:0 color space for DV, it would seem silly to capture to HUFFYUV when the extra information of the 4:2:2 is NOT taken into consideration anyways. You have 2x the size of the HUFFYUV file with information thats NOT there for the 4:2:2 applications....Hence the comparison to the scanner !

the question follows then that for camera that has analogue conversion, and hence further "degradation", what is the best color space for such format GIVEN the limitations of the speed of harddrive, and the size of the Harddrive etc. you dont want to capture null information and make the file size so large when the information may not be there

from speculation, DV is just about as good as it gets for VHS digital conversion....

PS. i learnt a lot from just air my (mis) conception :D

FredThompson
15th August 2003, 22:08
Ah, I see know. Yes, with PAL source, DV is probably pretty darn good but there's always the possibility that DV compression is more than just chroma space. I don't know enough about it to make a definitive statement.

There are other lossless codecs which yield smaller files than HuffYUV. Maybe one of them can be configured for 4:2:0?

Another thing I've wondered about is if capturing has a tendency to make chroma artifacts "legitimate" parts of the image and, therefore, makes them harder to filter. Maybe that's an incomplete thought...

When I capture, it's either DV or hardware MPEG-2 and I always filter to correct chroma problems, etc.

Here's an article about the chroma problem with 4:2:0: http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html It's something I sure need to get figured out as well for the times I'm working with MPEG2 capture.

My point about the threads where we're discussing 4:1:1 is some of the scripting techniques used with AviSynth to "solve" that might be helpful when designing a "correction" for 4:2:0.

ppera2
16th August 2003, 00:58
According to article linked, bug appears because conversion is not same for progressive and for interlaced video.
So, I would not call it chroma problem with 4:2:0 - it sounds like format itself is problematic.
In any case, interlace as usual just makes troubles and complicates things.