Minimal video generation and processing library.
Project description
About
Minimal video generation and processing library.
Setup
Install ffmpeg
# Install with brew for MacOS:
brew install ffmpeg
# Install with apt-get for Ubuntu:
sudo apt-get install ffmpeg
Install with pip
pip install videopython
Basic Usage
from videopython.base.video 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
# Generate videos
video1 = Video.from_prompt("Dogs playing in the snow.")
video2 = Video.from_prompt("Dogs going back home.")
# Add videos
combined_video = video1 + video2
print(combined_video.metadata)
# Apply fade transition between videos
fade = FadeTransition(0.5) # 0.5s effect time
faded_video = fade.apply(videos=(video1, video2))
print(faded_video.metadata)
# Add audio from file
faded_video.add_audio_from_file("tests/test_data/test_audio.mp3")
# Save to a file
faded_video.save("my_video.mp4")
Running Unit Tests
PYTHONPATH=./src/ pytest
Project details
Release history Release notifications | RSS feed
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.1.0.tar.gz
(20.0 kB
view hashes)
Built Distribution
Close
Hashes for videopython-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b356468dbac5c47902c0793b7028d263418300279919efea38353b5b3ac4af06 |
|
MD5 | fe070d047c23ed88bcf51efce96ad7c1 |
|
BLAKE2b-256 | 111c3d86eca15ea0edc5de45c8774ad04302763f709d9617edb2d04789d9655c |