logo Sign In

Post #635506

Author
AntcuFaalb
Parent topic
Info: Films re-color timed on video releases
Link to post in topic
https://originaltrilogy.com/post/id/635506/action/topic#635506
Date created
23-Apr-2013, 10:51 AM

You_Too said:

AntcuFaalb said:

Doctor M: Using ColourLike with every=1 will generate one histogram for the entire clip it operates on. If you open the histogram in a text editor, you'll only see one set of histogram values. It does not balance the color on a frame-by-frame basis. It only samples and updates the histogram "every" number of times.

I took a peek at the source code recently (it's in C++) and verified that this is the case. It's stupid behavior, but that's how it works!

If you want it to work on a shot-by-shot (or frame-by-frame) basis, then you need to generate histograms for each shot, manually. An example:

myclip = AVISource(...)

clip_one = myclip.Trim(0, 23)

clip_two = myclip.Trim(24, 47)

clip_one.WriteHistogram("shot1.txt", every=1)

clip_two.WriteHistogram("shot2.txt", every=1)

clip_one.ColourLike("shot1.txt", "shot2.txt")

Is there any way for you to change the source code and somehow create a new version that would work frame by frame? Or does that code you posted actually work frame by frame? (Even if it's slow)

The code I posted does not work frame-by-frame. I wrote a function to do frame-by-frame ColourLike using ScriptClip, but it's at home.

I'll write another one up now (at work now; slow day) and PM it to you, but I won't be able to test it.

Can you test it? We can post the final result here.