Vegas video levels - debate possible changes


musicvid10 wrote on 4/26/2014, 11:53 AM
No, the correct audio analogy is encoding analog VU levels to >=0 dBFS.
IOW, clipping and distortion.
Digital always comes with a hard ceiling.
paul_w wrote on 4/26/2014, 11:56 AM
Yes, limiters with hard clip do exactly that.

musicvid10 wrote on 4/26/2014, 12:04 PM
No, limiters do not distort.
Marco. wrote on 4/26/2014, 12:43 PM
What BT. 709 says is: When analog video is transfered into the digital domain reference white is set at level 235 and reference black is set at level 16. Reference black and white does not equal peak levels.
Also BT. 709 says: Video data is allowed in the range of level 1 - 254 and any system and codec which works according to BT. 709 must be capable of carry this data through.

Vegas does a pretty good job supporting BT. 709. I wish it would now target Rec. 2020.
paul_w wrote on 4/26/2014, 12:53 PM
I dont see why a video clamp could not have the same 'gain riding' properties as a audio limiter with its hard ceiling (s) as 16-235, remember its not just its upper limits, its lower too . I guess thats an option worth exploring in the debate. Rather than a hard clip which yes, if you feed it media out of limits it would simply chop it off. Which also has the negative effect of chopping off chroma information too beyond that limit, which is allowed excursion beyond legal limits to a degree.

My own plugin is current extremely basic, its just a simple clamp all which works in 8bit and float video spaces. However, with more time, that could be developed further to include hard and soft clamping with allowance for chroma. Not a bad idea really. But using it as it is, its cured all my illegal levels and my renders always play correct with either vimeo, youtube, dvd or bluray. It just works. So for me at least, its a fix. Not that i am suggesting this IS the ONLY fix, but i thought it worth considering in the debate and for Chris, who has asked us for feedback on the matter.

And with that, i think i posted enough already today...
tim-evans wrote on 4/26/2014, 1:23 PM
Before I understood this problem I made dozens of videos with illegal levels. It took me a while and this forum to understand why I was losing detail in the whites on my still images.

Tens of thousands of videos made using Vegas must have illegal levels. That Vegas is now in version 13 and still has made no attempt to address this, in my opinion is a disgrace. That their programmers admit they weren't even aware of it is bizarre. Does anyone within SCS actually edit video and make product?

Regardless of the technicalities I think users should have an expectation that if they are working with material having legal 16-235 levels and add a simple fade in and fade out (using a composite level envelope) and render out, the final product should be REC 709 compliant with no more work done on their part (such as putting a legal black track underneath).

Please -- I understand why this produces incorrect results -- but that thousands fall into this mistake needs some attention from SCS.

I like the idea of a simple check box. Composite ready or Video ready.
larry-peter wrote on 4/26/2014, 1:47 PM
If SCS can make everyone happy with options, but still allow the current workflow, I don't care what they do. It really boils down to having such a wide user base, doing widely varying kinds of video from different sources, for different uses and not wanting to thoroughly learn video and how to control it. I accept that's the emerging mindset of the times.

I DO want control.
NormanPCN wrote on 4/26/2014, 3:36 PM
Nothing I have proposed would change anything with regards to control. No proposal would cause Vegas to tweak your video data in any way. The one exception here is the display of data on a full range video device. The preview window should have the same option the "preview device" currently has.

Really, want I am trying to debate is how can it be made easier (less clicks, typing) to conform to video levels. As Vegas sits right now everything is full range and you have to click, adjust with effects to get this.

Declaring video levels could be as simple as, 8-bit (full range), 8-bit (video levels), 32-bit (full range), 32-bit (video levels). A simple addition to an existing preference. Or some other way. Does not matter.

Such a declaration would not alter your data in any way, except as necessary when painting to a display device.

If I have used the video scopes and have a perfect video levels setup, the vegas preview window will be wrong. It will be flat. I have to add an output fx to correct this and remember to take it off. More clicks, Vegas could help us here, and you know I have rendered and then went to watch on my TV and I forgot to take the output fx off and had to go back and render again. A simple change in Vegas can avoid this.

What could the declaration mean and how could to make things easier and faster, and OBVIOUS, to stay in conformance. Take the media generators. We all have text at least. In current Vegas all media generators currently default to illegal video levels. A video levels "declaration" could clamp these to legal default values. The color picker dialogs would have a color levels check box, defaulted to your project/system declaration, and restrict your selection of a color to only legal color levels (when checked). You can alway uncheck and get anything you want.

I am a technical person by education (Physics) and profession (software developer (compilers, SDKs) ) so technical details are easy for me to understand.

Lets consider legal color values. The 16-235 thing is RGB. In YUV cjhroma is 16-240. Vegas uses 0-1.0 for color. Okay so what is the legal numeric color range for RGB, HSL and LAB? 235 goes to 0.92 in the RGB model, but is 0.92 legal for HSL. What is the average user to do? Does Vegas have any documentation of color values in relation to legal ranges...NO. Why should we have to compute this ourselves. Vegas should help us trivially in the color picker dialog.

Okay so we all like and want control. Vegas gives us NO control over the black value given to 100% transparent pixels. Note that when you draw to a display device alpha is gone, when you render to damn near everything the alpha is gone. I think Quicktime, a image sequences are the only thing that can preserve Alpha and only in specific codecs. Our common MPEG-2 and AVC output is alphaless and has a very real black color in the data stream where in the vegas timeline those pixels might be 100% transparent.

The only *control* Vegas gives us here is to never have a transparent pixel on your timeline by placing a solid color media generator under everything with a legal black value. More clicking and tweaking around where with a simple preference this can be handled automatically. Broadcast colors fx on output fx will never conform transparent, and logically it should not. There are a few formats you can output to that preserve Alpha. How many people out there put white text on a black background, but their "black" is actually 100% alpha since that is what the Vegas text generators default to.

Getting the video stream into conformance is always going to be done with video scopes. Even perfect camera video in conformance will can go out when you adjust contrast, saturation and such.

Vegas could and should have some help documentation on video levels conformance and the types of steps you typically need to take. We developers all know that users never RTFM (read the F(ine) manual) but you gotta have it anyway. This is where a setup wizard could be very useful. It could scan user video, ask the user what their intended output targets are and make suggestions for proper application/project setup based on those input and output parameters. Experts ignore the wizard. Users will run a wizard at least once. The wizard can hyperlink to help documentation. Users will skip wizards once they have learned what is what.

Less clicking and farting around. Software can help and make us more efficient and still not take control away from us and it need not have an insane number of preferences to accomplish this.
VidMus wrote on 4/26/2014, 8:29 PM
musicvid10 said, "IRE [0,100] corresponds to 16-235 RGB luminance (Y')."

In the USA it is IRE [7.5,100] that corresponds to 16-235 RGB luminance (Y'). I know that in some other nations it is IRE [0,100] that corresponds to 16-235 RGB luminance (Y').

As a suggestion, the project settings could have something that when one checks it Vegas will start all new project with a 10 second black track which can be changed to match the project length. Unchecked, and Vegas will start all new projects as it does now.

Former user wrote on 4/26/2014, 8:49 PM
How Final Cut deals with it.
NormanPCN wrote on 4/26/2014, 10:30 PM
That Final Cut article points out one of the Vegas levels problems that commonly happen.

Final Cut will/can normalize an imported Still image to video levels. Anything from a still camera is always full range. In Vegas they put their still on the timeline. Render an AVC/MP4 or mpeg-2 format and watch the video. The still is trashed because the video player expands the 16-235 range to 0-255 and the still was never compressed from 0-255 to 16-235.

Vegas could have a feature, optional of course, to normalize still images to video levels.

As I stated earlier, something like this thing with stills can be extended to the newer AVC cameras (DSLRs, GoPro) that output full range AVC streams. It is the same concept as stills. Known full range input, normalized to video levels, optionally of course.

Stills and DSLRs are the common sources for levels problems questions in online forums that I have seen.

I have tried to get the mediaInfo developer to add dumping of the AVC VUI full range flag when present. He asked if I had a file with the flag. I sent him files from my Canon DSLR and GoPro and he saw the flag. If we had this then we can unambiguously detect what an AVC output camera declares its output to be. I may have to try submitting a patch, if I can find the VUI specs and such. Vegas can dump this flag in the media properties dialog. HINT HINT

I don't claim to know the exact definition of the VUI parameter, but Canon, Nikon and others are setting it to true, and they output full range data. They all seem to be using it a certain way and AVC decoders are interpreting it that way. The open source ffmpeg/libav decoders understand this flag.
VidMus wrote on 4/26/2014, 10:34 PM
"Vegas could have a feature, optional of course, to normalize still images to video levels."

Sony Levels from Computer RGB to Studio RGB.

NormanPCN wrote on 4/26/2014, 10:43 PM
Sony Levels from Computer RGB to Studio RGB.

Well, yes of course. I never said it cannot be done. It is just a lot of clicking where other systems have mechanisms to reduce the manual labor.

If I bring in 300 stills then, add the effect to 300 events? No that would be a pain. Okay use a special track for stills and use a track fx to adjust all at once. That works with minimal effort. Oops, now what if I want a transition from that still with a video, and the video does not want the levels adjust. Okay, now back to an event fx for those stills.

Hmm, How about a way I can tell Vegas to just normalize my stills to video levels. One click, easy.

Basically I can envision something like this being a prompt when you import stills asking if you want them normalized to video levels. You can control this prompt via a preference. This boolean can be a media property and after the fact you can always click the property to change it one way or the other. Better yet Vegas can use existing mechanisms with this prompt simply adding a media fx levels adjust for you and this is something you can manually tweak if desired. Even more control than a simple, yes normalize please boolean. The fact that Vegas has Track fx and media fx provides more options for us and even helper prompts as described.

Vegas could also give an alert prompt when full range video streams are imported.

If you default to a prompt and a new Vegas user will be alerted that there is some kind of levels thing that needs their attention. How they find out now is to render and only then see the levels messed up. As the FCP article mentioned they deal with it already. Avid may also, I can ask a friend.
_Lenny_ wrote on 4/27/2014, 2:58 AM
If I bring in 300 stills then, add the effect to 300 events?... Okay use a special track for stills and use a track fx to adjust all at once... what if I want a transition from that still with a video, and the video does not want the levels adjust.

How about using Paste Event Attributes?

Adjust one image, then copy that image. Select all the others, right click, 'Paste Event Attributes'.
Grazie wrote on 4/27/2014, 3:54 AM
Not if that means getting PREGNANT!

Seesh . . Nick . . you've had too much O2 lately . . .

Oh yeah, nice idea.

- g

paul_w wrote on 4/27/2014, 5:38 AM
Like the idea of stills being converted to 16-235 on import (optional / dependent on project 'mode'). Makes sense. It all needs to be 16-235 at then end of the day in video land.

Norman, you mentioned the Antares plugin for preview correction. I thought it worth posting it here as part of the debate:

I have tried it a few times and it does indeed correct the internal preview monitor. That alone makes it useful and a step in the right direction. I also does suggests it can render out to REC709 too but never tried that function. Gives a button much like Nicks image there.

musicvid10 wrote on 4/27/2014, 9:11 AM

How do you propose the program would determine which media is "full range"?
Red Prince wrote on 4/27/2014, 10:34 AM
I'd suggest reading documents such as

Better yet, read all the official ACES documents. :)

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

NormanPCN wrote on 4/28/2014, 1:02 AM
How do you propose the program would determine which media is "full range"?

Camera stills are going to be full range. Of course jpeg/png/etc files are not guaranteed to have come from a camera. This is why you need a user decision and not blindly just do something. Of I would not propose something that is blindly done anyway.

So still images would get the prompt, if the prompt is enabled via preference.

Even if you do not want to have such a prompt take any action, just having the alert, is a nice heads up.

As for video files. I only know of one format that can have a full range flag, as stated in this thread. AVC. There may be others. I only know about AVC because my DSLR and GoPro files bit me with levels issues. Big numbers of DSLRs and GoPros out there. The prompt would only be shown when the flag is present and TRUE.

If GoPro people always convert their files to Cineform using GoPro studio, then they will never have a levels problem in an NLE. GoPro studio normalizes output to video levels.

proDad Mercalli 3 SAL and ReSpeedr both normalize video levels from my full range cameras. They seem to know about the full range flag. They know something at least.
NickHope wrote on 4/28/2014, 6:51 AM
This thread is of relevance here, and good background for Chris Dolan to take a look at: What min/max levels does your cam shoot?
musicvid10 wrote on 4/28/2014, 8:49 AM
No, AVC is flagged BT.601 or 709; it is not an RGB codec, but there are many of those as well, including WMV, MJPEG, and much of what is wrapped AVI or MOV.
One "can" record anything from 0-255 on AVC, or on any of several dozen other Y'CbCr codecs, including MPEG-2.
That doesn't make it right.

That being said, there are close to a billion devices in use today that consistently shoot incorrect "full range" levels in AVC MOV/MP4 format. These include the vast majority of phones, consumer camcorders, hybrids, DSLRs, pocket cams, and the like. Only some prosumer AVCHD and HDV models are capable of acquiring correct levels, in the hands of a knowledgeable shooter. But left to their own, they often shoot 16-255 in full light, again needing intervention in post.

"Hidden in these discussions are usually illusions of some kind of magical "scan pass," which would implicitly carry a huge time/patience price tag, and probably be no more effective than doing nothing. Presets are presets, and they are already present in the program. Although they could be defined or exposed in the project settings, they still require an informed level of intervention, and would be valid only under identical studio conditions."
When I wrote that, it wasn't intended as a flippant remark. If the program goes by the ITU flags, it will get it wrong, most of the time. A scan pass carries a huge price tag, and isn't that much better, in the absence of informed human intervention. (I cut my teeth at Technicolor and scanned film for over two decades).

It's myopic to suggest that there are only two kinds of levels in footage. What about everything else? How many hours are you willing to spend waiting for a scan prepass to complete, when you can get a good set of numbers in a few minutes with eyeballs and scopes?

paul_w wrote on 4/28/2014, 9:09 AM
Just reading about how FCP handles still images from that past link.
Interesting that they also apply a gamma adjustment of 0.8 to imported still images as well as 16-235 scaling. So Vegas could apply this process too perhaps.

NormanPCN wrote on 4/28/2014, 4:40 PM
No, AVC is flagged BT.601 or 709; it is not an RGB codec,

I never said AVC was an RGB codec. If any implication is taken, then I apologize for not being clear. I know nearly all codecs are YUV, since chroma subsampling is so commonly used.

Yes, yes, I know "YCbCr" but YUV is quicker to type, more commonly understood, and you know what I mean.

I only said that certain cameras, which I own, capture full range levels, are flagged as such, and they always need to be manually corrected.

It's myopic to suggest that there are only two kinds of levels in footage

I know another common capture range is 16-254.

My posts about a possible levels feature adjustment via a prompt related directly to a very common subset of cameras, that have an AVC VUI flag, that the cams are used by common users, and that common users nearly always get their levels wrong. A teeny bit of help..can help. Absent the VUI flag, nothing would ever happen.

Apps like Premiere will correctly interpret the VUI flag and not get levels wrong, so why not Vegas. So I was told by a friend with Premiere.
Also, anything based on libavcodec can correctly interpret the flag. So why not Vegas.

The fact that the Vegas preview window is wrong only exacerbates the issue. Users can and will assume the preview window is correct. Until they learn the steps the make the Vegas preview window work.

How many hours are you willing to spend waiting for a scan prepass to complete, when you can get a good set of numbers in a few minutes with eyeballs and scopes?

Are you talking about determining what is inside a camera file, or a finished project timeline?

If the later, then of course this is only best done via eyeballs. If you need strict conformance to some levels spec, then scopes of course.

A "search" here can be possibly be faster. Think word processor search, only the search here is for levels outside a specified spec. So your cursor is at a spot and you say, "search", then Vegas would composite the video as fast as it can, not updating the display and it, will stop when a frame is out of your specified range. Then Vegas leaves the cursor at that location. Then the editor can do their voodoo to fix that area, and then continue searching from point basically walking through the file looking for trouble spots.

If the former, then this is patently wrong. A decoder for most formats can decode far faster than a real time frame rate. The real problem here is how does one present the results of such a scan so that a user can use the data gathered. Not at all trivial or even simple. However, It easily determines and can inform what the boundary levels of a file are.

Of course editors may not care what the range is as they will deal with whatever it the heck it is at the time they are grading.

The super-pro user will have learned the idiosyncrasies of Vegas and how to get what they need out of it. Common users could use some docs on levels and some help/prompt/wizard. Vegas has neither.