properly serializing video frames in movie2serial.py