Tried to make the code from last time a bit clearer by splitting it into two files:
vtkscreen.py and test2.py
conversion to video again by first converting PNG to JPEG:
mogrify -format jpg -quality 97 *.png
And then encoding JPEGs into a movie:
mencoder mf://*.jpg -mf fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -ac copy -o output.avi -ffourcc DX50