Thanks for the reply. It is running pretty fast for the amount of data it's processing (125GB of raw video data as reported by the analyzer, the actual video files are much smaller than that).
For now, I am calculating the average luma for each frame (which is nicely just a single AviSynth command) and I have a python script to average that for the entire video.
The overall purpose of my experiment is that I'm trying to analyze some videos that I re-encoded from DVD for my phone. I used the same settings in HandBrake (constant quality feature), but the quality is definitely not constant across different files, more like constant within each file. Some of them look fantastic, but some look horrible.
My current theory is that the quality is not properly being adjusted for the fact that dark scenes don't compress as well all things being equal. I'm not sure this is the case yet since I don't have enough data points.