Log in

View Full Version : Avisynth newbie - Colorspaces and Contrast


wackman
23rd November 2005, 11:06
Hey all,

I used to use pretty much just tmpeg for avi->mpg2 conversions. For the last couple of months, I've been using Avisynth and Quenc. So far, they've only been the simple:


AviSource("movie.avi")
LanczosResize(720,480)
ConvertToYV12


A lot of the dvd rips I convert seem rather dark on my monitor, so I want a way to tweak the brightness/contrast levels. Tonight, I found on another post, the following line:

colorYUV(gamma_y=64, gamma_u=68, gamma_v=72, off_y=-4, gain_y=-8)

I know those values are not necessarily going to work everywhere, but it seemed good for the conversion I was doing, so I ran with it. Now, I'm trying one movie which is RGB32 colorspace. I can't use that line or play around with it because it says that colorYUV doesn't support RGB32. I'm having trouble finding anything comparable.

One thing I like about Tmpgenc (I'm using the 2.5x version) is the simple color correction. I'd like a way I can just find my brightness/contrast/gamma values and plug them into a line in my avs.

I don't necessarily need a long explanation or anything. If there's any links the gurus could send me to figure all this out, that'd be great.

Also, one more barely related question. A long time ago, I learned how to read histograms (eg: tmpgenc's custom color correction). I have since forgotten how. On a histogram, do I want there to be peaks on the ends? Do I want to get it as close to flat as possible? Do I want to adjust so the middle comes up? ???

Thanks for any and all help.

Wackman

PS: These conversions are for burning to dvd to play on my standalone player. I used to get over zealous and end up with what would look fine on my monitor, but overly bright (almost 'shiny') on my tv. I just thought I'd throw that in.

freelock7
24th November 2005, 08:03
Use colormatrix
http://forum.doom9.org/showthread.php?s=&threadid=82217

wackman
25th November 2005, 02:48
Well, Colormatrix didn't help me. Besides there being virtually no usage documentation, I don't think there's any way to set your brightness/contrast levels.

I did get Tweak figured out, though. For anyone struggling, here's what I put in my script, after some trial and error:



AviSource("movie.avi")
ConvertToYV12()
Tweak(bright=25,cont=1.5,sat=1.5)



Turned this:

http://img297.imageshack.us/img297/3249/snap3636notweak5sx.jpg (http://imageshack.us)

into this:

http://img297.imageshack.us/img297/8820/snap3636tweak1kd.jpg (http://imageshack.us)

I hope this helps people. By the way, my reference for using it is the following site: http://neap0litan.thebeardofze.us/walkthrough/video/Tweak_Help.html

Wackman

freelock7
25th November 2005, 07:31
I don't think there's any way to set your brightness/contrast levels.


You can adjust the luma through virtualdub.
Load your avs file. Go to <filters> option and choose <levels>.
Adjust manually the brightness and correct gamma.
Transfert your setting in the avs file and encode with QuEnc.
Exemple: Levels(0, 1, 255, 16, 235)

Here a guide to use VD:http://www.divx.com/support/guides/guide.php?gid=8

Mug Funky
25th November 2005, 15:18
@ wackman:

the guy 2nd from the right has a little clipping on his sleeve. might want to back the settings off a bit :)

a brighter scene could get very washed out.

HDRAGC works very well as a contrast fixer.

[edit]

btw, isn't this the wrong forum? avisynth usage would be much more fun for this kind of thing :)

shirohamada
25th November 2005, 22:18
ylevels
http://forum.doom9.org/showthread.php?t=79898&highlight=ylevels

wackman
27th November 2005, 08:40
@Mug Funky, you're right. Right after I posted this, I backed off on the settings just a bit.

It's funny. During Thanksgiving dinner, I was showing a picture slideshow for relatives. About 10 people crowded around my computer and they were all complaining about how dark all the pics were. My REAL problem is probably the brightness on my monitor. Gotta look into that.

And now I realize, yeah, probably the wrong forum. When I started this, I thought it had more to do with the colorspace I was passing to the encoder. Now I realize I just gotta get more familiar with the avisynth filters. Sorry, all.

@freelock, I'll look into the virtualdub guide sometime. Thanks.

Wackman