Minimal video generation and processing library.
Project description
About
Minimal video generation and processing library written on top of numpy
, opencv
and ffmpeg
.
Setup
# Install ffmpeg with brew for MacOS:
brew install ffmpeg
# Install with apt-get for Ubuntu:
sudo apt-get install ffmpeg
# Install python dependencies
pip3 install -r requirements.txt
Basic Usage
from videopython.base import Video
from videopython.base.transitions import FadeTransition
# Load video
video = Video.from_path("tests/test_data/fast_benchmark.mp4")
print(video.metadata)
print(video.frames.shape) # Video is based on numpy representation of frames
transformed_video = video + video
print(transformed_video.metadata)
fade = FadeTransition(2.0) # 2s effect time
transformed_video = fade.apply(videos=(video, transformed_video))
print(transformed_video.metadata)
transformed_video.save("./data/exported/")
Running Unit Tests
PYTHONPATH=. pytest videopython
How to download stock data?
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
videopython-0.0.1.tar.gz
(16.5 kB
view hashes)
Built Distribution
Close
Hashes for videopython-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560165db0a0f8df40f49df1aeba77e9c2a30a9fb2b88502dfb1882d8dfeda3b1 |
|
MD5 | 407d1a3c895060af9c4e28d800891a68 |
|
BLAKE2b-256 | ce58f1ec4c498503fa6956b97ae1a98b6bd06030cf6d4890f04b26a1b32ba03c |