logo Sign In

Please help me with histograms.

Author
Time
I have downloaded the histograms from this thread., and need help on how to use them.

I don't even no where to begin to use histograms. Can someone plaese help me?


Author
Time
This is how I did it:

You'll need the following tools:

Avisynth
DGIndex
VirtualDub
TMPGEnc Encoder
Colourlike Plugin for Avisynth

The histograms are generated with Avisynth but since we already have the ESB histrograms we just need to write the code to match the SE colors to the original.

First you need to rip your DVD to an M2V file.

Open your M2V movie file in DGIndex and save the project as D2V file. Make sure to check "Forced Film" under Video>Field Operation.

This is where Avisynth comes in. Open Notepad and write the following code:

LoadPlugin("C:\AviSynth 2.5\DGIndex\DGDecode.dll")
mpeg2source("C:\EMPIRE_STRIKES_BACK\VIDEO_TS\esb_dvd.D2V")
polarcolourlike("C:\EMPIRE_STRIKES_BACK\VIDEO_TS\SeDVDallPolar.txt", "C:\EMPIRE_STRIKES_BACK\VIDEO_TS\OrigDVDallPolar.txt",true,true,true)
colourlike("C:\EMPIRE_STRIKES_BACK\VIDEO_TS\SeDVDallYV12.txt", "C:\EMPIRE_STRIKES_BACK\VIDEO_TS\OrigDVDallYV12.txt")
converttorgb32(matrix="pc.709")
colourlike("C:\EMPIRE_STRIKES_BACK\VIDEO_TS\SeDVDallRGB.txt", "C:\EMPIRE_STRIKES_BACK\VIDEO_TS\FullLaserallRGB.txt")
levels(36,1,230,0,255)

Naturally change the directory paths to your own. Keep your M2V, D2V and histogram TXT files in the same folder. Save this file as an AVS, under Save as type, select "All files". Save.

You can open your AVS file in VirtualDub to see the results and adjust the levels to your satisfaction. The black and white levels do have to be adjusted otherwise you get a washed out picture. Make sure you save your code each time you make an adjustment then refresh VirtualDub to see the new result.

If everything is to your liking you can now open your AVS file in TMPGEnc and encode to DVD. If all goes well you should now have a nice color corrected file of ESB.





Author
Time
I will try this. Thank you soooo much for helping me. I will let you know whether it works.


Author
Time
I tried this and it worked. However, could you explain which of these level numbers (36,1,230,0,255) is the black and white? I can't get the washed out look to go away.


Author
Time
(36,1,230,0,255)

First number is the black level,
Second number is Gamma,
Third number is white level,
forth number is what you want to adjust black level to,
fifth number is what you want to adjust white level to.

It's still washed out? Hmm, those numbers worked for me. Glad to hear you got to work though.

Also a handy tool you can use to check the color points is CSamp. Run the cursor over the frame while you have it opened in Virtualdub.


Author
Time
Thanks for helping me. I will mess with the levels some more, but so far it is fantastic.


Author
Time
Okay, got another question. When I load the avs script in virtualdub it is interlaced is there anyway to solve this problem. I tried deinterlacing it with TMPGEnc. but it didn't work.


Author
Time
this really sounds interesting,I went back to the original thread and all the links to the histograms are expired,can some one repost them again please?
thanks
DJ
Author
Time
Sorry I forgot to mention, in DGIndex go to Video>Field Operation and check Forced Film, then save your project. Edited the tutorial.

Also this filter isn't 100% glitch free. The filter does seem to eat some details. For instance at the beginning of the film when the probe is heading toward Hoth, part of the atmosphere is desaturated. Chewie's welding sparks also lose some color. I'm sure there's more but I haven't looked at the whole film.

Here's the ESB Histograms again for anyone that still needs them. (Original credit to Desree for providing them.)


Author
Time
Thanks once again, Thundercracker, for the quick response and help.


Author
Time
Thundercracker, I was wondering if you wouldn't mind writing me some scripts using the new histograms posted by Desree? I know it probably seems like I am lazy, but I just can't get these scripts I do own my own to work.


Author
Time
I'm looking through them right now. He's got quite few new histograms so it's gonna take some time to check them all out and preview the results. But I'll help out with what I can.


Author
Time
Back once again, and as promised, this time i have scripts. For the moment, no Star Wars, just a focus on Empire since that`s what everyone seems to be working on. First the link:

Scripts

In order to use, extract the folder to your C drive so that it has a root of "C:/Empire/". You now have two choices; either load the DVD files into DGindex and save project into the Empire folder, overwriting the D2V file within, or simply open the "ESBsevideo" script, and replace the filename within to that of an already generated D2V file. You should now be able to just load any of these scripts into VirtualDub, but the comparison script is the one you`ll want to be looking at first. All of these scripts have been level corrected.
Now a couple of notes. When using the 1990 histograms (which i notice today are mislabelled within their directory), if invoking the YV12, you must use a setting of "false,true,true"-affecting the Y,U and V levels respectively-or the Y level will be too high, and you will achieve a bloom affect- the gamma is too high! Also, if using the RGB histograms on their own, DON`T use the matrix command within "ConverttoRGB32()". The default matrix is just right for this conversion, and using "pc.709" throws both the levels and the colours all over the place. The only reason it`s used after the YUV conversions is that this keeps it within the same pallette and gives a better all round colour.
In the Histogram directory`s uploaded yesterday, you`ll notice some labelled SEDVDafter(insert ending here) These were originally intended to ease the transitions from palette to palette, but i originally found that these can have some detrimental effects (blooming, pallette change, oversaturation etc.) and don`t seem to be worth using. These are not used in the comparison script, or indeed any of the scripts, but please feel free to experiment with them, that is, after all, why they`re there.
Oh, and it was mentioned earlier about the washed out look- i do believe that it can be sorted to a degree by changing the gamma levels; either "colorYUV(Gamma_y=0.7)", before using any colourlike filters, or during levels "levels(36,0.7,230,0,255)". 0.7 is only a guess, you will need to play to get it to work correctly. Once again, i hope that these help (in fact, i hope that they work). Any questions, feel free to ask.

“Ow! It`s hot in here, the butter in my pocket is melting!”

Author
Time
Just wanted to tell everyone that to avoid this error:

Script error: there is no function named "mpeg2source"


you have to add:

LoadPlugin("C:\AviSynth 2.5\DGIndex\DGDecode.dll") above mpeg2source and it will work.

Of course modify it so that the directory to DGDecode.dll is correct according to where it is located on your computer.




Author
Time
Very, cool Desree.

http://img142.imageshack.us/img142/4466/esbcomparisonsct3.png


Desree, do you think you could do this same thing for the SW histograms? I'm kind of lost with those.


Author
Time
Yes, i will be doing the same for ANH and will post that tomorrow (or maybe even later on if i get the chance to do them today). However, there are a great many caveats to go with that one- the colour correction is all over the place, and i do believe that it`s going to require switching back and forth between versions for any final script to be successful. It also required, in my original tests, the use of white balance on certain sequences (that would be the Tantive IV bits). You`ll see what i mean when i post them.
Incidentally, for everyone out there, if you put DGDecode.dll in your avisynth plugin directory it circumvents the need to call it in any script that you write.

“Ow! It`s hot in here, the butter in my pocket is melting!”

Author
Time
Cool. Looking forward to it. I know what you mean about the Tantive IV sequences. Those were one of the scenes I had been testing these out on.


Author
Time
Is there any way i can use these histograms on other films, like maybe the PT. I would love to use these on the PT to give it a dated look, but I don't know if it is possible.


Author
Time
All I can say is I can't wait for someone to get this down pat and be nice enough to make the footage available.

Things like these are the reason why I'm waiting to edit the OT, because so much better source material is always cropping up.

Can't wait to see this perfected.

My stance on revising fan edits.

Author
Time
Hello there. Okay, sorry that this is late, but- dammit- the colour `correction` on Star Wars is just bloody awful. And I`m still not happy with any of these scripts. First the link:

ANH scripts

Same as before- extract the folder to your C drive, so you have a root of "C:/ANH/". You now need to either overwrite the d2v file, or change the file and path in ANHSEvideo.avs to an already generated d2v.
What can i say? The 1985 histograms are now complete, and come in either "1985" or "1985,2" flavours. Both are crap. "1985" is the histograms from the original capture settings, "1985,2" are from a new video which uses a different white balance on capture. The first one is too red, the second too blue. The histograms i generated over the past week were too green. Frustrating.
As for the others, well, all have flaws- too pink, too green, too light. I wasn`t expecting any consistency, and wasn`t expecting any one script to solve most of the film`s problems, a la ESB (where you can select one script and then only have to correct a few scenes), but it looks like on this one you`re gonna need to switch between up to four versions at a time to get a consistent result.
There is a new script and a couple of plugins thrown in. "Whitebalance" uses the whitebalance filter stored in the plugin directory (this is called from script), and is remarkably effective. Any scene that comes after Tantive IV just looks wonderful with this script. The Tantive IV scenes have extra white balance supplied with apply range within the script, but i think this could be better handled by a more scene by scene use of the filter, applying different whitebalances in shorter bursts. Here`s how it looks so far:

avisource("C:\ANH\ANHSEvideo.avs")
loadplugin("C:\ANH\Plugins\WhiteBalance.dll")
whitebalance(r1=171,g1=179,b1=186)
applyrange(0,12675,"whitebalance",191,187,186)
applyrange(0,12675,"whitebalance",152,141,152)
converttoRGB32()

The range refers to the beginning of the movie till just after the stardestroyer fly over of tatooine, just before the cut to R2 and C3PO. Because i just want to get something posted "WhiteBalance", the script, isn`t yet finished.
So, more experimentation to be done, i`m currently rendering yet another set of full screen histo`s which should at least fix the overbright problem of 1985,2 and maybe tone down the blue, but for now here are the scripts and histograms so that you can see what each technique or histogram set does. I`m also going to write a script this afternoon that incorporates VD_Hue along with white balance, and this time really will have that posted tomorrow. Oh, and just out of interest, i`m going to rip TPM to my drive and see what the histograms do to that, and will post some piccies later. Enjoy!

“Ow! It`s hot in here, the butter in my pocket is melting!”