Video from numpy array in Jupyter Notebook
Create videos from numpy arrays in a jupyter notebook
Original source from Alexander Mordvintsev
Install
pip install notebook-video-writer
Dependencies
- Must have ffmpeg installed
Usage
import numpy as np
# optionally wrap with tqdm for progress bar
from tqdm import tqdm
from notebook_video_writer import VideoWriter
with VideoWriter(fps=40) as vw:
for i in tqdm(range(100)):
frame = np.random.rand(256,256,3)
vw.add(frame)
This will immediately display the video inline below the cell:
An mp4 file is also saved to the current directory. Default name is _autoplay.mp4, but can be set with name keyword arg.
Metadata
Release files for notebook-video-writer 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| notebook-video-writer-0.0.5.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| notebook_video_writer-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / notebook-video-writer-0.0.5.tar.gz
| Download URL | notebook-video-writer-0.0.5.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f627471601d92658792c82b0ab7f0fedab1ebe4865ac8aa66fde0fe6c87ed249
|
|
BLAKE2b-256 checksum How to use checksums |
a65900b06c1f4cf8225b0d7a1bea7fd8826b253725acd9506a597e166fd60a08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / notebook_video_writer-0.0.5-py3-none-any.whl
| Download URL | notebook_video_writer-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55ec19b85841db21d14c748bea37260877aad1394b3ec9fd73157d501edf2979
|
|
BLAKE2b-256 checksum How to use checksums |
40af0180a67df59810d8965657848040a078d3ebde2b0c7ecf9b3806ab4a328a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|