Skip to main content

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?

Read here.

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)

Uploaded Source

Built Distribution

videopython-0.0.1-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page