Are you looking at RGB or YUV? It's perfectly normal for YUV 16-235 to be expanded to RGB 0-255 for display.
Brights start out a bit bright (very common with camcorders), blacks are fine:
After about 20 frames the brights come down a bit, maybe 238 or so..
Note that the waveform graph is 256 lines tall -- one line for each Y value. If you really think "a scope without a graticule is pretty useless" you can used VideoScope() intead of Histogram(). Frame 40:
Again, the graph is 256 lines tall.
+ Reply to Thread
Results 31 to 50 of 50
-
-
Well, for the live HDMI feed I'm using a program called escapi
http://sol.gfxile.net/escapi/
Technically, it's just a simple wrapper over Media Foundation, DirectMedia (or DirectShow)
https://www.elgato.com/en/gaming/cam-link -
That RGB image is normally full range, 0-255.
You would normally use the limited range matrix for this to compress the range from RGB 0-255, to YUV 16-235. No out of range YUV values are possible.
http://www.equasys.de/colorconversion.html
Last edited by jagabo; 25th Sep 2017 at 17:28.
-
So 16 - 235 is being recorded, but it's 0 - 255 when it gets to the screen via HDMI and USB. Do you concur? So I'll have to convert.
-
Technically, it's just a simple wrapper over Media Foundation, DirectMedia (or DirectShow)
Check again with
Code:DirectShowSource("video.mp4") Info()
It interfaces with the USB video device and gives me an RGB image which can be displayed on the screen -
We can optimize for my machine, but what happens when Joe Doakes down the street tries to do all this stuff on his unoptimized computer? That's something to keep in mind.
I'm not trying to be argumentative, but we must consider all use cases. -
What's viewed is RGB 0-255. What's stored in the video file is YUV 16-235. That is the industry standard (DVD, Blu-ray, streaming video, etc.).
Sometimes you need to force the color with pixel_type=...
Code:DirectShowSource("video.mp4", pixel_type="YV12") # or YV24, YUY2, etc. Info()
-
Ok I'm a bit confused. Are you saying you're getting 0-255 YUV from the scope plot, or did you mean 0-255 RGB?
If original is 16-235 Y , and you get 0-255 RGB , that is normal as jagabo explained. I'm just wondering why you think you have to "convert" ?
A HDMI connection from a consumer camcorder usually sends uncompressed 8bit 4:2:2 YUV . Typically, levels should match what your onboard recorder is recording, but the difference is it's uncompressed and 4:2:2. But this is an assumption, I do not know for sure if your model does.
Jagabo already explained it, but a normal PC conversion "maps" Y 16-235, CbCr 16-240 to RGB 0,0,0-255,255,255 . This is normal and expected for a computer. So if you were reading RGB zero that is expected, but Y zero is not
If you had a studio RGB setup, then YCbCr 0-255 gets "mapped" to RGB 0,0,0-255,255,255 . So if your original data was Y 16-235, RGB is also 16-235 . You mentioned studio swing earlier, but 99.999% of setups do not use this. If you had studio swing setup then you should not read zero anywhere
Unless you know exactly how your signal is being converted to RGB (is it being converted in directshow, or usb device, or somewhere else?), and what type of RGB you are using, I would forget about RGB. The ONLY important thing is Y 16-235 CbCr 16-240. That is legal in every setup. That's why a YUV waveform is critical.
Do you recall I said >90% of consumer cameras record Y 16-255 , and that most of them have usable overbrights? (ie. the 236-255 range is usable) . You showed the 16 scenario with the lens cap, but you didn't show the overexposure scenario, but I'm willing to bet your camera is in that 90% category. The top end is what usually needs to be adjusted not the bottom end
Yes I know. That's why the ONLY thing important is Y 16-235 CbCr 16-240 . That's legal everywhere. Forget about all your RGB conversions . All that optimization stuff is so you can get some sort of working monitoring device working properly so you can read levels properly . You're trying to work backwards from some RGB conversions and it can be tricky -
I've been burned by that before. If the DS filter chain outputs RGB, this can actually be a YV12=>RGB=>YV12 conversion
The reason I wanted to see Info() was to check what the default DirectShow configuration was sending. But I forgot to say that he should check both x86 and x64, because it he only checks x86, but x64 is used for the directshow path for his device wrapper, then it's meaninless
(But AVISource with UT Video Codec ALWAYS needs pixel_type now for YV12 in the newer versions. For some reason it's not automatically communicated and defaults to YUY2. But other codecs like Lagarith auto communicate the pixel type) -
ok here is another option , ffplay , from ffmpeg
Code:ffplay "MVI_0003[1].MP4" -vf waveform=scale=ire:graticule=green:flags=numbers+dots
[Attachment 43205 - Click to enlarge]
There should be a way to stack the corresponding video image with the waveform
EDIT: maybe here
https://trac.ffmpeg.org/wiki/FancyFilteringExamples#waveform
And I checked it displays values <0, >100 IRE with full range video
When you have a chance I would try to get avisynth working , maybe with lsmash. Avisynth is a very handy tool, especially with avspmod -
You guys are going way too far astray.
I didn't say anything about YUV. I don't know where you got that notion. You're confusing yourself.
The video delivered to my scope program is ultimately RGB, and apparently it's 0 - 255 and doesn't match what the camcorder is recording. What gets recorded internally in the camcorder is a black box to me. All I know is it's 16 - 235.
You can conjecture all you want about my particular DirectShow setup, etc. but it's one use case out of millions. We know that escapi interfaces to DirectShow, which AFAIK is a standard-stock Microsoft Windows 10 setup.
My scope program is read-only. It doesn't alter levels and doesn't write them to anything other than the screen display.
All I have to do is adjust my scope program to accomodate 16 - 235 and it will match what gets recorded.
When you have a chance I would try to get avisynth working -
Originally Posted by poisondeathray;2497124When you have a chance I would try to get [url=https://www.videohelp.com/software/Avisynth
http://avisynth.nl/index.php/LSMASHSource
http://avisynth.nl/index.php/FFmpegSource
For MPEG 2 video use DgMpegDec.
http://rationalqm.us/dgmpgdec/dgmpgdec.html -
It's YUV. You uploaded the original video.
But your camcorder probably records Y 16-255, not Y 16-235. It's in the "90% category" I mentioned before. If you look at the waveform in jagabo's post #31, there are "illegal" levels in the >235 area. You can do some bright exposure tests and and see how much is actually usable
But the live feed through HDMI is usually YUV in most camera, but I never checked your model , so that is an assumption
Trust me, I know how you feel x10 . Go back a few years and read my complaints. I had to revisit it many many many times. There are a gazillion "gotchas" and little quirks. But it's well figuring it out eventually. Very useful tool -
Black level is a little above Y=16. The lowest Y value I saw is 15, the highest 28. Most pixels are between 18 and 22.
See for yourselves:
Code:bin\ffplay "lens cap raw.mp4" -vf waveform=filter=lowpass:scale=ire:graticule=green:flags=numbers+dots
-
Are you looking at the correct video ?
Your lens cap video. Notice everything is above IRE 0, or Y=16 . There might be some stray pixels slightly below, from compression artifacts (it's a lossy recording after all)
[Attachment 43212 - Click to enlarge]
This is a true full range with "well below digital 16". Notice it goes below IRE 0, and above IRE 100. So below Y=16 and above Y=235
[Attachment 43213 - Click to enlarge] -
-
Ah yes, the scope is calibrated in IRE, not digital. My bad.
You're using the wrong equation.
If you're such a video professional you need to learn what IRE and YUV are.Last edited by chris319; 26th Sep 2017 at 11:46.
-
Hold on there. You've been discussing this with two of our most knowledgeable and polite forum members. You're the one that trumpeted your credentials but you're in our world now and you've wasted their time with your incorrect statements more than once and both have been very polite in setting you straight. Is it any wonder one of them finally scolded you mildly? As I see it, you had it coming. If there's an apology to be made, it should come from you.
Similar Threads
-
Mp4 H.264 MPEG-4.
By OldSchool297 in forum Video ConversionReplies: 1Last Post: 17th Mar 2017, 13:03 -
H.264 vs MP4 vs XVID Which Is Best For AVI??
By DJboutit in forum Video ConversionReplies: 5Last Post: 7th Jul 2014, 22:50 -
H.264/MP4 codec ?
By Tafflad in forum Newbie / General discussionsReplies: 88Last Post: 11th May 2014, 17:25 -
DV AVI levels to YouTube levels
By memrah in forum RestorationReplies: 18Last Post: 16th Oct 2013, 07:36 -
Huffyuv AVI to h.264 mp4
By satellite15 in forum Video ConversionReplies: 2Last Post: 6th Jan 2013, 16:23