View Full Version : Best way to set brightness, contrast et. correctly ??
numlock
8th March 2004, 16:37
I'm doing video capturing and I can never set brightness, contrast, color etc. correctly because it always looks different on a TV set then on a PC monitor.
What do I need (hardware ?) to be able to output it to a TV set so that I can see it and correct it on a TV screen instead of a PC monitor ?
My card doesn't have a TV out. I was wondering if there is some USB solution ? Or should I get VGA to TV converter ? ANy special software needed ?
TIA
trevlac
8th March 2004, 17:24
You know, this has been a big question for me too.
I also don't see how TV out is the real answer. The TV out could adjust the signal, and besides, is your TV a good way to judge source? My various cheap TVs have way too many settings, and don't look like each other anyway.
Here is what I am currently doing:
Unfortunately, I have not come to grips with a good way to push this back to capture. If the signal is poor, adjusting the settings on the capture card driver does not seem to be a good option to me. This is because they adjust things after the signal is captured. This can be done better/with more clear control in post. I may get a TBC to be able to adjust the analog signal before capture.
cap
Current rule for caps is to Cap YUY2, turn off any coring (if you can), don't ever do gamma correction, keep the driver defaults for brightness, contrast, hue, saturation. Hopefully, this means the card did not mess with the capture results much. I also use MJPEG because I can get RGB out from YUY2 without getting a clipped signal.
black (brightness)
Then use a histogram, or better yet a waveform monitor to set the black level to zero or 16 (YUY2 or RGB). I find it hard to use the one in VDub capture. So I use one post. PS: Almost every scene should have black. A wfm is better than a histo because you can tell things like borders from real picture.
white (contrast)
Again use a histo/wfm to set the white level. Here, you need to find the brightest frames. Make the whites white but limit clipping.
gamma
This is tricky. It is going to be different on a PC vs TV so It's hard to tell by looking. What I do is take some commercial dvd source that matches the look I want. For example, I capped some cartoons and wanted to match some commercial DVDs of the same cartoon. I use levels in VDub for this. The match is by eye, because It's hard to find an exact scene. But Eye should work here.
Hue/saturation
Again, this is where I match a commercial DVD. But I also look at a vectorscope. The scope is a good way to see if you have a color cast. If a white scene is not in the center, you can see it and fix it. Next make sure no color is past 75% (or maybe even that far). It depends upon how vibrant a look you want. Finally, you can mess with hue to get the tones that are on the commercial disc. Skin tones are generally the most important to get 'right'. Other than that, you're matching something else (like a commercial disc), because who's gonna know the shade of some guys shirt?
This last step takes a bit of tweaking, but you can get good results with practice.
-----------------------------
As you can see, I don't have an easy answer. I try to match a commercial DVD using some charts rather than trusting my eye. The biggest down side is some time setting this up, and post processing time.
numlock
8th March 2004, 23:55
Thanks for your help.
Now, can youtell me where I can get histogram, waveform monitor and vectorscope ?
Thanks
trevlac
9th March 2004, 03:04
Originally posted by numlock
Now, can youtell me where I can get histogram, waveform monitor and vectorscope ?
:)
A few months ago, I decided to try to figure out how to fix a bunch of old captures I've been saving. Really poor captures if I say so myself. I found a book on color correction and dove into the topic. I then found I needed some tools to do this stuff. I find I better understand if I go to the core of a topic. So I made a vdub plugin that does histograms, waveform monitor, vector scope, and some more.
All they are are charts of the video frame. It would be better if I could open them in a '3rd' window in Vdub, but I'm not much of a programmer. For now they are a 'poor mans' tools.
I started a site to explore this topic and keep my notes. I ran out of energy, but hope to get back to it.
Links to the plugin and source are at the top of this page.
http://trevlac.us/colorCorrection/colorTools.html
North2Polaris
9th March 2004, 04:18
@trevlac,
Thanks for sharing this!
I have been following the discussions that you, Arachnotron, Wilbert and i4004 have been having over at:
http://virtualdub.everwicked.com/index.php?act=ST&f=6&t=5896&st=0
Any further discussions with Wilbert about revisions to the capture quide?
Is your family ready for you to buy an oscilloscope yet?:)
trevlac
9th March 2004, 04:40
Hey North!
You're a better Yank than me if you can follow what ivo is saying . :D
I've been a bit worn out lately. Too many late nights. Looking forward to spring.
It looks like Wilbert is ready for a look at the guide. I wish I had something worthy to say about setting the brightness, contrast, etc. for capture. This has always been a big question mark for me.
I was a bit excited to see this post by numlock. I hope to find out what others do.
Trev
PS: No on the scopes. I have to make mine in digital. How bout you?
Wilbert
9th March 2004, 10:07
Any further discussions with Wilbert about revisions to the capture quide?
We started on a new version ... Since I moved to an other appartment recently, and I don't have internet yet, things are going at half speed :)
North2Polaris
9th March 2004, 12:59
Originally posted by trevlac
PS: No on the scopes. I have to make mine in digital. How bout you? [/B]
Trev,
I have been reading about satellites and terrestrial HDTV. I am running out of old VHS tapes to restore.:)
North
Arachnotron
9th March 2004, 14:14
Hey Trev,
Your pages are coming along nicely. Good work!
@numlock
If you don't/ can't use vdub, there is a Videoscope plugin for avisynth too. (avisynth v2.0 only, but it works fine with 2.5).
It works in YUV instead of RGB, but it can be very usefull for understanding why a cetrain cap looks like crap. It can do waveform monitor and can plot various things against each other.
For example, I am working on a cap right now which looked very dark and grainy, especially on flesh tones. By plotting a Y histo and doing a plot of U versus V I found the cause was a crushed chroma range. Instead of a normal distribution of U and V across the plot, all values were limited to a small area in the upper left quadrant (center is 128,128). Almost impossible to fix, since the information was no longer there :(. Trying to stretch the range just increase the grainyness, and I ended up just pixiedusting the thing.
[edit] I don't think videoscope does wfm's, just various forms of histo's. (line based instead of frame based) for "Y", "U", "V", "UV", or "YUV. And it is yuy2 only.
hendrix
10th March 2004, 10:06
Originally posted by numlock
Thanks for your help.
Now, can youtell me where I can get histogram, waveform monitor and vectorscope ?
Thanks
I use Vegas 4 to color correct my stuff, it has a very nice histogram along with a waveform analyzer, vectorscope, etc. i have a canopus advc-300 capture card and use the analog out to connect to my tv...one day i will get a sony broadcast tv with a Blue Only switch.
rfmmars
10th March 2004, 14:32
There is a simple answer. There are thousands of old Commadore 14" analog monitors out there that can be had for $10.00 to $15.00 US. These have s-video in, and have a super CRT with perfect white balance.
I have one of these on each of may video work stations. All controls are manual so pop in some comercal DVD and set and glue the controls.
I wouldn't ever think of producing a production using a RGB CPU monitor.
richard
photorecall.net
trevlac
10th March 2004, 14:47
Originally posted by hendrix
I use Vegas 4 to color correct my stuff, it has a very nice histogram along with a waveform analyzer, vectorscope, etc. i have a canopus advc-300 capture card and use the analog out to connect to my tv...one day i will get a sony broadcast tv with a Blue Only switch.
It's good to hear that people really do use those charts. I suspect that people who don't buy 'prosumer' products don't really know what to do or how to use the charts. That fully describes me before I started looking into it.
Avid has a nice DV package that lists for $695. It seems to have a real nice set of tools. Here is a link to an Avid guide on color correction. It's a bit long but worth even doing a skim read through.
ftp://KCAvid:KC951348@support02.avid.com/KCAvid/AvidCC_UG.pdf
I've often wondered about the value of a Blue switch. When you step up to one of those, there generally is a big price jump. Those monitors may be better, but with digital, can't you just as easily create some blue only colorbars? The cheapest (new) Sony production monitor I can find with a blue gun setup switch is a PVM-9L2. That's a 9" monitor for ~$900
Arachnotron
10th March 2004, 15:02
@Hendrix, Trevlac
one day i will get a sony broadcast tv with a Blue Only switch.
If you don't mind a newbee question: what do you use such a switch for? Sounds intriguing....
As an aside: is it not possible to put a switch in the R and G channel of the cable... Wait... US... That't component video country :)
trevlac
10th March 2004, 15:02
Richard,
I thought that was great advice. I'm still looking for one. I havn't seen one for $10 to $15, but I'd be willing to pay $40. It looks like the 1701 is one of the better monitors. I was looking at getting one of those.
How do you do the video out? Do you have any concerns with what the video out does vs say what a dvd player would do?
You don't think it's valid to adjust gamma and color to match a sample source on a PC monitor? I mean, if 2 sources look 'the same' on a PC monitor, should they not look the same on a TV?
trevlac
10th March 2004, 15:21
Originally posted by Arachnotron
If you don't mind a newbee question: what do you use such a switch for? Sounds intriguing....
As an aside: is it not possible to put a switch in the R and G channel of the cable... Wait... US... That't component video country :)
I was also thinking if you had component, just unplug red and green. Also, you can look thru a plastic photography filter, to filter out the red and green.
Why do all of this? Monitor setup. (And source setup if you have colorbars at the begining of some source).
Basically, if you look at standard colorbars in blue only, they should alternate as blue/black/blue/black ... The blues should be the same brightness and so should the blacks. If magenta and cyan do not match then the hue is off. If white and blue do not match, saturation is off.
Here (http://trevlac.us/colorCorrection/channels.html) is an example, with an avs script to create some 75% intensity color bars.
also of note
Nothing to do with the blue gun, but about setup and color bars.
In the NTSC would, there is often a pluge strip that is simply a series of black levels. This can be used to set the brightness (black level). This is troublesome for digital, because you have to make sure all devices can pass YCbCr below 16.
Setting white (contrast) with colorbars (that contain 100% white) seems to be simply cranking it up until it's too bright causing the electron guns to emit so much energy that it heats up the phosphers surounding the target phosphers. (Soft edge or bluming). Then crank it down a few notches.
Arachnotron
10th March 2004, 15:22
I just bought a small 14" TV to hook up to the s-vid out of my videocard (matrox G550 DH). You still have to calibrate on the computer side and the TV side. With a special cable the matrox can do RGB too, but I still have to build one.
I was first thinking about using a reference DVD for calibration, but decided not to since softtware DVD players do colour correction too. (PowerDVD has several brightness/color profiles for this stuff)
So whipping up some testpic with Avisynth seems the way to go. (I just got it, so I haven't finished calibrating it)
One other problem I ran into is interlaced video. Because graphics cards do a rather crude vertical resizing, interlacing and the like is shot to hell and gives very ugly artefacts.
Also you have to allow for the framerate conversions it does. (the s-vid out is 50 fps, which is not so nice if I am working on NTSC)
So in the end I use it for judging brightness and such, but for judging the final result I put a cheap DVD player under it which can play DVD-RW.
Another possibility are external boxes that can take normal computer signals up to 100 KHz/1280x1024 using a framebuffer and output s-video or even component video/RGB PAL or NTSC. They often offer more control than the build in s-vid out of graphics cards, but still have framerate and interlacing artefacts. These boxes come with splitter cables, so you don't need dual head for them. The picture is a bit more blurry.
Arachnotron
10th March 2004, 15:26
Here is an example, with an avs script to create some 75% intensity color bars.
Should have read your page more carefully. Thanks for the explanation! :)
hendrix
10th March 2004, 15:49
@trevlac...you stole the words out of my mouth
@Arachnotron...im a technical director at a television studio and i just love that blue only button...look at a SMPTE color bar and you'll notice that the bottom and top are separated. pressing the blue only button makes the SMPTE Color Bars black and white and you adjust the monitor's color, hue and brightness knobs so the top and bottom portions of the color bars match up...its to adjust the monitors...what you see is what you get
we use the vectorscope to make sure that the Color bars are set correctly...you dont want to adjust the monitor to a miscolored color bar...
trevlac
10th March 2004, 17:18
Originally posted by hendrix
we use the vectorscope to make sure that the Color bars are set correctly...you dont want to adjust the monitor to a miscolored color bar...
This is a specific case of a general problem I have. I can create exact digital values on a DVD (this is easy for me to test). However, I only have consumer equipement, so when I play the dvd, or output the signal using video out, or use my DV cam to output an analog signal, I really never know what goes out. Sigh ... :(
..........................
On a different note. Morsa pointed out to me in this (http://forum.doom9.org/showthread.php?s=&threadid=69824) thread that doing hue (and probably color intensity) comparisons/changes on 'any old monitor', may not translate properly to another display device. If I understand correctly, one reason may be that as the color gamut goes from its digital values thru the app that is playing it, to the video driver, to the video card, to the monitor, to your eye... there is a lot of stuff happening. From this, say 10 colors in the gamut of a sample disc may translate to 6 colors on the display. However, a few other colors may also translate to those same display colors. So, hue changes/matching may look the same on one monitor and end up being different on another.
That thread is also where Richard gave me the great tip about amiga monitors.
Personally, I've been trying to really just do a bunch of color correction and match my experience to the various things I've read / heard.
Actually, that is why I wrote the vectorscope /wfm / histo tools. No better way to learn how something works than to try and make one. :D
Wilbert
10th March 2004, 17:30
Sorry for the interruption :)
Actually, that is why I wrote the vectorscope /wfm / histo tools. No better way to learn how something works than to try and make one.
I still have to try it out. But, are going to port it to AviSynth?
North2Polaris
10th March 2004, 21:19
@Wilbert, trevlac, Arachnotron,
Would this and similar discussions lead you to recommend changes in this section of the capture guide?
http://www.doom9.org/capture/postprocessing_avisynth.html
Color adjustment (with AviSynth v2.5) (Note: there are 4 images used in this part of the guide):
If you look at your capture, you might see that the colors will be a bit distorted. Shiny colors will be more shiny, dark colors will be more dark. Normally YUV values are not mapped from 0 to 255 (PC range), but a limited range (TV range). This limited range is 16-236 for the luma component and 16-240 for the chroma component of the YUV signal. The problem is that most capture devices scale it to the range 0-255, and this must be scaled back to 16-236. Scroll through the clip and see if your colors are indeed distored. If so, it can be corrected by using the internal ColorYUV filter (for AviSynth v2.08 there is a plugin ColorYUV available):
ColorYUV(levels="PC->TV")
Scroll again through the clip, to see if the distortion is corrected. If not, remove the line and correct it manually. You have to find the settings only once. For the next capture you can use the same values, provided you don't change them in the capture settings. Btw, I don't know how to do this in AviSynth v2.08, since Histogram is only,available in AviSynth v2.5.
We will use the histogram the adjust the brightness and contrast. Since the histogram requires YV12, we add the following lines to the script:
ColorYUV(off_y=0, gain_y=0)
ConvertToYV12()
Histogram()
Open this script in VirtualdubMod. Right-click on the clip and select normal to enlarge the clip. You will see the clip with next to it the histogram. On the horizontal axis the luminance is plotted. If you look closely you will see that the range 0-15 is brown (meaning invalid), the range 16-236 black (valid) and 237-255 brown (invalid). The histogram itself can be white (if it lies in the valid range 16-236) or yellow (if it lies in the invalid range). Note that the brown bars are exaggerated, otherwise you won't see them hardly on the images (because they are compressed).
Look up a part of a frame that is black (black borders for example, this frame for example). If the histogram is yellow on that part, it means that we have to increase the luminance (i.e. brightness) till the histogram becomes white. If it is white we have to decrease the luminance just before it becomes yellow. Open the script editor (under tools), adjust the off_y and press F5 for previewing. The script becomes for example:
ColorYUV(off_y=-20, gain_y=0)
ConvertToYV12()
Histogram()
Look up a part of a frame which is very bright (the frame above for examle). Increase (or decrease if necessary) the gain_y to stretch the luminance till you can't increase it any further. The script becomes for example:
ColorYUV(off_y=-20, gain_y=64)
ConvertToYV12()
Histogram()
You will see that also the left boundary has moved (because it was about 16 instead of 0, and changing gain_y means multiplying). Go back to your original frame, and adjust it again. The script becomes for example:
ColorYUV(off_y=-28, gain_y=64)
ConvertToYV12()
Histogram()
Continue till you are satisfied. If you are done, it is time to adjust the saturation (i.e. colorness/chrominance). The options "cont_u" and "cont_v" depend the saturation in the following way:
cont_u = cont_v = - (1 - saturation) * 256
Example: saturation = 0.8 implies cont_u = cont_v = - 0.2 * 256 = - 51.2. Look up a frame which contains something very red or blue (for example clothes), or just look at the skin of people, and increase/decrease the saturation. The script becomes for example:
saturation = 0.8
cu = - (1-saturation)*256
ColorYUV(off_y=-28, gain_y=64, cont_u=cu, cont_v = cu)
To be sure that the luminance and chrominance lie in a valid range, set opt="coring" as an option in ColorYUV. Remove the histogram since we don't need it anymore:
saturation = 0.8
cu = - (1-saturation)*256
ColorYUV(off_y=-28, gain_y=64, cont_u=cu, cont_v = cu, opt="coring")
Arachnotron
11th March 2004, 01:59
@North2Polaris
I must admit I never really thought about this section.
Trevlac is rapidly becoming the resident expert on this stuff, but I can see a few things that might be changed. Let's see if Trevlacs lessons payed off :D
The problem is that most capture devices scale it to the range 0-255 At least my Terratec (Philips) tries to put black at 16 and white at 236. AFAIKR the BT878/BTWincap combo does the same. What they do when asked for RGB is another can of worms alltogether. :)
I 'think' they try to calibrate the luma range from the difference between blanking level and horizontal sync, and map everything else relative to that.
Look up a part of a frame that is black (black borders for example, this frame for example)
For PAL this might work, since blanking level=black level=0V. But for NTSC, the blanking area, which is the origin of the black borders, is at 0 IRE and should result in Y=0, while black level (7.5 IRE should result in Y=16 (I think, I don't have the numbers here at hand)
So , if you cap a piece of blanking area at the edges, the lowest value in your cap should be y=0! Depending on if your card does any coring, anything below 16 may have been converted to 16. So you would see yellow in the histo even if "true" black is at y=16, or see Y=16 as the lowest value even if the blacklevel is incorrect.
Same can go for white; the crap at the bottom of VHS caps, or in PAL caps the peaks of the WSS signal may very well be above white level and distort the histo at the other end. (again, would have to look the wss stuff up)
All in all, I think it would be best to avoid any border/distortion at the edges before running a histo. The pic itself should have 16<y<236 provided there is anything at white- or blacklevel in the scene. A WFM is another story, since there you would recognize it if all values below 16 were in the border.
Also, the conclusion from this thread seems to be that judging the need for coloryuv adjustments by visual inspection on a computer monitor can be tricky if your target is a DVD for display on a TV screen.
But this is just my personal opinion. I may be way off :) Trev? Wilbert?
[edit] looking at the pics in the guide instead of only to the quote, I see I misread the term border :(. Still, the area's used in the example picture do contain area's resulting from blanking level signals which may distort the histo for NTSC caps.
trevlac
11th March 2004, 05:48
@North
Those damb proc amp settings.... :)
As you may have noticed, this is my current area of interest. So, I'd love to discuss, work on a nice general method.
As far as the current guide ... as a newbie, I found it to be directive, but unclear as to what I was trying to do. Now that I know more, I find it to be reasonable, but maybe too specific. BTW: 236 should be 235.
Some things to know about Color Adjustment
The basics
Strangely enough, black and white (and grey) are the most important parts of color adjustment. If black is dark and white is bright, everything else is alot closer than they would be if black and white were off. The next things are saturation and gamma. Oversaturated stuff will 'clip' and not look good on a TV. Under will be dull. If gamma is off, the picture will be to dark or washed out. Finally, there is hue. This is the most forgiving error. Skin tones are the easiest way to tell. Other than that, who can say if some guys shirt should be purple or blue?
Your signal
When a composite signal is captured, the card must take an electrical signal and adjust it to match a standard. Basically, it has to decide what the high and low points are. I imagine there is a bit of smarts to this, because setting the high/low too high/low (due to some noise, distortion, or whatever) would not alow you to use your full scale for your real signal info. Also, the signal strength most certainly changes over time, from channel to channel, and device to device. Bottom line is that the card must determine and set the high and low (Automatic Gain Control). This basically determines what is black, white, signal gamma, and color saturation.
A little about color spaces
There are 2 for digital video. RGB and YCbCr. They both have 3 components (R,G,B and Y,Cb,Cr). For what we use (8bit video), each component can have a value from 0-255. If you request anything but an RGB flavor from a card, you get YCbCr (YUY2, YV12, etc). The standard for YCbCr is to set black=16 (on a 0-255 scale), and white=235 (on a 0-255 scale). The standard for PC RGB is black=0 and white=255. Just because these are the standards, does not mean that is what you get from a signal. When you adjust in RGB, you want black parts of your video to be zero. When adjusting in YUY2/YV12 you want black to be 16.
-------------------------
Does that make sense as an intro?
@Arachno,
PAL and NTSC should both have black as 16 for YCbCr. There is no difference in digital. I guess borders could be blacker than black, but I've not seen that. It is probably better to ignore the borders and look at the real signal. Almost every frame should contain black. Put this at 16 and you are set. If the borders get clamped to 16 you really don't loose anything. It's better if they don't have any detail. The 'histogram' in the guide is what I would call a waveform monitor (on it's side). This is nicer than a regular histogram, because you can actually relate parts of the picture to the chart (and ignore the borders).
@Wilbert,
I tried to get my plugin to work with LoadVirtualDubPlugin() but there were a few problems. I've used some 'built in' functions that don't seem to translate well. Is there any doc out there on this kind of thing?
Would it be useful to just use it in RGB? I mean as a vdubplugin from avs. It really does not do any 'real work', so colorspace conversion should not be an issue, as long as one understands the process.
Don't get me wrong. I'd love to have a reason to learn some more about avs filter development. I'm just looking for the fastest path. I barely know my way around this development stuff. ;)
Arachnotron
11th March 2004, 14:16
PAL and NTSC should both have black as 16 for YCbCr. There is no difference in digital. I guess borders could be blacker than black, but I've not seen that. It is probably better to ignore the borders and look at the real signal. Almost every frame should contain black. Put this at 16 and you are set. If the borders get clamped to 16 you really don't loose anything. It's better if they don't have any detail. The 'histogram' in the guide is what I would call a waveform monitor (on it's side). This is nicer than a regular histogram, because you can actually relate parts of the picture to the chart (and ignore the borders).
That is not what I mean. I know both with PAL and NTSC black should end up at 16. The difference is that with PAL, the blanking area is at the same level, while in NTSC the level is below that. So while with a PAL cap the area's outside the active area are indeed black, with NTSC they can be below black. (superblack). Since you often cap a substantial part of the blanking area too (especially with ITU devices) blanking signal ends up in the pic too.
So, black in pic is 16 while black in border may be 0. (ideal case, analogue reality might be different if there is a problem with horizontal sync)
If this is really the case depends on what the card does with out of range signals.
If you were to adjust such a picture using a histo untill no pixel is below 16, you would end up putting blanking level at 16. 'true' black would end up at 32 (if scale is linear). On a computer screen you would probably not notice this, all would look black. But on a TV set, black would look grey.
trevlac
11th March 2004, 15:40
Originally posted by Arachnotron
If this is really the case depends on what the card does with out of range signals.
If you were to adjust such a picture using a histo untill no pixel is below 16, you would end up putting blanking level at 16. 'true' black would end up at 32 (if scale is linear). On a computer screen you would probably not notice this, all would look black. But on a TV set, black would look grey.
Now I see what you are saying. :) Thank you.
I've never thought about it this way, but this could be a pitfall. Like you say, it depends upon what the card does (and on the driver settings and colorspace). A good general rule would be to use a WFM not a histogram to set the black level (you could crop the borders and then use a histo). Identify a black area "in the active picture" and set that to 16.
An interesting thing in the guide pictures is that you could set the black just a bit lower. If you look a the bottom border vs the black boxes on stage (just on the bottom edge of the picture), you can see that there is a difference. You could try to get the picture black all the way down. This would crush the border black. There is really not much of a difference, so maybe this is a bad example.
The 'interesting' part about all of this is that the picture in the guide is PAL and the border is not part of the signal blanking. It's on the top and bottom, not the sides. If there are superblack side borders, the avs wfm would not work because it is oriented on its side.
Arachnotron
11th March 2004, 16:08
If there are superblack side borders, the avs wfm would not work because it is oriented on its side.
The superscope version can be positioned at the bottom too. Don't know what the histo in avs itself can do, haven't tried that yet. I must admit I find the option to plot UV even more usefull than RGB for adjusting during capping, since it gives direct information about the original signals and possible problems with that. (I know that that is something you don't like, but for a 10 bit card I think there are advantages to doing it there)
you could crop the borders and then use a histo). Identify a black area "in the active picture" and set that to 16.
I agree. I think this would be the most universal way to do this. When you are finished calibrating, you can always comment the cropping line out again. In vdub it is easy to do, in avs only a little more work.
Another pitfall could be later added features with different brightness scaling, say a picture with to low white level with added subtitles that are correct white. Or some of the non-black letterboxing you find on music stations. Again, cropping can help
I was just watching an Stevie Ray Vaughn live DVD where a blacklevel mistake was made. I happen to own a NTSC version of the same show, but this one was a PAL best off DVD with some of the same footage on it. I suspect somebody ran the NTSC original through a bad converter box without adjusting blacklevels, and translated 0 IRE NTSC to blacklevel PAL. So all that was black on the NTSC version is now blotchy gray. Very ugly on TV. :angry:
As something totally unrelated: did you notice the WSS signal in the first line of the pic? :)
[edit]
When a composite signal is captured, the card must take an electrical signal and adjust it to match a standard. Basically, it has to decide what the high and low points are.
This is done by measuring the voltage difference between the bottom of horizontal sync and blanking level. For each version of PAL and NTSC, there is a definition in the specs on how many IRE units the sync pulse is. Using that relation, an IRE value for each voltage can be calculated. The gain is also adjusted to this for each line. The SAA7114 specs give some nice info on this.
Macrovision used to operate by putting spikes in the blanking level directly following Hsync. This disturbs the calibration in VCR's and causes the flickering you see.
Wilbert
11th March 2004, 16:18
Does that make sense as an intro?
It sounds nice (at first sight)!
I tried to get my plugin to work with LoadVirtualDubPlugin() but there were a few problems. I've used some 'built in' functions that don't seem to translate well. Is there any doc out there on this kind of thing?
I don't know. I don't know much about programming, sorry :)
Would it be useful to just use it in RGB? I mean as a vdubplugin from avs. It really does not do any 'real work', so colorspace conversion should not be an issue, as long as one understands the process.
The histogram in AVS works only in YUV. It would be nice to have something similar for RGB. I guess I have to try your plugin first, to see what it does :)
The difference is that with PAL, the blanking area is at the same level, while in NTSC the level is below that. So while with a PAL cap the area's outside the active area are indeed black, with NTSC they can be below black. (superblack).
I didn't know that. Do you have any references?
Since you often cap a substantial part of the blanking area too (especially with ITU devices) blanking signal ends up in the pic too. So, black in pic is 16 while black in border may be 0. (ideal case, analogue reality might be different if there is a problem with horizontal sync)
So, you just have to crop the left/right black borders, and use histogram to correct contrast, brightness, etc (to get rid of this problem)? (like Trevlac says, if I understand him correctly ...)
edit: ok, I didn't see your reply above mine before finishing this post.
If there are superblack side borders, the avs wfm would not work because it is oriented on its side.
I guess you can also rotate the image in that case, and apply the histogram :)
[edit] looking at the pics in the guide instead of only to the quote, I see I misread the term border. Still, the area's used in the example picture do contain area's resulting from blanking level signals which may distort the histo for NTSC caps.
You mean those 1-2 pixel black border on the left and the right?
Same can go for white; the crap at the bottom of VHS caps, or in PAL caps the peaks of the WSS signal may very well be above white level and distort the histo at the other end. (again, would have to look the wss stuff up)
You mean the upper (white) line? Not a big deal, since it only influences the the upperline of the histogram.
Arachnotron
11th March 2004, 16:30
@Wilbert
I didn't know that. Do you have any references?
ITU-R BT.470-6 , table I
You mean those 1-2 pixel black border on the left and the right?
yes. (this can be > 18 pixels for ITU devices)
and the bottom part of a VHS cap will also contain some undefined signal levels.
You mean the upper (white) line? Not a big deal, since it only influences the the upperline of the histogram.
Agreed. It's just another example of non-picture types of signal that may find it's way into a cap.
trevlac
11th March 2004, 18:27
Originally posted by Arachnotron
The superscope version can be positioned at the bottom too. .... I must admit I find the option to plot UV even more usefull than RGB for adjusting during capping, since it gives direct information about the original signals and possible problems with that.
What is the superscope? A plugin? Where? I know you mentined something about this before, but I can't find it.
A have 2 issues with a UV chart. First, is that it is too small for me to read. Second is, other than signal strength, how do you translate. :confused:
This is done by measuring the voltage difference between the bottom of horizontal sync and blanking level. For each version of PAL and NTSC, there is a definition in the specs on how many IRE units the sync pulse is. Using that relation, an IRE value for each voltage can be calculated. The gain is also adjusted to this for each line. The SAA7114 specs give some nice info on this.
I've wondered how well these cards do AGC. In video demystefied they give about 5 different ways to do this, and imply there are cost and quality differences. I've noticed that the black/white level of the signal from my vcr vs my dvb receiver is quite different. And even s-video can be more off than RCA. I've read a few comments about analog out from hi-8 type cams being much different to the card vs the TV. I suspect that a TV is just better with a bad signal.
I've wanted to compile some test results of my different sources/devices, but I haven't gotten around to it.
@Wilbert
I don't know. I don't know much about programming
Each time it start looking at code, I say the same about myself. :D
Arachnotron
11th March 2004, 21:48
What is the superscope? A plugin? Where?
Sorry, it's Videoscope and you can find it at the usual place:
http://www.avisynth.org/warpenterprises/
A have 2 issues with a UV chart. First, is that it is too small for me to read. Second is, other than signal strength, how do you translate.For me, it is more of a way to quickly establish the quality of the original signal. really odd chroma signals truly 'leap out' at you. For adjusting color in post-processing RGB is easier to understand, but translating an RGB histo back to wat caused the problem in the Y/C signal is equally difficult to do.
[edit] the videoscope UV plot looks the same as the color plot of the standard avs histo function
numlock
12th March 2004, 04:01
Originally posted by trevlac
I also use MJPEG because I can get RGB out from YUY2 without getting a clipped signal.
Trevlac what do you mean by clipped signal ? Does this problem occur with HuffYUV compression ?
trevlac
12th March 2004, 15:08
@numlock
Whether this matters or not, is up to debate. It depends on many steps in the process. And, to be honest, I have not done full testing on my own system to show exactly what is happening for me. However, here is a summary:
- The signal comes in from the analog device. The high (white) and low (black) are determined. There may be parts of the signal that are higher than white and lower than black.
- If you capture in YUY2, 235 is white and 16 is black. Depending on what the card is doing, the full capture range is about 2-254. So depending on how the auto gain works, you may get info outside of the normal black-white range.
- If you convert from YUY2 to RGB before you bring those (possible) extra parts back to the normal range, they most likely will be 'clamped'. This is because the majority of YUY2->RGB conversions remap 16-235 to 0-255. So values outside of 16-235 are 'clamped', clipped, or more precisely set to 0 | 255 in RGB.
- Huffuyv does this. AVS converts do this. Mjpeg codecs do not. They leave the range as 16-235 and keep the 'headroom'. So, if you open YUY2 source in VDub (or most any editor), you are converting to RGB. Please Note: If the conversion process does not remap (mjpeg does not), there are a series of other problems. Pictures will look washed out because normal PC RGB is 0-255 not 16-235. Also, you will have to tell the encoder that your range is not 'normal'. I know that CCE, TMPGEnc, and Mainconcept all have this type of setting.
Bottom line: If you captured in Huffyuv YUY2, and you use RGB (like vdub filters), you may want to look to see if this concerns you. You can test by opening up the AVI in VDub and looking at a histogram, and by opening up an avs script that converts from YUY2 to RGB without remapping and looking at a histogram of the same frames. Look for xtra signal at the ends. It really depends upon your card/driver/source signal whether anything would be there.
I wrote an avs plugin to test this stuff. Here is a link and a script:
http://trevlac.us/colorCorrection/YUY2toRGB219.zip
LoadPlugin("X:\someplace\YUY2toRGB219.dll")
AVISource("my.avi")
#true/false for interpolate when going from 4:2:2 YUY2 to 4:4:4 RGB
YUY2toRGB219(true)
@Arachnotron
I checked out the scope. Don't know how I missed that. I always like more tools/options. Especially with source so you can see exactly what is going on (not so easy to read, but better than Croatian. ;)
@Wilbert
I took a look at the plugin and got most of the functions to work thru avisynth. I'll post a 'how to' script on the Avisynth Usage board after I get it together this weekend.
Arachnotron
12th March 2004, 17:18
@Trevlac
I always like more tools/options.
Did you seethis (http://www.digilava.com/products/vscope/default.html) one? Not with source, but perhaps gives some idea's :)
trevlac
12th March 2004, 18:34
Originally posted by Arachnotron
Did you seethis (http://www.digilava.com/products/vscope/default.html) one? Not with source, but perhaps gives some idea's
I looked at that way before I had any idea of what I was doing. (Actually, a more interesting aspect of this hobbie is that the more you learn, the more you realize how little you know. So I bet I thought I knew what I was doing. ;)
Problem was that I couldn't figure out how to use it before the 30 day trial ran out. And they were charging something like $75 for it.
As I recall, it does not work with files, but with a capture card. You are supposed to adjust your driver settings. The thing I've learned since is that the driver settings really do adjustments in digital. You may get 10bit adjustments, but the source is definately sampled before you get to mess with it. I'd rather do this in post. I don't trust the drivers.
Now, if you had some kind of procamp between your source and your card, this would be quite useful. Especially if you could get colorbars out of your source.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.