Simple Python wrapper for FFmpeg
Project description
Simple FFmpeg binding for python
example:
from ffmpeg import FFmpeg
import subprocess
ffmpeg = FFmpeg()
ff = (
ffmpeg
.OverwriteOutput()
.addInput("video1.webm")
.addInput("./logo.png")
.addInput("video2.webm")
.videoCodec("libx264")
.audioCodec("aac")
.videoFramerate(30)
.videoResolution(resString="1920x1080")
.scale2refFilter(2, 0, "oh*mdar:ih*0.2", "camera", "video") # resize camera to 20% of screen height
.overlayFilter("video", "1", "W-w-10", "H-h-10", "v") # overlay logo on bottom right
.overlayFilter("v", "camera", "10", "10") # overlay camera on top left
.output("output.mp4") # output file
)
code, stdout, stderr = ff.execute(stderr=subprocess.STDOUT, shell=False)
print(code, stdout, stderr)
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
ffmpeg-py-0.1.0.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file ffmpeg-py-0.1.0.tar.gz
.
File metadata
- Download URL: ffmpeg-py-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e8ce5ca968fc55a5033d5a8c91f4d031afff246443a10914a907fa2b1e9669 |
|
MD5 | 0993ee1cfd3037029212b06754627811 |
|
BLAKE2b-256 | 412898696ae87f9ec8ddbcd6352595e380ca5a5b0a363e25035b73fe846b1221 |
File details
Details for the file ffmpeg_py-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ffmpeg_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c29e4eaacd4af85b674946439361d8b9657c0d67a7c65643b670c07e48520e3a |
|
MD5 | e5aef95fe3e47b3bb56d2356379d3c03 |
|
BLAKE2b-256 | 5c4d8f4ee41aa68d530c36a5a7a173a7b6238f63fc82e96f445630e722c4cd6c |