This is a mpegCoder adapted from FFmpeg & Python-c-api. Using it you could get access to processing video easily. Just use it as a common module in python like this.
import mpegCoder| Branch | Description |
|---|---|
master 🔗 |
The source project of mpegCoder, Windows version. |
master-linux 🔗 |
The source project of mpegCoder, Linux version. |
example-client-check 🔗 |
A testing project of the online video stream demuxing. |
example-client-player 🔗 |
A testing project of the simple online video stream player. |
The following instructions are used for building the project on Windows with Visual Studio 2019.
-
Clone the
masterbranch which only contains the codes ofmpegCoder:git clone --single-branch -b master https://github.com/cainmagi/FFmpeg-Encoder-Decoder-for-Python.git
-
Download the FFMpeg dependencies, including
includeandlib. Users could download dependencies manually by checking the release page 🔗. However, we recommend users to use the following script to get the dependencies quickly:python webtools.py
This script requires users to install
urllib3. Thetqdmis also recommended to be installed. -
The following configurations should be set for
All(both debug and release) andx64. Open the project byMpegCoder.sln. Then configure the following paths of the include directories and the library directories. In both configurations, the first item is required to be modified according to your python path, the second item is required to be modified according to your numpy path.Path Screenshot includes
libs
-
Modify the linker configs. We only need to change the item
python3x.libaccording to the python version you have.
-
Run the
Release,x64build. The built file should be saved asx64\Release\mpegCoder.pyd. -
The
mpegCoder.pydshould be used together with the FFMpeg shared libraries, including:avcodec-59.dll avformat-59.dll avutil-57.dll swresample-4.dll swscale-6.dll
Has been moved to 📑 CHANGELOG.md
Current FFMpeg version is 5.0.
| Dependency | Version |
|---|---|
libavcodec |
59.18.100.0 |
libavformat |
59.16.100.0 |
libavutil |
57.17.100.0 |
libswresample |
4.3.100.0 |
libswscale |
6.4.100.0 |