Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th June 2004, 10:55   #41  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
It has nothing to do with YUV->RGB conversions, because that takes place after applying the filter.

Quote:
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 ...
Wilbert is offline   Reply With Quote
Old 24th June 2004, 20:40   #42  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
Quote:
Originally posted by Wilbert

Oh, I also got an idea ...
Me too.
  • 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
trevlac is offline   Reply With Quote
Old 24th June 2004, 21:13   #43  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
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

Perhaps the problem is chroma related?
Wilbert is offline   Reply With Quote
Old 24th June 2004, 22:58   #44  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
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.
Kika is offline   Reply With Quote
Old 24th June 2004, 23:37   #45  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
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.
Wilbert is offline   Reply With Quote
Old 30th June 2004, 19:38   #46  |  Link
baz00ie
Registered User
 
Join Date: Dec 2001
Posts: 36
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
baz00ie is offline   Reply With Quote
Old 30th June 2004, 23:10   #47  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
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).
Wilbert is offline   Reply With Quote
Old 1st July 2004, 00:59   #48  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
Quote:
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.

Quote:

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.

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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.
trevlac is offline   Reply With Quote
Old 1st July 2004, 11:50   #49  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Quote:
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
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 2nd July 2004, 15:39   #50  |  Link
jorel
Guest
 
Posts: n/a
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)?
  Reply With Quote
Old 2nd July 2004, 16:30   #51  |  Link
baz00ie
Registered User
 
Join Date: Dec 2001
Posts: 36
Guys, All i'm trying to do is help some people out, not confuse them even more - which is what's happenning...

Trevlac, thank you for reminding me about the saturation adjustment, i had mentioned it in an earlier post but forgot to do so in my last post.

Didée, yes i know VirtualDub has the correct colour output, but most people don't watch their movies through VirtualDub, they use their favorite player, which makes use of the DirectShow overlay - hence the added "brightness" adjustment.

Guys, if you'll notice, i always put the word correct in quotes, indicating that it was not really correct, but merly an approximation. When dealing with NTSC (North America) that's the best we can do. Television technicians work with hundreds of thousands, if not millions of dollars worth of equipment. They spend long hours trying to time the equipment using everything at their disposal - yet at the end of the the day, the final decission comes down to looking at the monitor and making adjustments based on WHAT LOOKS GOOD. And even then, they can get it wrong, you just have to watch certain shows on PBS that look like the equipment was timed by a colour blind monkey.

Of course, most of us here don't have millions of dollars worth of broadcast equipment, all we have is a 300KB "dll" file - and yet, it still comes down to WHAT LOOKS GOOD. Also, with the varying quality of DVDs on the world market, it's kinda like working with NTSC - you have to spend a lot of time trying to make them look good.

Therefor, i still stand by my suggestion, that if you're making a video to watch through your television set, DON'T change any of the levels or brightness/contrast settings. If, however, you wish to view your video through your computer, then you should make some adjustments to deal with the darkened image. The level and saturation adjustments i mentioned above are one idea, but i'm sure there are others.

Jorel, i don't think there will ever be a "perfect" solution until they start plugging the damn things directly into our brains.

take care
baz
baz00ie is offline   Reply With Quote
Old 2nd July 2004, 16:40   #52  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Did you even bother to read the whole thread? What you are describing is not the problem we were discussing here.

I will repeat it:

"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)."

In the avs script it didn't matter whether there's a color conversion or not. The problem is that both clips ((1) and (2)) should result in the same brightness, but (1) is brighter.

Jorel posted some screenshots in this thread, I also posted some screenshots here:

http://forum.doom9.org/showthread.php?s=&threadid=78514

I though the problem had to do with out of bound luma range clips, but I can't duplicate it by making artificial out of bound luma range clips from AviSynth.


The artificial clip can be found here (upper half is luma=0, lower half is luma=50):

http://www.geocities.com/wilbertdijkhof/mix.m2v

Last edited by Wilbert; 2nd July 2004 at 21:09.
Wilbert is offline   Reply With Quote
Old 2nd July 2004, 17:24   #53  |  Link
jorel
Guest
 
Posts: n/a
Quote:
Originally posted by baz00ie
Television technicians work with hundreds of thousands, if not millions of dollars worth of equipment. They spend long hours trying to time the equipment using everything at their disposal - yet at the end of the the day, the final decission comes down to looking at the monitor and making adjustments based on WHAT LOOKS GOOD. And even then, they can get it wrong, you just have to watch certain shows on PBS that look like the equipment was timed by a colour blind monkey.
i understand cos i was technician (retired) for 30 years,.. still a hobby!
Quote:
Originally posted by baz00ie
Didée, yes i know VirtualDub has the correct colour output, but most people don't watch their movies through VirtualDub, they use their favorite player, which makes use of the DirectShow overlay - hence the added "brightness" adjustment.
well, if we get this differences in vdub after load the avisynth script,the remainder steps of the encode will always be dark no matter what encoder you use to watch the result
-->in tvs without changes in the adjusts!
Quote:
Originally posted by baz00ie
Therefor, i still stand by my suggestion, that if you're making a video to watch through your television set, DON'T change any of the levels or brightness/contrast settings..[/B]
but this is the point: i don't see the differences from the dvd source and from the movie encoded in the pc only...--> i see in all my 5 tvs without change any adjust(bright,contast,saturation,etc).i posted that pictures showing that the image is dark--->after using the avisynth script and i think that need corrections in this point.
Quote:
Originally posted by baz00ie
Jorel, i don't think there will ever be a "perfect" solution until they start plugging the damn things directly into our brains.[/B]
ok, maybe it's impossible and nobody can give that "perfect" solution but this (perfections) is what i'm always searching in my encodes.
thanks!
  Reply With Quote
Old 3rd July 2004, 04:50   #54  |  Link
baz00ie
Registered User
 
Join Date: Dec 2001
Posts: 36
.

Last edited by baz00ie; 3rd July 2004 at 14:25.
baz00ie is offline   Reply With Quote
Old 3rd July 2004, 14:30   #55  |  Link
jorel
Guest
 
Posts: n/a
no...it's not a vdubmod(any version) problem...quoting myself:
Quote:
Originally posted by jorel
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/541...ynthscript.jpg
here my sample was using vdubmpeg2,as you can see...
i did tests with all vdubs but maybe i'm still unclear...i know that my english is horrible but i'm writing the same 3 times:
the result is different in the -->TV<-- after you encode the movie and use the original dvd source to compare with the same movie encoded.
the step where i found that difference was after the avisynth script!
the pictures posted was trying to show that differences and -->maybe<--- avisynth give this differences as you can see in the pc -->too<--!

and the 91638's post is showing the -->same<-- problem like he wrote:
Quote:
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.

I know my english is worth to improve but maybe you can understand my problem and help me. Thanks.
are we still unclear?


hey...you erease your post and now my answer is without sense!
but i still have your pictures posted before you edit your post!
  Reply With Quote
Old 21st July 2004, 00:42   #56  |  Link
jorel
Guest
 
Posts: n/a
hy all!
no news about that problems or temporary solutions? i stop to encode waiting better results and, using the last avisynth version the same is happen! thanks.
  Reply With Quote
Old 21st July 2004, 08:20   #57  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Well, obviously no-one has better ideas or findings to come up with, and so haven't I. Somewhat clueless here as well.

But I have a temporary solution for too dark pictures

Check this thread. These little functions come quite handy for brightening up too dark video, while mostly avoiding the washed-out look one usually gets by "normal" level/gamma adjustments.

Speed-wise, they should run easily @ realtime in ffdshow. But honestly, I didn't even check up to now if it *works at all* in ffdshow - so little time, again ...


- Didée
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 12th September 2004, 00:30   #58  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
@Didee, Jorel and others,

We finally found out this cause of this, and how to correct it using an avs filter. See:

http://forum.doom9.org/showthread.php?s=&threadid=82217
Wilbert is offline   Reply With Quote
Old 23rd January 2007, 19:02   #59  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
I am apology for return this form dead, but i want to say that colormatrix can't help in this, nevermind is source avi or avs, encoded mpeg via tmpgenc 2/3/4, contarst is different. So is there some other solution, because i tryed all combinations in colormatrix 2.

Thanks
shon3i is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.