So, this should be a comment to this thread, but it's apparently closed, so here it goes. I've been playing around quite successfully with matplotlib and numpy and mencoder, as has been suggested around here. I have since adopted Voki Codder buffer to stdin solution, which speeds the whole process up considerably. The thing is, I couldn't find any documentation on the -format="bgra" part of the command. This means that the bytes are from right to left blue green red alpha, right. Do they have to be uint32, or something else. The problem is I'm plotting colormaps of floats, so I'm trying to convert them to grayscale, but I'm getting lots of weird patterns which make me strongly believe I'm doing something wrong. I wrote this function to convert from floats to uint32 within a range. But the result is not why I expected, am I doing something terribly stupid?
def grayscale(x, min, max):
return np.uint32((x-min)/(max-min)*0xffffff)