Log in

View Full Version : Why change colorspace to RGB for tmpg?


tuco
6th December 2002, 01:44
I was wondering because I found that I can change the colorspace in the options (Enviromental->general) to yuv. If I am recording in yuv2, is that the same as yuv? I did a search but couldn't get a solid answer about this.

scmccarthy
6th December 2002, 06:50
Yes, go ahead, knock yourself out. Try it and see if it works.

Stephen

tuco
6th December 2002, 14:21
To be honest, I couldn't really tell the difference enabling this setting than not having that setting on. I tried using RGB32() at the end of my scripts before but the picture didn't turn out good. I guess my real question is, how do you know if there was a colorspace mismatch? What in the picture would lead you to believe that?

WarpEnterprises
6th December 2002, 14:47
Ain't those settings for the Canopus DV Codec only?

tuco
6th December 2002, 14:55
Originally posted by WarpEnterprises
Ain't those settings for the Canopus DV Codec only?

I think you are right, I will check when I get back to my apartment. That is probably why I couldn't see a difference.

Abond
6th December 2002, 15:27
I think TMPG need RGB24 (not RGB32)

scmccarthy
6th December 2002, 16:19
First, the difference between any YUV color space and RGB cn't be missed. If TMPG needs RGB24 and you feed it YUV and it looks fine, TMPG must be getting RGB.

Second, I don't know anything about Canobus DV, but that or something else must be making the conversion to RGB for you. If it works, don't let AviSynth make the conversion. Color Space conversions can happen silently inside other programs or codecs unannounced. For instance, when AviSynth 2.5 changed color spaces, VirtualDub kept translating the space back to YUY2 automatically.

Usually, that kind of default behavior can work for you rather than against you. So, if it is working, leave the color space conversions alone.

Stephen

Wilbert
6th December 2002, 16:33
Second, I don't know anything about Canopus DV, but that or something else must be making the conversion to RGB for you.
Firstly I don't know what is so special about Canopus DV (why does TMPGEnc have this setting?). Secondly, normally Huffyuv (DivX5 can do it also) is doing the decompression for you when feeding TMPGEnc an YUY2 clip.

If it works, don't let AviSynth make the conversion.
Why? Of course if it works, ... it works. But AviSynth can do the conversions correctly.

Color Space conversions can happen silently inside other programs or codecs unannounced. For instance, when AviSynth 2.5 changed color spaces, VirtualDub kept translating the space back to YUY2 automatically.
Yes (at least if you have DivX5 or a recent Xvid built of Koepi installed).

But that doesn't matter, otherwise the conversion is done in mpeg2dec. Of course this doesn't happen if you use mpeg2dec3_YV12 and VirtualdubMod.

tuco
6th December 2002, 16:34
Originally posted by scmccarthy
First, the difference between any YUV color space and RGB cn't be missed. If TMPG needs RGB24 and you feed it YUV and it looks fine, TMPG must be getting RGB.

Second, I don't know anything about Canobus DV, but that or something else must be making the conversion to RGB for you. If it works, don't let AviSynth make the conversion. Color Space conversions can happen silently inside other programs or codecs unannounced. For instance, when AviSynth 2.5 changed color spaces, VirtualDub kept translating the space back to YUY2 automatically.

Usually, that kind of default behavior can work for you rather than against you. So, if it is working, leave the color space conversions alone.

Stephen

Okay, that seems to make sense. I always thought that colorspace conversion if done wrong would look horrible but I never had a problem with tmpg and none of the post I have read here has ever explain why using avisynth and tmpgenc needs the colorspace conversion at the end of the file.

tuco
6th December 2002, 16:36
Originally posted by Wilbert
Firstly I don't know what is so special about Canopus DV (why does TMPGEnc have this setting?). Secondly, normally Huffyuv (DivX5 can do it also) is doing the decompression for you when feeding TMPGEnc an YUY2 clip.


Why? Of course if it works, ... it works. But AviSynth can do the conversions correctly.


Yes (at least if you have DivX5 or a recent Xvid built of Koepi installed).

But that doesn't matter, otherwise the conversion is done in mpeg2dec. Of course this doesn't happen if you use mpeg2dec3_YV12 and VirtualdubMod.

Okay, I will try and compare and see if I notice any changes.

scmccarthy
6th December 2002, 20:00
@Wilbert

Secondly, normally Huffyuv (DivX5 can do it also) is doing the decompression for you when feeding TMPGEnc an YUY2 clip.

Then maybe that is the answer. Maybe HuffYUV is doing the conversion. My point is if feeding a YUY2 clip to TMPG works and TMPG only takes RGB24, then something is doing the conversion for him.

So the only concern here is whether adding a ConvertToRGB24() at the end of the script would improve the quality of the encode. I say it might degrade, or it might be exactly the same quality, but it won't improve it.

Stephen

WarpEnterprises
7th December 2002, 21:31
It won't ever degrade because RGB is fed unconverted to TMPG, so it's the "reference" way because YUY get's converted by some codec (and you don't even know exactly which).
The only disadvantage could be a slight loss in speed.

scmccarthy
7th December 2002, 22:16
It won't degrade unless it gets converted back to YUY2 and then converted back to RGB when it gets handed over to TMPG. It does not matter how or when it gets converted to RGB as long as it gets converted only once. Color space conversions happen silently, so you never know for sure. Maybe there is a speed improvement using AviSynth to do it, but I don't see any other advantage.

Stephen

scmccarthy
7th December 2002, 22:20
OK, so you are saying there is a speed loss, but at least you know who is doing the conversion and that AviSynth does it right. My only concern is that sometimes RGB24 gets reported as buggy even when RGB32 works fine.

Stephen