RGB to Studio RGB - confusion reigns.... at DVinfo.net
DV Info Net

Go Back   DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...
Register FAQ Today's Posts Buyer's Guides

What Happens in Vegas...
...stays in Vegas! This PC-based editing app is a safe bet with these tips.

Reply
 
Thread Tools Search this Thread
Old July 29th, 2011, 04:58 PM   #1
Major Player
 
Join Date: Apr 2010
Location: London
Posts: 410
RGB to Studio RGB - confusion reigns....

can someone please give me an explanation of this?
I've read countless topics but am still confused.
I burnt a bluray of my project and the colours on my LCD tv turn out to be too dark and saturated, and the blacks too "strong" - the night scenes are particularly bad as the blacks seem to "jump" (for lack of a better expression)

do I need to apply the computer RGB to Studio RGB to make colors right, before rendering?
is this the solution? or do I apply Studio to Computer RGB and apply the necessary color changes and thenremove the filter before rendering?

thanks for your help
Federico
Federico Perale is offline   Reply With Quote
Old July 29th, 2011, 06:02 PM   #2
Trustee
 
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
Re: RGB to Studio RGB - confusion reigns....

Quote:
Originally Posted by Federico Perale View Post
do I need to apply the computer RGB to Studio RGB to make colors right, before rendering?
is this the solution?
Possibly, though as suggested in yesterday’s webinar, you should just apply that filter to the Video Output FX (i.e., to the preview screen), so it applies as the last filter after all other filters, and so you can easily remove it if you need to render for some other purpose than a TV.


Quote:
Originally Posted by Federico Perale View Post
or do I apply Studio to Computer RGB and apply the necessary color changes and thenremove the filter before rendering?
No. If your media is in studio format, you do need to apply the studio to computer RGB because all color grading math (and math is what it is) works in linear 0.0-1.0 space. But do not remove that filter before rendering. Instead, apply the computer RGB to studio filter before rendering as mentioned above (if needed).

Additionally, if your media was shot with a gamma, you should apply a filter that removes the gamma at the beginning (so you work in the linear space). And for video (such as BD) you probably need to add a correct gamma filter at the end of the chain, right before the computer RGB to studio conversion.

The gamma conversion may be more important than the studio conversion with a BD.
Adam Stanislav is offline   Reply With Quote
Old July 30th, 2011, 03:48 AM   #3
Major Player
 
Join Date: Apr 2010
Location: London
Posts: 410
Re: RGB to Studio RGB - confusion reigns....

Quote:
Originally Posted by Adam Stanislav View Post
Possibly, though as suggested in yesterday’s webinar, you should just apply that filter to the Video Output FX (i.e., to the preview screen), so it applies as the last filter after all other filters, and so you can easily remove it if you need to render for some other purpose than a TV.




No. If your media is in studio format, you do need to apply the studio to computer RGB because all color grading math (and math is what it is) works in linear 0.0-1.0 space. But do not remove that filter before rendering. Instead, apply the computer RGB to studio filter before rendering as mentioned above (if needed).

Additionally, if your media was shot with a gamma, you should apply a filter that removes the gamma at the beginning (so you work in the linear space). And for video (such as BD) you probably need to add a correct gamma filter at the end of the chain, right before the computer RGB to studio conversion.

The gamma conversion may be more important than the studio conversion with a BD.
when you say "if your media is in studio format"... what does this mean? I shoot with a canon 5D, edit in Vegas to output in BD.
does this mean my media is in Studio format? and if so I instead need to use the other Studio to computer filter? this will make my footage look even more dark and saturated
I am not sure I understand the second part of your reply...

the reason for the question in the second part of my original post is that I see some people apply these filters to match the preview to the output, but then remove them

see this post below from a recent thread called "shooting from mark II 5D"

"....Note for you CIneform/Vegas users. In order to get a near approximation of what you rendered output will look like, it is important to select the color correction filter in the Preview window while you edit, and set the color correct fitler to Vegas RGtocomputer preset. Then at time you render, you need to turn it off, or your render will be much contrastier and darker than your preview..."

still a bit confused....
thanks again
Federico Perale is offline   Reply With Quote
Old July 30th, 2011, 08:24 AM   #4
Regular Crew
 
Join Date: Mar 2007
Location: Vancouver, Canada
Posts: 146
Re: RGB to Studio RGB - confusion reigns....

when you say "if your media is in studio format"... what does this mean?

---

this is Sony-speak.Whenever a Vegas user says "studio" they mean television colorspace. Y'UV, YUV, YCbCr, YPbP. etc, etc, etc. As in "not RGB colorspace".

Filter-wise in Vegas, it means pixel values are ranged from 016-235 rather than 000-255.

regarding Canon 5D, it's working in YCbCr (in Vegas-speak, Studio RGB). If you're monitoring with a television and all the footage you're using is from the Canon, the only thing to watch for is content made on a computer (title cards, lower thirds, etc). These will be in RGB colorspace (Vegas-speak, "Computer RGB")... for this footage, i'd suggest putting it on a separate track with a "Computer RGB" to "Studio RGB".

this'll maintain consistent colorspace throughout your project.
Rob Wood is offline   Reply With Quote
Old July 30th, 2011, 08:55 AM   #5
Trustee
 
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
Re: RGB to Studio RGB - confusion reigns....

I was going to answer I did not know whether Canon 5D shoots in studio or computer RGB, then I remembered I took some sample video clips with my new Canon 5D Mk II. I have just opened those clips in Vegas and judging by their histograms, waveforms and RGB parade, they seem to use the full 0-255 scale of the computer RGB.

Based on that, I would not convert them from studio to RGB at the beginning of the filtering process.

But for the rendering for BD, I would certainly at least try adding the computer-to-studio filter at the end of the chain and would then check if the final output on a TV looks better that way.

The thing is, it was an unbreakable rule that to show something on TV, you had to convert computer RGB to studio because that was what every TV set (at least in America) expected. But with the recent transition to HDTV, people may be watching your BD using an old TV, or a new TV, or a computer monitor, and may have their systems configured correctly or incorrectly.

So, personally, I do not know what to say other than test it and see. But when in doubt, I would apply the computer-to-studio filter at the end of the filter chain because studio RGB looks better on a computer monitor than computer RGB on a TV monitor.
Adam Stanislav is offline   Reply With Quote
Old July 30th, 2011, 09:02 AM   #6
Trustee
 
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
Re: RGB to Studio RGB - confusion reigns....

Quote:
Originally Posted by Rob Wood View Post
regarding Canon 5D, it's working in YCbCr (in Vegas-speak, Studio RGB).
As mentioned above, I looked at some footage in Vegas and it used the full 0-255 range judging by the histogram and such. Does that mean the codec does a silent conversion from studio to computer RGB (in Vegas speak)?
Adam Stanislav is offline   Reply With Quote
Old July 30th, 2011, 09:19 AM   #7
Regular Crew
 
Join Date: Mar 2007
Location: Vancouver, Canada
Posts: 146
Re: RGB to Studio RGB - confusion reigns....

^^ yes. thx Adam for catching that.

I did a double-check after posting; Canon's 5D uses "Canon full range 8 bit YCbCr values" (0-255); i was assuming it'd return 016-235 values; not correct.

So in this case, if you're monitoring with a television place a "Computer RGB to Studio RGB" filter on preview/output... this'll scale the footage on your timeline from 000-255 luma values to 016-235, which means it'll display correctly on your tv.

And when you render to BluRay, leave this filter on as BD expects values of 016-235 also.
Rob Wood is offline   Reply With Quote
Old July 30th, 2011, 09:24 AM   #8
Major Player
 
Join Date: Apr 2010
Location: London
Posts: 410
Re: RGB to Studio RGB - confusion reigns....

thanks
just did exactly that and it worked great.

I also used the MainConcept MPEG2 as it seems to give better results than Sony AVC
Federico Perale is offline   Reply With Quote
Old July 30th, 2011, 09:34 AM   #9
Regular Crew
 
Join Date: Mar 2007
Location: Vancouver, Canada
Posts: 146
Re: RGB to Studio RGB - confusion reigns....

"I also used the MainConcept MPEG2 as it seems to give better results than Sony AVC "

yeh, i had similar results making BD's at 1280x720@24p... so far mpeg-2 works better for me.

this might change when i eventually shift to 1080p but for now all is good.
Rob Wood is offline   Reply With Quote
Old July 30th, 2011, 11:04 AM   #10
Major Player
 
Join Date: Feb 2010
Location: London
Posts: 302
Re: RGB to Studio RGB - confusion reigns....

Hi

I've got footage from a Panasonic HD camcorder (SD900).

I don't use this with any Studio/Computer filters, should I be, it is very confusing.

When the footage is being previewed on a second computer monitor it's a bit washed out (blacks are lighter, whites are not as bright and contrast slightly reduced), to correct this I set the preview to use 16-235 and it then looks identical to watching the original file in Windows Media Player. This setting as I understand it will to be making no difference to the final output, it's just a monitor adjustment.

So if I render direct to MPEG2 or AVC with no Studio/Computer filters, the output file when played is identical to the original footage colour/brightness wise.

So reading here I check my scopes and the video has RGB values ranging from 0 up to 255, so Computer RGB? Following the advice here then I should be adding a Computer to Studio filter, when I do that the output goes back to being washed out like it does without having the 16-235 setting checked on the preview.

If I add a Studio to Computer filter (which appears the opposite to what I should be doing), the preview is now too dark. If I uncheck the 16-235 on the preview, it becomes the same as when no filter is applied and 16-235 is checked.

Testing renders, the same applies, it is either darker or lighter than the original.

So to get matching output to MPEG2/AVC as the original file looks (which does look good on the black and white levels) I must not use any filters. Why are filters not required in my case?

My other work flow is to output to Lagarith then use x264 to encode. When I do this without using any filters, the RGB Lagarith output is too light (blacks washed out, whites less white), so as it goes through AVISynth I tell it to do a colour conversion from RGB to YV12 using the PC.709 setting which is "Use Rec.709 coefficients, keep full range", this returns it to the same as the original files and it looks right. I can see now that I can add a Studio RGB to Computer RGB as I output to Lagarith, which gives me the correct output on Lagarith when playing it on the computer, which matches the original files and so when I run it through AVSynth to x264 I can use the Rec.709 coefficent setting. Probably just giving me the exact same thing.

So I suppose my question is, why is it my footage seems to want the opposite filters, but when rendering to internal encoders in Sony Vegas for AVC/MPEG2 it is correct without any filters? Is the resulting output right for Blu-ray, it looks okay on my player/TV but it might not play back correctly for someone else is what I'm reading here.

When I've played a raw .mts file and one that has gone through Sony Vegas via Lagarith->AVISynth PC.709 to correct the levels to x264 on Blu-ray, they have identical levels.

It's all very confusing.

Regards

Phil
Phil Lee is offline   Reply With Quote
Old July 30th, 2011, 12:28 PM   #11
Trustee
 
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
Re: RGB to Studio RGB - confusion reigns....

Quote:
Originally Posted by Phil Lee View Post
It's all very confusing.
Well, sadly, yes. But it can un-confused if you think of editing as if done in three separate steps.

For whatever reasons, when digital video was first created, the creators of the Y-Cr-Cb standard decided to limit it to the 16-235 range, as opposed to the full 0-255 range possible when dealing with 8-bit RGB channels (i.e., red, green, blue). As far as I know, this was done to allow storing non-video information in the extra values for compatibility with analog television. My background in computer programming finds it strange, but it makes (or made) sense for TV engineers. Whatever the reasoning, we are still stuck with it.

This brings us to the first of the three steps I mentioned, your source media. If it comes from a video camera, chances are it is in the 16-235 range, even after it is converted from Y-Cr-Cb to RGB. That is, usually, because some codecs will transparently convert it to the 0-255 RGB range. Such codecs are best avoided when editing because you want to control everything yourself for best results. The 16-235 range is what Vegas calls studio RGB. Additionally, the data will usually have a gamma applied, so it is non-linear (just as our human vision is non-linear).

On the other hand, if the image, or image sequence, was generated by a computer, you can be almost certain it is in the 0-255 RGB range (that includes the text and the various color backgrounds created by Sony Vegas). This is what Vegas calls computer RGB. Also, if it was scanned from film, it is probably computer RGB. If it comes from a photo camera (such as the 5D MkII), chances are it is in computer RGB.

Now, step two is editing, applying color grading filters, transitions, special effects, etc. This is mostly pure math (internally within the software, that is). This can be done in the 8-bit mode (0-255) or the 32-bit mode (0.0-1.0). Even when done in the 8-bit mode, many filters will convert everything internally to the 32-bit mode because the 0.0-1.0 scale is ideal for many math functions. For example, squaring a value between 0.0 and 1.0 will give a result in the same range of 0.0 - 1.0. Either way, it expects the data to be in the full range and it expects it to be linear.

The third step is your output media, which is typically a video file and in most cases requires a gamma to make it non-linear and is normally output in the 16-235 range. That is what DVD expects, that is what BD expects, that is even what YouTube expects (well, not so much YouTube as the video player inside a web browser does).

So, when you split it in your mind into these three steps, the first thing you need to know is what format your source media is. And if it comes from different sources, it may be in different formats. You need to consult your camera manual or ask in a forum specific to your camera (since someone there is likely to know the answer).

Then, still in the first step, if your media is in computer RGB with no gamma applied, just use it as is. If it is in studio RGB, add a filter to convert it to computer RGB. And if it has a gamma applied, add a filter to reverse it to linear RGB (after you convert it from studio to computer). One of the nice things about Vegas is that you can apply filters at different places. For this step one, you should apply these filters by right clicking on the media in the Project Media window and selecting Media FX... You may have to do it separately for different media files, depending on what format they are. But at the end of step one, all of your media should be normalized to linear computer RGB.

In step two, you just add the media to your tracks (possibly via the trimmer, depending on personal preferences). Everything is linear there (and preferably set for 32 bits so individual filters do not have to convert between 8 and 32 bits, and to avoid round-off errors from filter to filter). You can apply whatever FX you want whether on the track level or event level. But do not convert between studio and computer RGB at this step.

In step three, you typically need to apply a gamma appropriate for your output file and probably convert from computer to studio (and if you are not sure, it is safer to do the conversion here since most video players expect it that way). This applies to the project as a whole, so you should click the Video Output FX... button near the left end of the buttons located above the preview window, and add those filters there. And you might only want to do that after you have finished editing your project so it does not affect what you see on your computer monitor (but if you are using a professional grade broadcast monitor, then you may want to add it there early in the process since your monitor will expect that).

Doing it at these three separate places will apply all effects correctly to the correct type of images and will give you the correct video output. It also greatly simplifies the whole process since you only have to worry about the confusing stuff in small and separate compartments, and you can spend most of your effort in step two, editing, without worrying about the technical issues of video formats and human vision.

By the way, thanks for asking the question. Writing this has helped me as well, since now I have put into words what I have been doing intuitively up till now. :)
Adam Stanislav is offline   Reply With Quote
Old July 30th, 2011, 02:44 PM   #12
Major Player
 
Join Date: Feb 2010
Location: London
Posts: 302
Re: RGB to Studio RGB - confusion reigns....

Hi

That kind of makes sense but in practice it seems to give no advantages.

So from what you have said:

1) Clips on the timeline from typical HD cameras capturing 16-235 need a Studio to Computer RGB level change to bring them to 0-255.
2) Everything on the timeline is treated as 0-255.
3) On output for Blu-ray add a filter to video output for Computer RGB to Studio RGB to convert the levels back to 16-235.

So I tried the above. With the filter on the clip for changing to Computer RGB I don't need the 16-235 option checked anymore for the preview monitor, that makes sense as the levels are computer levels.

I added a title with white at 255.

I then added a Computer to Studio RGB on the output and rendered as MPEG2 HD for Blu-ray.

So what I got was as I expected, levels appeared correct. When I sampled the 255 white title, it was around 253 to 254.

I did the same again with no level filters and the output looks as expected. This time when I colour picked the title it was 255 spot on.

I would have thought on the first one with the level changes the white titles at 255 should have become 235, yet they shifted slightly to 253-254.

So still confused as to what is going on. Adding the filters seem to have made the levels less accurate while not bringing it into the 16-235 range.

Regards

Phil
Phil Lee is offline   Reply With Quote
Old July 30th, 2011, 09:49 PM   #13
Trustee
 
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
Re: RGB to Studio RGB - confusion reigns....

When you play the BD on a computer, the player will stretch the 16-235 into the 0-255 expected by the computer.

When you play it on a TV, the player will not stretch it, as the TV expects it in the 16-235 range. The TV monitor is built to display 16 as black and 235 as white. So, effectively, the TV hardware stretches it.

If you did not filter it from computer RGB to the studio range, the TV would show everything between 0 and 16 as black, everything between 235 and 255 as white and stretch everything in-between. So you would lose contrast in the middle and completely flatten the highlights and the shadows.

If you do filter computer to studio but your player does not stretch it, you lose a little contrast but do not lose any details. It does not look perfect but it looks a lot better than if you do not convert and the player stretches it as discussed in the previous paragraph. At any rate, the player is supposed to stretch it.

Computer video cards are often configured (I know my nVidia is) to automatically stretch any video from studio to computer RGB before sending it to the monitor, and not stretch anything else (i.e., the output of standard Windows software). Some computer monitors also can be configured to expect video levels, so they can be hooked up to the HDMI output of a DVD or BD player.

Last but not least, Sony Vegas vectorscope can be configured for the studio range, so it shows 235 as fully white and 16 as fully black.

Any of that may give the impression that the computer to studio filter is not working properly, when it actually is.
Adam Stanislav is offline   Reply With Quote
Old July 31st, 2011, 01:35 AM   #14
Major Player
 
Join Date: Feb 2010
Location: London
Posts: 302
Re: RGB to Studio RGB - confusion reigns....

Hi

Thanks, that does make sense, I did wonder if conversion was happening on the computer.

But still to add more questions, I found an article that explains that HD video decodes to Studio RGB and nothing is needed to be done to it, and if you add an image that decodes to Computer RGB you need to add a Computer to Studio level change.

When encoding, some codecs want to see Studio RGB and some want to see Computer RGB. MPEG2 and AVC expect Studio RGB which is why my outputs direct from Vegas to these have correct levels without ever using any Studio/Computer filters. Any images I've used on the timeline I've never used a filter on them so these must have wrong levels, but I've not actually noticed anything looking odd.

The Lagarith encoder seems to require Computer RGB levels but without a filter in Vegas it gets Studio RGB levels, this explains the wrong levels when I export this way requiring me to tell AVISynth to do a conversion of levels as it moves from RGB to YV12. I'm thinking the final output is exactly the same regardless where that conversion takes place, so it makes little difference if I add a Studio to RGB filter in Sony Vegas or change it later using AVISynth when exporting to Lagarith.

The above doesn't apply if you change to a 32bit full level project according to the article, then Sony Vegas and some codecs start working in Computer RGB mode. This explains to me why levels are correct if I export to Lagarith with the project set to 32bit full video range, as it now gets Computer RGB.

So if I have this correct from reading the article and what is discussed here then if I predominantly use clips that are Studio RGB, I don't need to apply a level change to the clips, but if I add something to the time line that decodes to Computer RGB, such as an image, I should ideally apply a Computer to Studio RGB filter, this keeps everything on the timeline at the same level. If on the other hand I predominately have images on the timeline that decode to Computer RGB, I can do the opposite, and keep the timeline as Computer RGB, and should I add a video clip that is Studio RGB, convert that to Computer RGB.

On outputting, if my timeline is Studio RGB and using the MPEG2 or AVC codecs in Vegas, I don't need to add a filter as they expect Studio RGB. If my timeline is Computer RGB, I would need to add a Computer RGB to Studio RGB filter if going to those same codecs.

When outputting to Lagarith with a Studio RGB timeline, I need to add a Studio RGB to Computer RGB filter for correct levels, or deal with that later.

So from what I understand the important bits are to keep all footage on the timeline at the same levels, and the best level is the one that most footage is in by default?

When exporting it depends on where it's going and what it is on the timeline if a shift of levels is required.

I think it is making more sense now.

The article is here Color spaces and levels in Sony Vegas 9 and 10

Regards

Phil
Phil Lee is offline   Reply With Quote
Old July 31st, 2011, 04:44 AM   #15
Regular Crew
 
Join Date: Aug 2010
Location: Wilmington, DE
Posts: 129
Re: RGB to Studio RGB - confusion reigns....

This might help: HD Video for the Web - Guide for Vegas Users

...Jerry
Jerry Amende is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...


 



All times are GMT -6. The time now is 11:30 PM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network