View Full Version : picture too dark with avisynth script
91638
17th June 2004, 16:35
Hi,
i noticed that the picture ist too dark when i use avysinth as frameserver. No matter what Version of Avisynth i use, always the same problem. If i open the *.d2v file in TMPG the picture is O.K.
Does anybody know a solution for this problem. I used the search in this forum but found no thread helping me.
I know my english is worth to improve but maybe you can understand my problem and help me. Thanks.
Guest
17th June 2004, 22:11
Please post your Avisynth script and tell us what you were frameserving it into when you observed the dark colors.
91638
18th June 2004, 05:44
I used the following script just to if the problem occurs in Avisynth. For this reason i did not
use any filters. Source Material is from DVD.
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToYUY2()
To solve the problem i inserted the following line
Levels(0,1.18,255,0,255,false)
the colors seems to be correct now, but i do not know if this is the best way.
Thanks for your help.
DarkNite
18th June 2004, 08:44
If you check the documentation you will notice that the luminance offset of MPEG2Dec3 is by default -2, and I don't recall if that was changed in MPEG2Dec3dg.
Didée
18th June 2004, 10:23
mpeg2dec3 does not perform any luma offset.
it's LumaFilter() which defaults to a -2 offset.
- Didée
Leak
18th June 2004, 14:26
Originally posted by 91638
Hi,
i noticed that the picture ist too dark when i use avysinth as frameserver. No matter what Version of Avisynth i use, always the same problem. If i open the *.d2v file in TMPG the picture is O.K.
Does anybody know a solution for this problem. I used the search in this forum but found no thread helping me.
What do you do with your AviSynth files? Open them in a media player?
If so, maybe the media player uses the graphics card's video overlay while TMP doesn't - since you should be able to control contrast, brightness, saturation, gamma and hue of the overlay independently from the desktop settings, that might explain the difference...
Which graphics card do you have? Which OS? What other software do you use?
np: The Orb - Orb Is (Shopping Version) (Bicycles & Tricycles)
Wilbert
18th June 2004, 14:38
If you feed your avs script to TMPGEnc (I guess you do that, but that's not entirely clear from your post), you should end with
ConvertToRGB24()
I think that will solve it. As for the cause of this. Could you open the script
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToYUY2()
in VDub, and tell us which decoder is used (under file -> file information)?
91638
18th June 2004, 19:38
i feed the script in vdub and recognized the darker picture in comparison to open the vobs in DVD2AVI or the created d2v file in TMPG.
I only opened the d2v file in TMPG to check if the problem is caused by DVD2AVI, but the result shows that the error appears in Avisynth.
In VirtualDub the used decoder is YUV 4:2:2 (YUY2).
Maybe this helps you for a hint to solve the problem. Thanks a lot.
Wilbert
18th June 2004, 21:16
The error is not in AviSynth, the problem is the luma range when converting YUV to RGB (in VDub or TMPGEnc).
Try
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToRGB()
and open it in VDub. Do you still have that problem?
jorel
19th June 2004, 01:07
Originally posted by 91638
I used the following script just to if the problem occurs in Avisynth. For this reason i did not
use any filters. Source Material is from DVD.
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToYUY2()
To solve the problem i inserted the following line
Levels(0,1.18,255,0,255,false)
the colors seems to be correct now, but i do not know if this is the best way.
Thanks for your help.
i agree,the same here. a few months ago,gerti67 post here great explanations about levels and send me this link with pictures to do comparisons : http://free.pages.at/gerti67/pictures/tweak-levels.jpg
and i did that *thread with his link and Wilbert post his great impressions and observations cos i was getting the same problems like 91638 posted and without use ConvertToYUY2() or ConvertToRGB() in the script. i always get dark scenes using avisynth comparing with the dvd source. this thread here will give me great clarifications about this problems cos i always post about it but don't knew that avisynth give this "darkness" in the scenes(if is avisynth the reason)
before all my encodes (always from dvds) i test the script with levels to get the seamless brightness as the source using from 1.02 to 1.2 in gamma adjusts. last week i did "chicken run" and i'm doing again cos is too dark in tv using gamma 1.03!
edited> forgive me,
i forgot to post the thread with Wilbert clarifications:
http://kvcd.net/forum/viewtopic.php?t=5153&highlight=levels
jorel
19th June 2004, 03:11
screenshots for comparisons.
from vob in vdubmpeg2: http://img37.imageshack.us/img37/6026/vob.jpg
from avisynth script(using dvd2avi project) in vdubmpeg2: http://img37.imageshack.us/img37/5411/avisynthscript.jpg
91638
19th June 2004, 06:30
Thanks jorel. That is exactly the problem i tried to describe. I will read the threads and hope that i will see clear after that.
@ Wilbert
there is no difference between ConvertToYUY2() and ConvertToRGB().
@all
To make the difference visible i've uploaded the following three pictures
Picture in DVD2AVI
http://img31.imageshack.us/my.php?loc=img31&image=dvd2avi2.jpg
or
http://de.geocities.com/saufkopp2001/dvd2avi2.jpg
("Right-click" and "Save target as..." )
Picture in VirtualDub with the AVS-Script
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToYUY2()
http://img31.imageshack.us/my.php?loc=img31&image=avisynth0.jpg
or
http://de.geocities.com/saufkopp2001/avisynth0.jpg
("Right-click" and "Save target as..." )
Picture in VirtualDub with the script from above and
Tweak(0 , 0.87 , 10.0 , 1.0)
http://img31.imageshack.us/my.php?loc=img31&image=tweak2.jpg
or
http://de.geocities.com/saufkopp2001/tweak2.jpg
("Right-click" and "Save target as..." )
jorel
19th June 2004, 07:49
i can't see the pictures posted (geocities problems-Diese Seite ist nicht verfügbar),try "host" your pictures here(thanks DDogg): http://www.imageshack.us/
91638
19th June 2004, 09:42
Try "Right-click" and "Save target as..." and have a look at them.
Also posted the images at ImagShack. Links in the thread above.
baz00ie
20th June 2004, 23:37
Hello 91638,
I haven't seen much disscussion on this topic, but i know that it can be an issue. Here are some AviSynth settings that i've found to be effective when dealing with a "too dark" image from a DVD
Levels(0,1.22,255,8,255)
... and if you think the colours seem a little too thin you might try boosting the saturation a bit as well...
Tweak(hue=0.0,sat=1.2,bright=0.0,cont=1.0)
good luck
baz
91638
21st June 2004, 11:33
Thanks for your hints baz00ie. I will test your settings.
Wilbert
21st June 2004, 11:59
I would like to see the same screenshot (in VDub) for the following script
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToRGB()
91638
21st June 2004, 14:03
Picture with the following script:
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToRGB()
http://img32.imageshack.us/my.php?loc=img32&image=chucky.jpg
Maybe you have an idea Wilbert.
trevlac
21st June 2004, 14:11
@91638
Your black level in the avs jpg is set to 0 while in the d2v jpg, it is set to 16. It of course should be 16. The white level is the same in both.
You should not muck with the gamma, the hue, the sat ...
To move the black level up and keep the same white level do:
Tweak(bright=14, cont=.89)
This is what I see when I measure the samples with a histogram. BTW, I would not use levels. It will also change the saturation. The theoretical fix is Tweak(bright=16, cont=.93). So the 'right' answer maybe somewhere in between, seeing that I had to convert a bit to get a working sample.
It seems to me that Wilbert is on the right track. The difference could be due to how MPEG2DEC3dg serves RGB data vs YUV data. It could also be due to how YUV data (which is what comes out of avs) gets converted to RGB on your machine. RGB is what you see in vdub and TMPGEnc, btw. Wilbert is trying to determin the latter.
[edit]
Now with your ConvertToRGB I would say look at MPEG2DEC3dg. It must output YUV to Avisynth and RGB to VDub/TMPGEnc. I'm not sure how to get it to output RGB to Avisynth. Can't say I know much about it, so do don't take my word on it. ;)
Wilbert
21st June 2004, 14:36
Your black level in the avs jpg is set to 0 while in the d2v jpg, it is set to 16.
So that means that MPEG2DEC3dg.outputs [0,255] (well, at least in this case)? How can this be?
@91638,
Could you upload 10 (dark) frames of the vob somewhere (cutting it with vobedit)?
If that's not possible, could you make the same screenshots with mpeg2dec3 (v1.10) and dvd2avi (v1.76)?
91638
22nd June 2004, 05:51
@ Wilbert
Do you mean mpeg2dec3 from decodefix 1.10?
If you mean this i already use this dll with DVD2AVI 1.76.
I will search for ten black frames in the movie and will upload them today.
Boulder
22nd June 2004, 06:27
Originally posted by 91638
@ Wilbert
Do you mean mpeg2dec3 from decodefix 1.10?
I think he means the version that Nic and trbarry released.
http://nic.dnsalias.com/mpeg2dec3.html
jorel
22nd June 2004, 07:22
@ Wilbert, Boulder and all
the screenshots that i posted was using mpeg2dec3.dll v1.10 and dvd2avi176 from D2s!
from dvd2avi176 with mpeg2dec3 v110 and avisynth 255: http://img37.imageshack.us/img37/5411/avisynthscript.jpg
from vob: http://img37.imageshack.us/img37/6026/vob.jpg
91638
22nd June 2004, 08:04
Tried to upload the file to yahoo but always the error invalid filename, no matter what name the file has. So if you are interested in the file i could send you this via email.
Instead i made screenshots with the mpeg2dec3.dll version 1.10
The first one with ConvertToRGB()
http://img39.imageshack.us/my.php?loc=img39&image=MPEG2DEC3_ConvertToRGB0.jpg
The second with ConvertToYUY2()
http://img39.imageshack.us/my.php?loc=img39&image=MPEG2DEC3_ConvertToYUY0.jpg
trevlac
22nd June 2004, 14:24
@jorel
I'm not 100% sure how you made your pics, but the avs one looks like a PC->TV version of the vob one. It has a higher black level and a lower white level. Also, the avs one looks like the V (of YUV fame) was stretched a bit. I can see gaps in it when graphed. However, the saturation is still low.
Bottom line:
ColorYUV(levels="TV->PC") will make the avs one look like the VOB one.
The vob one is still a bit better, because the avs one has gone thru some changes.
@91638
Your 2 new pics look the same. They both have a lower black level than your prior d2v pic. I also sure the white level is the same for you an all pics. This means you do not have the same issue as jorel. Finally, the color saturation looks the same for you on all pics. This is harder to tell, because the pics are so dark. I still think if you do the tweak bright and contrast things, it will fix your pics.
Wilbert
22nd June 2004, 14:38
I'm not 100% sure how you made your pics, but the avs one looks like a PC->TV version of the vob one.
I agree with you, but this shouldn't be possible.
Tried to upload the file to yahoo but always the error invalid filename, no matter what name the file has. So if you are interested in the file i could send you this via email.
Could you try uploading a zipped version? Also, how large is it?
Kika
22nd June 2004, 15:19
@91638
I suggest to extract a Pic from the encoded Video, not from VirtualDub and not from any other programm before it is encoded.
Use this Script:
LoadPlugin("D:\Videobearbeitung\AviSynth 2.5\plugins\MPEG2DEC3dg.dll")
Mpeg2Source("G:\chucky.d2v")
ConvertToRGB24()
And ensure NOT to set the Option Output YUV data as Basic........ in TMPGEnc.
jorel
22nd June 2004, 17:31
Originally posted by Wilbert
[B]I agree with you, but this shouldn't be possible.
Wilbert, trevlac, Kika and all
edited> all pictures are before any encode(1 from vobs and 2 from d2v),loading in vdubmpeg2 and did a screenshot(source to clipboard)and paste in paint,resize 80% and save as .jpg! the preview in vdubmpeg2 show more details than the screenshots! <edited
the pictures posted was using "PC scale" in d2a176 and was resized(80%) to put in the link that don't accept more than 850Kb size. trust me, i post like i wrote.
i have new pictures with 80% of the size,take a look please:
vobs:
http://img34.imageshack.us/img34/5236/vobs.th.jpg
http://img34.imageshack.us/img34/5236/vobs.jpg
using pc scale in dvd2avi project:
http://img39.imageshack.us/img39/7083/pcscale.th.jpg
http://img39.imageshack.us/img39/7083/pcscale.jpg
using tv scale in dvd2avi project:
http://img34.imageshack.us/img34/516/tvscale.th.jpg
http://img34.imageshack.us/img34/516/tvscale.jpg
i posted about that differences in kvcd forum a long time ago.(if needed i post the link, was in Fri Mar 19, 2004)
all my encodes from all dvds are always dark comparing with the original dvds,
it happen with all sources (movies or cartoons) using PC scale or TV scale without any resize or filter in .avs script! i did lots of samples to compare encodes in tv trying to find the reason of that "darkness".
:arrow: but before that tests, we can only "feel" that something is wrong after all job is done getting the dark and with faded colors(washed) pictures in tv !
...(and i want to do all the job again) :( and believe me, i redo (from the begining)
for me,the picture from the vob have ~15% better color and ~10% more bright/contrast and we are loosing that details BEFORE we start to encode!
today i posted the same in kvcd forum:http://kvcd.net/forum/viewtopic.php?t=11927
thanks for your atention! :)
Wilbert
22nd June 2004, 17:41
@jorel,
Assuming you opened the d2v file in avs, without any color conversion in your avs script, and made a screenshot in VDub (please confirm):
What incredible said at kvcd.net is false: "YEP! In DVD2AVI if setting Scale PCtoTV the luma will be keeped within the TV Luma range."
If you open the d2v in avs, that setting is ignored (hence your *latter* two screenshots show no difference). That settings is *not* ignored if you open the d2v file in VFAPI or TMPGEnc.
The real question is why your latter two screenshots are darker than the vob one. Btw, how did you make the vob screenshot?
jorel
22nd June 2004, 17:54
@ Wilbert
i confirm. was loading only d2v file in avs with
LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\pc.D2V")# first script for pc scale
and
LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\tv.D2V")# second script for tv scale
and you wrote:
"The real question is why your latter two screenshots are darker than the vob one"
---> but this is my question! :p i don't know the reason(kidding but true)
the vob screenshot was loading the vob in vdubmpeg2 exact like i did using the scripts posted. i think that no matter if any color convertion was used(and i don't use) the results would be the same in all screenshots, right or wrong? (real doubts in this question) :confused:
edited> sorry, i forgot this importants details:
the result of the encode is always dark and with colors faded if compared with the original dvd in the pc or in the tv,seamless the pictures posted!
Wilbert
22nd June 2004, 20:07
I tried it myself with the movie From Hell (**).
1) vob -> vdubmod -> png
2) vob -> d2v -> avs -> vdubmod -> png
You guys are right. There is a difference in brightness (the latter being a bit darker).
When using ColorYUV(analyze=true) in the second script, I saw that the minimal luma value was 7 for a particular frame. But, a lot of frames had a minimal luma value smaller than 16 (*).
I also found a frame with maximal luma of 243.
(*) yes, I cropped all black borders away.
(**) using mpeg2dec3 1.10 and dvd2avi 1.76.
What to do next?
Originally posted by Wilbert
What incredible said at kvcd.net is false: "YEP! In DVD2AVI if setting Scale PCtoTV the luma will be keeped within the TV Luma range."
If you open the d2v in avs, that setting is ignored (hence your *latter* two screenshots show no difference). That settings is *not* ignored if you open the d2v file in VFAPI or TMPGEnc.
Yep right Wilbert, I mixed it up with VFAPI RGB.
Didée
23rd June 2004, 07:52
It could be of interest to read this old thread (http://forum.doom9.org/showthread.php?s=&threadid=37082) once more - one out of several.
Everytime the topic comes up, I get the bad feeling to have encoded rubbish all these years ...
- Didée
Kika
23rd June 2004, 08:57
I really don't see where the Problem is.
MPEG2Dec ignores the Settings of DVD2AVI (i don't like this behavior!), any other application will not.
If DVD2AVI/MPEG3Dec are doing they job correctly, you will get the Luma-Range of 16-235. On YUV->YUV- or RGB->RGB-Transformations, the Range isn't changed, on YUV<->RGB-Conversions, it is.
So if you are Converting to RGB, you will get 0-255, if not, the Range will stay at 16-235. I don't see a necessity to use commands for changing the Luma-Range.
So, at the end, what will you Script deliver to an Encoder and how is the Encoder acting?
CCE ignores it's Luma-Range-Settings if YUY2 is delivered, if you feed CCE with RGB24, the settings are use.
TMPGEnc always needs RGB24, so it is a good Idea to use ConvertToRGB24() as last command in the Script. Without this Command, a System-Codec has to do the YUV->RGB-Conversion, and maybe this Codec will distort the Luma-Range.
Originally posted by Kika
If DVD2AVI/MPEG3Dec are doing they job correctly, you will get the Luma-Range of 16-235. Thats how I understood it too!?
And thats how I also tried it (seen as a whole) to explain to Jorel in the KVCD Thread as I always want to end up in 16-235 encodings for TV purposes.
So did we really encode rubbish all these years? :eek:
Wilbert
23rd June 2004, 09:59
@Kika
I agree with all that, but something fancy is going on. Consider the following two cases:
1) vob -> vdubmod -> png
2) vob -> d2v -> avs -> vdubmod -> png
For (2) we used the script
LoadPlugin("C:\xxx\MPEG2DEC3.DLL")
mpeg2source("F:\xxx.D2V")
ConverToRGB24()
In the second case, avs should deliver [0,255] RGB to VdubMod, and there's no YUV->RGB conversion in VDubMod. So, this should be the correct clip.
The only problem is that it is a bit darker than the first clip.
In the first case, VDubMod makes a YUV->RGB conversion (iirc VDubMod does the conversion, not some codec ?). The only thing what can go wrong is that VDubMod keeps the luma range when converting, ie YUV [16,235] -> RGB [16,235]. But, I'm pretty sure you get RGB [0,255] (*). So, that implies that the first clip is also correct.
So, which one is correct?
(*) will double check that tonight.
A quote from Didee's thread (about a separate problem, at least I think it's a separate problem):
While the majority of Avisynth filters operate in YUY2 space, it's not clear which of them are guaranteed to produce 16-235/240 output, or even if they should only produce that range. It certainly seems that mpeg2dec passes out-of-range pixels through without clipping, even though these pixels seem always to be compression artifacts.
I agree that "mpeg2dec passes out-of-range pixels through without clipping". But, how do we know for sure that these pixels are just compression artefacts? I guess we could make those pixels visible with Levels. I will post some screenshots tonight.
Kika
23rd June 2004, 10:29
@Wilbert
Can't do that here, but did you ever compare DVD2AVI 1.76/MPEG2Dec3 to newer Versions of the Tools?
As far as i can check it, VirtualDubMod does the same Kind of MPEG2-Decoding MME does with the Setting
YUV-Range: ITU-R BT.601-Range
And that gives me always the correct Luma-Range. Extracted Pictures from VirtualDubMod and MME are exaktly the same than extracting a Frame from the D2V (TV-Settings) by using TMPGEnc.
jorel
23rd June 2004, 16:39
@ ink(incredible) and Didée posted about "did we really encode rubbish all these years?" in my opinion when we(well,you all,not me)find what is giving this dark result,i will trash my encodes and will redo everything again!
@ all
another point is that: it's not vdub that is giving the dark image,i don't use vdub in my convertions.i used this tool only to get the pictures to post. my encodes using D2S to or all tools needed to do my kdvds,always result dark comparing with the dvd source in tv or in pc.then,if vdub give some error in my case is irrelevant cos i don't use it in my encodes. i posted: "the pictures show less details than the images in vdub -->or loading in all suported places that open the scripts and vobs<--, or the results of samples encoded in the tv or in pc!" and "the result of the encode is always dark and with colors faded if compared with the original dvd in the pc or in the tv,seamless the pictures posted!" the "problem"(as i call) start between dvd2avi and before the encoder...something in the middle os this passes! ok,i can be wrong but i'm catching this problem fro more than a year and was the best that i could do! :o thank you boys!
edited> details...last year was using old versions of meg2dec or mpegedec3 in D2s and the result is the same with the new mpeg2dec3 versions! the "old" versions give the same result of the "new" versions!:)
Wilbert
23rd June 2004, 23:17
The only thing what can go wrong is that VDubMod keeps the luma range when converting, ie YUV [16,235] -> RGB [16,235]. But, I'm pretty sure you get RGB [0,255] (*).
Checked it, [0,255] is indeed correct.
I made a plugin which shows the out of bound values (red for pixels with luma < 16, and green for pixels with luma > 235). Requires YUY2 or YV12, but the latter doesn't work correctly.
http://www.geocities.com/wilbertdijkhof/ShowOutOfBound.zip
Screenshots:
luma < 16
http://www.geocities.com/wilbertdijkhof/ShowOutOfBound.png
luma < 14
http://www.geocities.com/wilbertdijkhof/ShowOutOfBound2.png
luma < 12
http://www.geocities.com/wilbertdijkhof/ShowOutOfBound3.png
So, are these just compression artefacts?
edit: replaced the pics.
Kika
24th June 2004, 09:28
What are die Luma values of the "false" Pixels? Maybe it's the result of rounding errors while iDCT or YUV->RGB conversion.
Wilbert
24th June 2004, 10:55
It has nothing to do with YUV->RGB conversions, because that takes place after applying the filter.
What are die Luma values of the "false" Pixels?
I will post some additional pics tonight, with different lower levels.
Oh, I also got an idea ...
trevlac
24th June 2004, 20:40
Originally posted by Wilbert
Oh, I also got an idea ...
Me too. :D
Add a luma clamp function to your filter
Add a 'setup change' function from 0 to 16
Show us where chroma is out of range
Show us where chroma is oversaturated > IRE 100, 110, 120
Add a Fix the chroma saturation option by lowering intensity or saturation
Wilbert
24th June 2004, 21:13
Nice ideas! I will implement them.
About the problem itself. It's getting pretty annoying. I tried to duplicate it by making an "out of bound" YUV-mpeg2, where the upper half had a luma value of 0, and the lower half a luma value of 50. But, if I redo the test on this source it shows no difference :confused:
Perhaps the problem is chroma related?
Kika
24th June 2004, 22:58
Which Encoder did you use for creating the MPEG2-Vid?
If TMPGEnc, create a Source with Luma 16-235 and use YCbCr-Mode.
Or create a Source with a Luma Range of 0-255 and use CCIR-Mode.
It works, belive me. ;)
Wilbert
24th June 2004, 23:37
If TMPGEnc, create a Source with Luma 16-235 and use YCbCr-Mode.
I used a RGB with Luma 0-255 with YCbCr mode checked to make the out of bound m2v.
baz00ie
30th June 2004, 19:38
My take on this is that DVDs are intentionally encoded at lower luminance levels inorder to look "correct" when viewed on your living room television set. The data on a DVD has a full luminance range of 0-255, but when the signal passes through your television, the range is cliped to 16-235 which will alter the "brightness/contrast" of the image. If the image levels on your DVD matched the image levels of the original film, then the final output on your television would look much too bright and "washed-out". Inorder for the image to look "correct", the source data must be that of a lower level to compensate for the reduced luminance range. With this in mind, your method of processing should be determind by how you wish to view the encoding in it's final form.
If you're creating a VCD, SVCD, or something similar that you want to watch on a televison set, then there should be no need to change the luminance range at all - try to make the new encoding match the DVD as well as you can.
If, however, you wish to view the video on your computer, then my advice to you is to adjust the image's luminance/levels during the encoding process so that the final output will match the original film.
During my encodings I included the setting "Levels(0,1.22,255,8,255)" to help make the video match the original film. This setting is not written in stone, but to my eyes it seems to provide a good starting point.
NOTE: The above setting, when viewed through VirtualDub, will seem a bit too bright, but will look "correct" when viewed through Mediaplayer, because the Windows Directshow Overlay will add contrast to the playback.
Bascially what I'm saying is, the software is fine - it is exactly what it needs to be. DVDs are fine - they are exactly as they need to be. It is simply up to YOU to decide how the media needs to be encoded with regards to it's final output/format.
take care
Wilbert
30th June 2004, 23:10
My take on this is that DVDs are intentionally encoded at lower luminance levels inorder to look "correct" when viewed on your living room television set. The data on a DVD has a full luminance range of 0-255, but when the signal passes through your television, the range is cliped to 16-235 which will alter the "brightness/contrast" of the image.
Maybe, maybe not. What do you think happens (with the luma range) when opening a vob in VirtualDubMod, assuming that the luma range is [0,255]?
It's certainly not true that the luma range is just clipped, as you suggest what happens for the TV.
I will post the artificial test clip tomorrow with luma range [0,255] (which I was talking about a few posts back).
trevlac
1st July 2004, 00:59
Originally posted by baz00ie
My take on this is that DVDs are intentionally encoded at lower luminance levels inorder to look "correct" when viewed on your living room television set. The data on a DVD has a full luminance range of 0-255, but when the signal passes through your television, the range is cliped to 16-235 which will alter the "brightness/contrast" of the image.
If you look at the digital spec (sorry forget the number ... it's in the doom9 cap guide) you will see that luma is supposed to be encoded with black at 16 and white at 235. This is a 'full' range. When this is sent to a TV as an analog signal, 16 is set to the appropriate black level and white is set based upon how cranked up your contrast is.
You are mixing how digital data is stored and how it is played back on a TV.
If the image levels on your DVD matched the image levels of the original film, then the final output on your television would look much too bright and "washed-out". Inorder for the image to look "correct", the source data must be that of a lower level to compensate for the reduced luminance range. With this in mind, your method of processing should be determind by how you wish to view the encoding in it's final form.
No doubt, when a dvd is created, it is color adjusted to look good on a TV. Still, this is a different thing than the digital storage values.
If you're creating a VCD, SVCD, or something similar that you want to watch on a televison set, then there should be no need to change the luminance range at all - try to make the new encoding match the DVD as well as you can.
True ... but I think the issue in the thread is that a given piece of software changes the range depending on how you use it.
If, however, you wish to view the video on your computer, then my advice to you is to adjust the image's luminance/levels during the encoding process so that the final output will match the original film.
This is a bit of a subjective process. Matching the film on a given monitor would be done by eye. No doubt, the gamma of a PC monitor is different than that of a TV. However, the final display can also be adjusted at playback time.
During my encodings I included the setting "Levels(0,1.22,255,8,255)" to help make the video match the original film. This setting is not written in stone, but to my eyes it seems to provide a good starting point.
This I assume is for PC viewing. It is good to know that with avisynth levels, the reduction from 0-255 to 8-255 will also slightly reduce the color saturation.
NOTE: The above setting, when viewed through VirtualDub, will seem a bit too bright, but will look "correct" when viewed through Mediaplayer, because the Windows Directshow Overlay will add contrast to the playback.
Good point. PC is a messy playback device.
Bascially what I'm saying is, the software is fine - it is exactly what it needs to be. DVDs are fine - they are exactly as they need to be. It is simply up to YOU to decide how the media needs to be encoded with regards to it's final output/format.
I don't agree on the software thing. Sometimes the software changes the luma range where it should not. If I reencode a DVD for playback on my TV, I may inadvertently change the range.
Didée
1st July 2004, 11:50
NOTE: The above setting, when viewed through VirtualDub, will seem a bit too bright, but will look "correct" when viewed through Mediaplayer, because the Windows Directshow Overlay will add contrast to the playback.
That's the wrong way round. The preview in Vdub is the one to trust. If it then appears too dark when played through overlay, then you have to adust your overlay settings, not your encoding settings.
One part of the problem is that hardly anyone uses a calibrated display setup. I've seen some really funny setups on some of my friend's PCs ... /*shudders*/
Here I'm not even talking about scientific calibration. But its really not so hard to make some test pictures with
- squares /w RGB values of [2,2,2] [4,4,4] ... [16,16,16] in a BLACK frame
- the above, but inverted
- similar for saturation
- full gradient pictures for greyscale, main colors R,G,B,Cy,Mg,Yel
and then check all of them for if there is still information to distinguish in the very ends of the respective ranges, etc. pp.
After that, one may proceed.
And I wonder myself why ALL hardware overlays (that I know of) are ALWAYS way too dark with factory settings, and always have to be adjusted.
Can anyone tell reasons for that??
- Didée
jorel
2nd July 2004, 15:39
hello again boys! :)
using all dvds that i have,i'm still getting darkness after avisynth script comparing with the source!
some consensus? anyone is still doing tests and searching results? recomendations (filters/parameters)?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.