FFmpeg wrapper for python
Project description
pyffmpeg | 
FFmpeg wrapper for python. It uses the most up-to-date FFmpeg binary to provide both FFmpeg and FFprobe functionality. So you can kill two birds with one stone.
The beautiful thing about this is that it comes with it's own FFmpeg executable. It is compressed, making it the smallest one you can find. Becuase it's cross-platform and python 3, it is the only option available for building cross-platform apps with ffmpeg in python.
FFmpeg Version
Uses current FFmpeg version
Installation
pip install pyffmpeg
Usage
FFmpeg
from pyffmpeg import FFmpeg
inp = 'path/to/music_folder/f.mp4'
out = 'path/to/music_folder/f.mp3'
ff = FFmpeg()
output_file = ff.convert(inp, out)
print(output_file)
OR
from pyffmpeg import FFmpeg
ff = FFmpeg()
ff.input('path/to/music_folder/f.mp4').output('path/to/music_folder/f.mp3').run()
Or for multiple input files
ff.input(
'path/to/music_folder/f.mp4',
'path/to/music_folder/g.mp3',
map=['0:1', '0:0']
).output('path/to/music_folder/f.mp4').run()
This method allows more complex file handling
FFprobe
Provides FFprobe functions and values
from pyffmpeg import FFprobe
input_file = 'path/to/music.mp3'
fp = FFprobe(input_file)
print(fp.duration)
will print
> 00:04:32:32
NB: The above digits are just for illustration purposes.
Wiki
The wiki can be located here
Contributing
Contributions are welcome. Please read Contributing
Legal
This library uses prebuilt binaries of FFmpeg licensed under the LGPLv2.1 and can be downloaded via the following links:
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-win_amd64.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-win_amd64.whl
- Upload date:
- Size: 42.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf0d97e90811355e8e1a5c8b1f273149f5bc7c1e25c78dd859ee9b430e1c608
|
|
| MD5 |
cadcad644c9e3fa9644c81182848134a
|
|
| BLAKE2b-256 |
26d758b220b255f5ba2ef7c8770a186c94a6787a6a5d2d85b7bc20a9d2c2702a
|
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 43.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52913bc820823ae932beb37ed39b50df0f7f8079c0e62c9283f26e3f1ec44a1b
|
|
| MD5 |
e016d806ec6f418760873b86c41eb669
|
|
| BLAKE2b-256 |
5f7078dcaaa807a98f4e4a89308fdae00d969c2076033222df8d102aeb4a67b0
|
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 43.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de53ebbb9af8c5d09f6d4e3449eec7fa505d5bddcad9656ded987bcfa36a97d5
|
|
| MD5 |
3a41e4957f22eb934764c3a07fed10e8
|
|
| BLAKE2b-256 |
830f4d97e41d44a8f81cf451ea579e99a7370204c03091a0fc90e6a494b30a57
|
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 18.9 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd412a6361ed3f50701ae82a07af64d931d06a288fbadd3b5e304c531eabee7e
|
|
| MD5 |
1dc245e8fed16b0e9bebbb948a8792c2
|
|
| BLAKE2b-256 |
932800ef9a91e4a01a8c7e522a4643373217eca526813ea36535f367ef2b0cb9
|
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 18.9 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df71c11d5109563e95ad29cc3abeeb68fa23946c2c8b467d7617cdd712999dde
|
|
| MD5 |
22717be1bb56b5b5989de226bb399dc5
|
|
| BLAKE2b-256 |
151fadabeed97ae27e0e61795ebb1c31c4ef2dd73f4da096ec865249e88ff821
|
File details
Details for the file pyffmpeg-2.5.2.3.1-py3-none-macosx_10_9_universal2.whl.
File metadata
- Download URL: pyffmpeg-2.5.2.3.1-py3-none-macosx_10_9_universal2.whl
- Upload date:
- Size: 18.9 MB
- Tags: Python 3, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47fa229c9b93b8bb707d5043e354a13cbd9eb3a9296abf5ebfd000465c948b12
|
|
| MD5 |
06f45d16067fd0c5153302a0e7599ddf
|
|
| BLAKE2b-256 |
38c6d5169a67ddfbeda6d5a0368b22198f9d98ef39f60d73112b67a8938a7859
|