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.2.tar.gz
(20.7 kB
view hashes)
Built Distribution
Close
Hashes for videopython-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b2f136475a87216e2c835b6e5332792478c5c7e0b55ce02a23fe841038430f |
|
MD5 | 92174899e876dffdc0af04066f4950a3 |
|
BLAKE2b-256 | 3e413c0c7c180467083f343f163e2bd2bc90bcb7a34944e52322847a327abcd0 |