- Time
- Post link
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)