Video exampleΒΆ

This example depends on imageio and imageio-ffmpeg.

Plays a video as fast as it can. This will be quite a slow playback on localhost. On a remote server it will be even slower.

import imageio
import numpy as np
from jupyter_rfb import RemoteFrameBuffer

r = imageio.get_reader("imageio:cockatoo.mp4", "ffmpeg")

class VideoPlayer(RemoteFrameBuffer):

    def get_frame(self):
        return r.get_next_data()

v = VideoPlayer(max_buffered_frames=3)
initial snapshot
[ ]: