Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deuteronomy-works/pyffmpeg
FFmpeg wrapper for python
https://github.com/deuteronomy-works/pyffmpeg
convert encoding ffmpeg multimedia
Last synced: 7 days ago
JSON representation
FFmpeg wrapper for python
- Host: GitHub
- URL: https://github.com/deuteronomy-works/pyffmpeg
- Owner: deuteronomy-works
- License: apache-2.0
- Created: 2020-03-25T11:02:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-16T12:08:40.000Z (22 days ago)
- Last Synced: 2025-01-24T11:06:53.544Z (14 days ago)
- Topics: convert, encoding, ffmpeg, multimedia
- Language: Python
- Homepage:
- Size: 209 MB
- Stars: 64
- Watchers: 3
- Forks: 11
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: .github/contributing.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# pyffmpeg | [![Downloads](https://static.pepy.tech/personalized-badge/pyffmpeg?period=week&units=international_system&left_color=black&right_color=brightgreen&left_text=Downloads/week)](https://pepy.tech/project/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
```python
from pyffmpeg import FFmpeginp = 'path/to/music_folder/f.mp4'
out = 'path/to/music_folder/f.mp3'ff = FFmpeg()
output_file = ff.convert(inp, out)
print(output_file)
```
### FFprobe
Provides FFprobe functions and values```python
from pyffmpeg import FFprobeinput_file = 'path/to/music.mp3'
fp = FFprobe(input_file)print(fp.duration)
```
will print
```shell
> 00:04:32:32
```
NB: The above digits are just for illustration purposes.## Wiki
The wiki can be located [here](https://github.com/deuteronomy-works/pyffmpeg/wiki)## Contributing
Please read [Contributing](https://github.com/deuteronomy-works/pyffmpeg/wiki/How-to-Contribute)## Legal
This library uses prebuilt binaries of FFmpeg licensed under the LGPLv2.1 and can be downloaded via the following links:
* Mac - here
* Linux - here
* Windows - here