FFmpeg-studio
ffmpeg-studio provides a Pythonic interface to FFmpeg, allowing users to construct and execute FFmpeg commands programmatically.
It simplifies and Handles:
- Complex filter generation
- All popular Filters and Baseclass for custom filters
- Automatic Safe quoting & escaping
- Input handling & stream selection
- Output mapping & stream selection
- Progress tracking with callbacks
- Allows direct flags in command.
- Scanning metadata with ffprobe.
- Long filter graphs.
Installation
From PyPi
pip install ffmpeg-studio
From Source
pip install git+https://github.com/electro199/ffmpeg-studio.git
Usage
ffmpeg-studio support complex Filters and can be used with apply or apply2.
from ffmpeg import FFmpeg, InputFile, FileInputOptions, Map
from ffmpeg.filters import apply, Scale, Overlay
# set options
clip = InputFile("video.mp4", FileInputOptions(duration=10))
overlay = InputFile("overlay.png")
# apply scale filter on clip
upscaled_clip = apply(Scale(1440, 1920), clip)
# apply scale filter on overlay
overlay = apply(Scale(100, 100), overlay)
# apply overlay filter with overlay on upscaled_clip
upscaled_clip = apply(Overlay(overlay, x=0, y=10), clip)
ffmpeg = FFmpeg()
# add output
ffmpeg.output(upscaled_clip, path="out.mp4")
# run command
ffmpeg.run(progress_callback=print)
For simple media conversion :
from ffmpeg.inputs import VideoFile
from ffmpeg import export
clip = VideoFile("video.mp4")
export(
clip,
path="out.mkv",
).run()
Install FFmpeg
This project does not install ffmpeg utility automatically.
Verify ffmpeg is installed:
ffmpeg -version
Windows
Using winget:
winget install --id=Gyan.FFmpeg -e
or download and install FFmpeg from FFmpeg official website:
- Download the latest FFmpeg build from here.
- Extract the archive and add the
bindirectory to your systemPATH.
macOS
Using Homebrew:
brew install ffmpeg
Linux
For Debian/Ubuntu:
sudo apt install ffmpeg
To-Do
-
All Input methods
- Generic(Input) class
- ImageFile class
- VideoFile class
- AudioFile class
- VituralVideo class
- VituralAudio class
-
Output options
- Muliple output per command
- filter_file for super long filters
- Per map flags
- Per output flags
-
Improve progress tracking
- Support callbacks with frame/time info
- Provide async interface for streaming progress
-
Documentation & Examples
- Basic tutorials.
- Showcase filtergraph construction with helpers
- Detailed tutorials.
- Detailed example/gallery.
-
Testing & CI
- Publish to PyPI every release
- Publish Docs every release
- Verify cross-platform behavior (Linux/Windows/macOS)
- GitHub Actions for automated testing
-
Packaging & Distribution
- Publish to PyPI
Metadata
Release files for ffmpeg-studio 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ffmpeg_studio-0.1.4.tar.gz | 42.0 kB | Without provenance | Details for ffmpeg_studio-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ffmpeg_studio-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for ffmpeg_studio-0.1.4-py3-none-any.whl |
Total release size: 98.2 kB
Release files / ffmpeg_studio-0.1.4.tar.gz
| Download URL | ffmpeg_studio-0.1.4.tar.gz |
|---|---|
| Size | 42.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
976476f89aa75927d2c73748e8388da24ebc2b4055e9f27adede7e00cdae4b24
|
|
BLAKE2b-256 checksum How to use checksums |
507d15d05590ce5fdddd72ba5970601d0f085c1dbb8d7494bb4172a4a5a8d137
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ffmpeg_studio-0.1.4-py3-none-any.whl
| Download URL | ffmpeg_studio-0.1.4-py3-none-any.whl |
|---|---|
| Size | 56.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4fafd58e2467993c22f85755b8fa80d8c0283f943a1b1915ea4a8f070251bbd
|
|
BLAKE2b-256 checksum How to use checksums |
bc0285cb329fad800ab5886d0d7938f2e5dff6d8d8f850f7ad9272a1825098f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ffmpeg-studio 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.