Log in

View Full Version : colorspace conversions


q1ra
28th September 2005, 23:17
I've got a Panasonic PV-GS35 Camera and I use the MotionDV Studio program that came with it to capture to my PC. I would like to encode it to DVD using Avisynth and CCE or TMPGenc and also to Xvid, preferably using Avisynth and Vdub or Vdubmod. I'm in the US so it's NTSC. I'm a complete noob at this and dealing with colorspaces has me a little confused.

According to what I've read on this forum, the Panasonic codec upsamples the source from YV12 to RGB. For conversion to DVD, I need to ConverttoYUY2() to run ReInterpolate411() and then I believe it gets converted (by CCE or TMPGenc?) to YV12 for MPEG2. Could I just use the Cedocida codec and set the encoder's YV12 chroma sampling to MPEG2 interlaced so during capture it is going from source straight to YV12 and 4:2:0? Wouldn't this skip all the conversions and the need to run ReInterpolate411()? What has other's experience's been with these two options?

I've got some other questions about colorspaces but I fear they get too close to Rule #12 by asking "what's best." So, for my own testing, what type of video would be good to shoot that would bring out the differences in the colorspaces, RGB, YUY2, and YV12 and bring out the problems with multiple colorspace conversions?

This forum is great and has taken me from knowing nothing to being a moderately informed newbie. Thanks in advance for any suggestions....

troy
29th September 2005, 05:54
when you capture your video you are going to only be able to capture 4.1.1 DV video. What you do from there is up to you.

Video Dude
29th September 2005, 16:36
For part of your question:

For CCE (Panasonic DV Codec):
ConvertToYUY2(interlaced=true)
ReInterpolate411()


For TMPGEnc 2.5 (Panasonic DV Codec):
# Only if you want to use ReInterpolate411
ConvertToYUY2(interlaced=true)
ReInterpolate411()
ConvertToRGB24(interlaced=true)
# If your video looks washed out or very dark after the encoding
due to the RGB conversion you would have to either clamp or expand
the colorspace to correct it (many threads about this).


For TMPGEnc 3.0 (Panasonic DV Codec):
ConvertToYUY2(interlaced=true)
ReInterpolate411()

trevlac
30th September 2005, 18:53
I've got some other questions about colorspaces but I fear they get too close to Rule #12 by asking "what's best." So, for my own testing, what type of video would be good to shoot that would bring out the differences in the colorspaces, RGB, YUY2, and YV12 and bring out the problems with multiple colorspace conversions?


Highly saturated blue and red lines running both vertical and horizontal. Preferably on a light grey (close to white) background. Throw in a black line for pure luma comparison.

It would be best to actually make something and film it vs computer generated. NTSC DV colors should smear horizontally onto the white when you view it as fully interpolated 4:4:4 RGB (which btw is the only thing you can view). YV12 should smear vertically and horizontally. Horizontal depends upon the positions of the subsamples. I'd doubt you'd notice the Hz if you started with 4:1:1 The smears also depend upon how the samples are interpolated.


-----------------------
BTW: My own rather anal opinion is that this has nothing to do with colorspaces and everything to do with subsampling ... this may be self evident and just a difference in the use of the terms. The YCbCr colorspace is the only one that supports subsampling ... and unfortunately there are many different flavors of sample placement and how the sample are derived. So If you know what your decoder is doing (personally testing is a great way to know) then it's just an issue of being ok with, compensating for what you don't like, or getting a new tool.

Which is better ? Depends what you are trying to do ... which is good enough is a better question and usually has to be answered by personal experience. More subsampling makes for smaller storage and thus is better for space and speed. YCbCr 4:4:4 has no benefits. 4:2:2 is smaller, 4:1:1 and 4:2:0 are even smaller ... i'd say 4:1:1 is better for interlace temporally but hard to say ... RGB is 4:4:4 and actually covers more colors than the same bit depth YCbCr so it is certainlly better for available info ... but if you start with 4:1:1 YCbCr and end in 4:2:0 YCbCr ... it's debatable what you get from RGB.

Blah Blah Blah ..... :D

henryho_hk
26th October 2005, 05:42
Could I just use the Cedocida codec and set the encoder's YV12 chroma sampling to MPEG2 interlaced so during capture it is going from source straight to YV12 and 4:2:0?

DV codecs' behaviour is vastly different in different colorspace output. I have made some snapshots in the DV decoder differences - update (http://forum.doom9.org/showthread.php?t=98847) thread and I suggest you taking a look.

-------

BTW, PAL DV YV12 =/= NTSC DV YV12 =/= MPEG2 YV12. They are totally different.

-------

Thirdly, you should consider using utilities like "WinDV" to dump the DV avi to your computer. It would be a simply digital data transfer without any conversion. Afterwards, you can convert the DV AVI file to DVD.

Cedocida is also a good choice for decoding DV video.... remember to set its YV12 decoding output to MPEG2 Interlaced.