WebRTC and MediaStream API exposed in the Jupyter notebook/lab.
See this tweet for a demo screencast.
Using ipywebrtc you can create a MediaStream out of:
- Any ipywidget.
- A video file.
- An image file.
- An audio file.
- Your webcam/camera.
From this MediaStream you can:
- Record a movie.
- Record an image snapshot.
- Record an audio fragment.
- Stream it to peers using the simple chat function
- Use it as a texture in ipyvolume
WebRTC and ipyvolume
Use remote MediaStreams and show them in 3d using ipyvolume.
Record and image from any stream for postprocessing.
Turn any widget into a MediaStream.
To install:
$ pip install ipywebrtc # will auto enable for notebook >= 5.3
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-webrtc # for jupyter lab
For a development installation (requires npm),
$ git clone https://github.com/maartenbreddels/ipywebrtc
$ cd ipywebrtc
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix ipywebrtc
$ jupyter nbextension enable --py --sys-prefix ipywebrtc
$ jupyter labextension link js
$ jupyter lab --watch # for quick rebuilds