If you are editing DSLR in Vegas Studio-read this

skydragon wrote on 10/11/2012, 2:40 PM
Some (many?) Sony Vegas users have probably already figured this out...

But I've just wasted a few days trying to figure out why video from my Canon 600D (T3i) DSLR didn't seem to colour correct or export from Sony Vegas Studio 12 well - the resulting (rendered-out as H264 .mp4) finished video when played back on my PC or uploaded to Vimeo was crushed blacks/detail and blown highlights.

Why...read on below (this contains some generalisations, but you'll get my point)

A Canon EOS DSLR's video files are Computer RGB (cRGB 0-255) I use a Canon 600D but I believe the same applies to 7D, 550D, etc

When you view the .MOV clips straight from the EOS camera on a PC using windows media player etc all is well. Windows media player etc handles playback of cRGB 0-255 video correctly.

If you then load the .MOV clip into the timeline of Sony Vegas whilst using a standard default 8-bit vegas project (I don't think this applies to 32 bit projects? But these aren't the standard and I don't use them due to PC speed) the cRGB video clip is automatically converted by Sony Vegas from cRGB 0-255 into sRBG 16-235 (Studio RGB). There is no warning message or notification, his sRGB fact isn't made clear anywhere as far as I know.

So what you may ask...

Well the Sony Vegas preview monitor and the playback monitor both work as standard in cRGB colour space. So you are now viewing a sRGB video in a cRGB viewer. The end result is a dull, washed out look to someone viewing it. As a user unaware of why this is being caused, you then alter the levels and colour to correct the washed out look (wrongly as there is actually nothing 'wrong' with the video clip itself, just your viewing of it in cRGB space) and you end up applying completely wrong levels/correction as a result. Due to Sony Vegas Studio not having any meters or histograms, it makes the whole situation even more confusing.

When you then render out the Vegas timeline as a H264 video, the resulting render has the blacks/detail all wrong (amongst other things).

The workaround answer, is to apply a 'Studio RGB to Computer RGB' level correction (there is a preset) on the main Vegas preview window. Carry out all your edits, levels and corrections, in the knowledge that your preview window is now visually 'correct' and then when you have completely finished, then remove the 'Studio RGB to Computer RGB' level correction preset, just before you render out the timeline (ie. you must remove the 'Studio RGB to Computer RGB' level correction preset you previously applied to the preview monitor).

Hopefully this info will save someone else having the same hassle.

Apologies to anyone who thinks the above is obvious and to all those out there using 'proper' software with meters etc ;-)

Comments

Markk655 wrote on 10/11/2012, 8:36 PM
Sky Dragon,

Thanks for bringing it up...This applies to more than just dSLR footage. The "fix" has been mentioned often in the VMS forum. I think it musicvid brings it up every so often (see his Handbrake tutorial which covers this as well)

A nice tool in the tool box.
musicvid10 wrote on 10/11/2012, 9:55 PM
"The workaround answer, is to apply a 'Studio RGB to Computer RGB' level correction (there is a preset) on the main Vegas preview window. Carry out all your edits, levels and corrections, in the knowledge that your preview window is now visually 'correct' and then when you have completely finished, then remove the 'Studio RGB to Computer RGB' level correction preset,"

TIMTOWTDI

That quote is one way. Another way is to do all your edits with no filter on the preview, then apply the Computer->Studio RGB filter just before rendering, as fully detailed in our tutorial linked above. The advantages of our method are that none of the available chroma levels are hidden from view from having dropped off the radar (gamut), and the hard-clamped luminance output is broadcast legal, instead of being allowed to exceed the allowable broadcast levels, in addition to providing an aesthetic fit with REC 709 constraints (which either method will accomplish). We call it WYSIWYG. Our method also can be modded to accommodate hybrid levels typical of prosumer AVCHD and HDV.

The disadvantage of our method is that bit depth can be reduced slightly if care is not taken when stacking filters and effects. A person with lots of effects and little math sense may want to forego our method
skydragon wrote on 10/12/2012, 2:49 AM
Thanks for the responses and feedback, much appreciated.

musicvid - Looking through the other thread, (I think) there is a error, when related to 8-bit Vegas projects (?).

Ref>>Using today's YUV input and output codecs, the expected levels are 16-235 (RGB). Anything outside that gets clipped on playback. Unfortunately, most camcorders at their defaults shoot well outside these levels in full daylight. Most consumer/prosumer AVCHD and HDV camcorders tend to shoot 16-255, and most of the rest (DSLRs, Pocket, P&S, Phones, and Hybrid) models shoot 0-255 nominal levels. This means that clipped playback is the rule rather than the exception, without purposeful intervention at the render stage.

The quick fix for the latter is the Computer RGB->Studio RGB filter applied at the Vegas output. The quick fix for the former (AVCHD and HDV) is the same filter, but with the Output Start set at 0, as shown at 9:05 in the tutorial.<<

This is what I originally expected to happen when starting to use Vegas - in terms of we are putting a 0-255 video clip on a timeline, which has a 0-255 preview window (so we expect to get a correct view of the video) and then to ensure the codec renders the final output ok, we would have to convert to 16-235 by using a Computer RGB to Studio RGB preset, to prevent clipping during encode.

However...This isn't the case in Vegas with a 8-bit project, as far as I can tell.

Why? +++++Vegas automatically converts 0-255 AVC video (eg. from a DSLR) to 16-235 levels on the timeline, without telling a user +++++ ie. you 'think' your video clip is 0-255, but it isn't as Vegas has sneakily converted it to 16-235 ;-)

If you then added a Computer RGB to Studio RGB preset at the final render stage, you would be applying a conversion on a video timeline which is already converted to Studio RGB 16-235, meaning the levels would be completely wrong.

I think this comment only applies to 8 bit Vegas projects and that 32 bit Vegas projects do not automatically convert 0-255 AVC video clips placed on the timeline to 16-235.

Does this makes sense to you?

Thanks.

musicvid10 wrote on 10/12/2012, 10:45 AM
"Why? +++++Vegas automatically converts 0-255 AVC video (eg. from a DSLR) to 16-235 levels on the timeline,"

No, it does not. Six of us ran hundreds of hours of tests on this, and I've seen no indication that VMS 12 is any different in that regard.
The levels conversion happens in the playback decoder, only.

That statement also runs counter to your original suggestion to add a Studio->Computer RGB filter at the Preview, and then remove it before rendering. That method also works, but with some considerations as mentioned.

Remember that we had the advantage of video scopes in Vegas Pro, and all agreed the conversion happens in the player with very few exceptions, none of them having to do with Vegas' native timeline handling, which is RGB.

32-bit projects handle this differently, but I don't go there, because your AVC source is (guess what?), 8-bit 4:2:0 Y'CbCr.

BTW, despite popular jargon, your Canon DSLR footage is not AVCHD. It is AVC/h264 in a MOV wrapper. AVCHD has extensions like .mts and .mt2s.

If you would like to upload some clips or screenshots somewhere to illustrate what you're seeing, I'll be glad to look at them, even pass them on to the pros who collaborated with me on the original research.

Glad to see you are taking an interest in this.
;?)
skydragon wrote on 10/12/2012, 7:34 PM
Thanks for the guidance again.

Ok...I think I'm getting somewhere now, in terms of understanding the 'problem'.

I've just realised... that If I try to play back a .MOV video file from my Cannon 600D (t3i) on my PC using windows media player or VLC player, it plays the video levels back incorrectly, in terms of the blacks getting darkened. I presume this is down to the 0-255 range of the video being expanded by the player and the blacks (and whites?) getting clipped?

If I open and play back a .MOV video file from my 600D on my PC using Apple Quicktime player, it then plays back correctly.I don't normally use QT player, so hadn't seen this.

(As an aside if I deselect 'Use hardware YUV-RGB conversion' in VLC Player's preferences, it then also plays back the .MOV video correctly...any ideas why?)

So...now I know that I've been viewing 'darkened' video clips all the time outside of my editor, back to Sony Vegas...

If I use a 'Computer RGB to Studio RGB levels' FX applied to the Cannon .MOV clips in the Vegas Studio timeline, then the resulting H264 .mp4 output render is 100% ok and then also plays back ok in all the players on my PC. To also add, as well as having a 'Computer RGB to Studio RGB levels' FX applied to the Cannon .MOV clips in the Vegas Studio timeline, I also add a 'Studio RGB to Computer RGB to levels' FX applied to the Preview window, so that the preview window in Vegas displays the correct levels visually whilst editing - importantly this 'Studio RGB to Computer RGB to levels' FX applied to the Preview window is removed before any rendering output is carried out (it is only needed for previewing purposes)

As a 2nd test if I use Adobe Premiere Pro CS6 and put the Cannon .MOV files straight on the Premiere timeline with no FX and render them straight out H264 .mp4, then the resulting render is 100% ok and then also plays back ok in all the players on my PC

I presume that both of the above H264 output renders result in a sRGB .mp4 file which the players are happy with?

Phew...surely this shouldn't be this difficult ??!!??

The core problem was the fact that my previewing of my camera's .MOV files on my PC desktop using WMP and VLC, resulted in me believing that contrast/levels were different to what they really were...and then doubting the NLE software...

Example of what I mean in terms of video at https://vimeo.com/51237605
musicvid10 wrote on 10/12/2012, 7:57 PM
"I've just realised... that If I try to play back a .MOV video file from my Cannon 600D (t3i) on my PC using windows media player or VLC player, it plays the video levels back incorrectly, in terms of the blacks getting darkened. I presume this is down to the 0-255 range of the video being expanded by the player and the blacks (and whites?) getting clipped?"

That is exactly correct.

Your players expect 16-235 levels, and expand accordingly; whether it is needed or not.

On the other hand, Vegas doesn't differentiate between sources; whether RGB or YUV, correct levels or not, the preview is always full range, RGB.

This means that correctly shot YUV will look flat in the preview, but will display the full range of levels in your source, instead of just lopping them off. Using my method, the correction takes place just before rendering. That's why it is WYSIWYG. What you see in the preview is what you see in your player.

If this is to be more than a passing fancy for you, I suggest you look at an upgrade to Vegas Pro. The video scopes open a window on this whole process.

Here are a couple of aids I created for our tests that will help you find your way down the murky path of video leveling (right-click and "Save Link As"):
http://dl.dropbox.com/u/20519276/Shirley.png
http://dl.dropbox.com/u/20519276/dualgray1.png

Birk Binnard wrote on 10/14/2012, 12:25 PM
Good grief! This business of 0 - 255 vs 16-235 is news to me (an amateur of course.) Where can I read about why 16-235 exists and what to do about it. Do I need to care about it? It seems like I do.

My video is AVCHD (.mts files) from a GH1 and I find I am frequently changing highlights/shadows in post. Is this because of 16-235? Where did those extra bits go? And why did they go there? And...how can I get them back?
musicvid10 wrote on 10/14/2012, 4:40 PM
Our tutorial is linked seven posts up.
It was written especially for Vegas Movie Studio users.
Birk Binnard wrote on 10/14/2012, 7:55 PM
I did go through both of your tutorials and found them quite helpful. Thanks for the nice work. In my case I show my videos on an HD LCD 42" TV and do not upload them to any of the social media sites. I also have Vegas MS, so I don't have the Video Scopes tool.

I must say that the Scopes tool looks like it would be very helpful. But since I don't have it are you suggesting I should put the Levels FX filter on every clip and set it to Studio RGB to Computer RGB? The is easy enough to do of course, but is it the right thing to do?

I've been looking for some info that explains whether my GH1 outputs 0 - 255 or 16-235 AVCHD video, but so far haven't found anyplace that mentions that.

It seems to me that if the video from the camera is 0 - 255 then I should not have to apply the Levels filter at all.
musicvid10 wrote on 10/14/2012, 8:00 PM
"are you suggesting I should put the Levels FX filter on every clip and set it to Studio RGB to Computer RGB? "

No.

1. Edit in Vegas to suit your taste with no corrective levels filters in the chain.
2. Employ the Computer->Studio RGB filter to the Output (the FX button at the top of the Preview) just before rendering. Do not use the Studio->Computer RGB filter.

Your GH1 shoots AVCHD, probably 16-255, so see the mod at 9:05 in the tutorial.

That's it. No muss, no fuss.
"It seems to me that if the video from the camera is 0 - 255 then I should not have to apply the Levels filter at all. "

No. It seems you have it completely backwards. Follow the applicable parts of the video tutorial step-by-step and you can do no wrong. The method we developed is failsafe for VMS users.



D7K wrote on 10/15/2012, 12:25 PM
Can't you just use curves to clip the high & Lows? Perhaps I have too much photoshop brain. Also since CS6 does video, could you just clip the curves there as you get a value read out?
Birk Binnard wrote on 10/15/2012, 1:40 PM
Now that I've got an understanding of what's going on here the simplest solution seems to be what was previously suggested - just edit as usual and then, just before rendering, use the global (for lack of a better term) Computer RGB -> Studio RGB filter. Doing this is just one click before hitting the Render button and this truly is "no mess no fuss."

Messing with curves is an interesting suggestion, but would surely take more time than clicking on a single filter selection.
musicvid10 wrote on 10/15/2012, 4:13 PM
Yep, welcome to the enlightened few.
musicvid10 wrote on 10/15/2012, 4:20 PM
"Can't you just use curves to clip the high & Lows?"

Without scopes in VMS, how are you going to know where the I/O points should be?
Curves don't have any numeric readout that I'm aware of.
D7K wrote on 10/16/2012, 12:44 PM
In CS6 I can get the read outs. Where is that FX control? I don't see it in MS12/64 bit in the menu bar above the preview window.
D7K wrote on 10/16/2012, 12:55 PM
I think I've found an error in the broadcast color FX - at the bottom where it says studio RGB (16 to 135) it should say 235, is that the FX I should use? in the help file it says the conversion is 16-235, so its probably just a typo in the description. But is this the one click fix for Movie studio?