I think you are confused about what uint32 represents. These are 4 stripes from uint8 integers.
If you have floating point data and want to represent it in grayscale, you do not want to rescale it to the full 32-bit range, you want to rescale it to the 8-bit range and repeat this for the red, green and blue stripes (and then presumably placed in a constant alpha band).
You can also use a different byte. Y8 is just one shade of gray, an 8-bit range, and Y16 is a single 16-bit range in shades of gray. (Look at the output of mencoder -rawvideo format=help for a complete (albeit somewhat confusing) listing.)
Just to illustrate the use of numpy to view a 32-bit integer as four ranges of 8-bit integers:
import numpy as np height, width = 20,20
In your case, however, you probably want to do something more like this:
import numpy as np from videosink import VideoSink height, width = 20,20 numframes = 1000 data = np.random.random((height, width, numframes))
source share