def save_video(video, fps, save_filename='media/output.avi'):
    fourcc = cv2.CAP_PROP_FOURCC('M', 'J', 'P', 'G')
    writer = cv2.VideoWriter(save_filename, fourcc, fps, (video.shape[2], video.shape[1]), 1)
    for x in range(0, video.shape[0]):
        res = cv2.convertScaleAbs(video[x])
        writer.write(res)
Look up a WebConnIOStream by its twwcid.
dataset/ETHPy150Open brycedrennan/eulerian-magnification/eularian_magnification/base.py/save_video--crossover with--dataset/ETHPy150Open erkyrath/tworld/lib/two/webconn.py/WebConnectionTable.get