# FFmpeg-studio
[](https://pypi.org/project/ffmpeg-studio/)
[](LICENSE)
[](https://electro199.github.io/ffmpeg-studio/)
[](https://github.com/electro199/ffmpeg-studio/stargazers)
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
- 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
```sh
pip install ffmpeg-studio
```
From Source
```sh
pip install git+https://github.com/electro199/ffmpeg-studio.git
```
## Usage
ffmpeg-studio support complex Filters and can be used with [`apply`](https://electro199.github.io/ffmpeg-studio/api/#ffmpeg.filters.apply) or [`apply2`](https://electro199.github.io/ffmpeg-studio/api/#ffmpeg.filters.apply2), apply2 is for multioutput filters like `Split` and `Concat`.
```py
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)
# run command
ffmpeg = (
FFmpeg().output(Map(upscaled_clip), path="out.mp4").run(progress_callback=print)
)
```
For simple media conversion :
```py
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:
```sh
ffmpeg -version
```
### Windows
Using winget:
```sh
winget install --id=Gyan.FFmpeg -e
```
or download and install FFmpeg from [FFmpeg official website](https://ffmpeg.org/download.html):
1. Download the latest FFmpeg build from [here](https://www.gyan.dev/ffmpeg/builds/).
2. Extract the archive and add the `bin` directory to your system `PATH`.
### macOS
Using Homebrew:
```sh
brew install ffmpeg
```
#### Linux
For Debian/Ubuntu:
```sh
sudo apt install ffmpeg
```
## To-Do
- [ ] All Input methods
- [x] Generic(Input) class
- [x] ImageFile class
- [x] VideoFile class
- [x] AudioFile class
- [x] VituralVideo class
- [ ] VituralAudio class
- [x] Output options
- [x] Muliple output per command
- [x] filter_file for super long filters
- [x] Per map flags
- [x] Per output flags
- [ ] Improve progress tracking
- [x] Support callbacks with frame/time info
- [ ] Provide async interface for streaming progress
- [ ] Documentation & Examples
- [x] Basic tutorials.
- [x] Showcase filtergraph construction with helpers
- [ ] Detailed tutorials.
- [ ] Detailed example/gallery.
- [ ] Testing & CI
- [x] Publish to PyPI every release
- [x] Publish Docs every release
- [ ] Verify cross-platform behavior (Linux/Windows/macOS)
- [ ] GitHub Actions for automated testing
- [x] Packaging & Distribution
- [x] Publish to PyPI
Raw data
{
"_id": null,
"home_page": null,
"name": "ffmpeg-studio",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "ffmpeg, media, video processing, audio, python, wrapper, transcoding",
"author": "Aman Raza",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/36/b8/70dec5b1a6f5f86c1c4f4507e9be40960400bf7fc091ae3e7d3c3dd1c5a2/ffmpeg_studio-0.1.0.tar.gz",
"platform": null,
"description": "# FFmpeg-studio\n\n[](https://pypi.org/project/ffmpeg-studio/)\n[](LICENSE)\n[](https://electro199.github.io/ffmpeg-studio/)\n[](https://github.com/electro199/ffmpeg-studio/stargazers)\n\nffmpeg-studio provides a Pythonic interface to FFmpeg, allowing users to construct and execute FFmpeg commands programmatically.\n\nIt simplifies and Handles:\n\n- Complex filter generation\n- All popular Filters and Baseclass for custom filters\n- Safe quoting & escaping\n- Input handling & stream selection\n- Output mapping & stream selection\n- Progress tracking with callbacks\n- Allows direct flags in command.\n- Scanning metadata with ffprobe.\n- Long filter graphs.\n\n## Installation\n\nFrom PyPi\n\n```sh\npip install ffmpeg-studio\n```\n\nFrom Source\n\n```sh\npip install git+https://github.com/electro199/ffmpeg-studio.git\n```\n\n## Usage\n\nffmpeg-studio support complex Filters and can be used with [`apply`](https://electro199.github.io/ffmpeg-studio/api/#ffmpeg.filters.apply) or [`apply2`](https://electro199.github.io/ffmpeg-studio/api/#ffmpeg.filters.apply2), apply2 is for multioutput filters like `Split` and `Concat`.\n\n```py\nfrom ffmpeg import FFmpeg, InputFile, FileInputOptions, Map\nfrom ffmpeg.filters import apply, Scale, Overlay\n\n# set options\nclip = InputFile(\"video.mp4\", FileInputOptions(duration=10))\noverlay = InputFile(\"overlay.png\")\n\n# apply scale filter on clip\nupscaled_clip = apply(Scale(1440, 1920), clip)\n\n# apply scale filter on overlay\noverlay = apply(Scale(100, 100), overlay)\n\n# apply overlay filter with overlay on upscaled_clip\nupscaled_clip = apply(Overlay(overlay, x=0, y=10), clip)\n\n# run command\nffmpeg = (\n FFmpeg().output(Map(upscaled_clip), path=\"out.mp4\").run(progress_callback=print)\n)\n```\n\nFor simple media conversion :\n\n```py\nfrom ffmpeg.inputs import VideoFile\nfrom ffmpeg import export\n\nclip = VideoFile(\"video.mp4\")\n\nexport(\n clip,\n path=\"out.mkv\",\n).run()\n\n```\n\n## Install FFmpeg\n\nThis project does not install ffmpeg utility automatically.\n\nVerify ffmpeg is installed:\n\n```sh\nffmpeg -version\n```\n\n\n### Windows\n\nUsing winget:\n\n```sh\nwinget install --id=Gyan.FFmpeg -e\n```\n\nor download and install FFmpeg from [FFmpeg official website](https://ffmpeg.org/download.html):\n\n1. Download the latest FFmpeg build from [here](https://www.gyan.dev/ffmpeg/builds/).\n2. Extract the archive and add the `bin` directory to your system `PATH`.\n\n### macOS\n\nUsing Homebrew:\n\n```sh\nbrew install ffmpeg\n```\n\n#### Linux\n\nFor Debian/Ubuntu:\n\n```sh\nsudo apt install ffmpeg\n```\n\n## To-Do\n\n- [ ] All Input methods\n - [x] Generic(Input) class\n - [x] ImageFile class\n - [x] VideoFile class\n - [x] AudioFile class\n - [x] VituralVideo class\n - [ ] VituralAudio class\n\n- [x] Output options\n - [x] Muliple output per command\n - [x] filter_file for super long filters\n - [x] Per map flags\n - [x] Per output flags\n\n- [ ] Improve progress tracking \n - [x] Support callbacks with frame/time info \n - [ ] Provide async interface for streaming progress\n\n- [ ] Documentation & Examples \n - [x] Basic tutorials.\n - [x] Showcase filtergraph construction with helpers \n - [ ] Detailed tutorials.\n - [ ] Detailed example/gallery.\n\n- [ ] Testing & CI \n - [x] Publish to PyPI every release\n - [x] Publish Docs every release\n - [ ] Verify cross-platform behavior (Linux/Windows/macOS) \n - [ ] GitHub Actions for automated testing\n\n- [x] Packaging & Distribution \n - [x] Publish to PyPI \n\n",
"bugtrack_url": null,
"license": null,
"summary": "FFmpeg Wrapper for Python",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://electro199.github.io/ffmpeg-studio/",
"Homepage": "https://github.com/electro199/ffmpeg-studio",
"Repository": "https://github.com/electro199/ffmpeg-studio"
},
"split_keywords": [
"ffmpeg",
" media",
" video processing",
" audio",
" python",
" wrapper",
" transcoding"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ce5232d4e45820a535e6bbd7954cd06d8e0f90166d75a7c8e7c1add354983cfa",
"md5": "e7d348c305cef40dac8b9442f3522e64",
"sha256": "33ff97bbc94bf1e3e92b0689ccf628f1cc9815ab7ed9dc0dae0548d79ad48228"
},
"downloads": -1,
"filename": "ffmpeg_studio-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7d348c305cef40dac8b9442f3522e64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 52559,
"upload_time": "2025-08-16T20:54:34",
"upload_time_iso_8601": "2025-08-16T20:54:34.699584Z",
"url": "https://files.pythonhosted.org/packages/ce/52/32d4e45820a535e6bbd7954cd06d8e0f90166d75a7c8e7c1add354983cfa/ffmpeg_studio-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "36b870dec5b1a6f5f86c1c4f4507e9be40960400bf7fc091ae3e7d3c3dd1c5a2",
"md5": "0a97aace875c4e58497d3406fbbd8ffe",
"sha256": "09646542f136ff13ea3354c7d33c8ff261d7ea334d281d5707d738991af13e30"
},
"downloads": -1,
"filename": "ffmpeg_studio-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0a97aace875c4e58497d3406fbbd8ffe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 85756,
"upload_time": "2025-08-16T20:54:36",
"upload_time_iso_8601": "2025-08-16T20:54:36.003282Z",
"url": "https://files.pythonhosted.org/packages/36/b8/70dec5b1a6f5f86c1c4f4507e9be40960400bf7fc091ae3e7d3c3dd1c5a2/ffmpeg_studio-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-16 20:54:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "electro199",
"github_project": "ffmpeg-studio",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ffmpeg-studio"
}