Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This is a C++ based FFmpeg Encoder/Decoder for Python 3.6+ & numpy 1.19+. Both Linux & Win versions are provided. Theoretically you do not need to install FFmpeg for using this library.

License

NotificationsYou must be signed in to change notification settings

cainmagi/FFmpeg-Encoder-Decoder-for-Python

Repository files navigation

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.

importmpegCoder
BranchDescription
master 🔗The source project ofmpegCoder, Windows version.
master-linux 🔗The source project ofmpegCoder, 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.

Source project ofmpegCoder (Windows)

The following instructions are used for building the project on Windows with Visual Studio 2019.

  1. Clone themaster branch which only contains the codes ofmpegCoder:

    git clone --single-branch -b master https://github.com/cainmagi/FFmpeg-Encoder-Decoder-for-Python.git
  2. Download the FFMpeg dependencies, includinginclude andlib. Users could download dependencies manually by checkingthe release page 🔗. However, we recommend users to use the following script to get the dependencies quickly:

    python webtools.py

    This script requires users to installurllib3. Thetqdm is also recommended to be installed.

  3. The following configurations should be set forAll (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.

    PathScreenshot
    includesConfigure includes
    libsConfigure libs
  4. Modify the linker configs. We only need to change the itempython3x.lib according to the python version you have.Configure linker

  5. Run theRelease,x64 build. The built file should be saved asx64\Release\mpegCoder.pyd.

  6. ThempegCoder.pyd should be used together with the FFMpeg shared libraries, including:

    avcodec-59.dllavformat-59.dllavutil-57.dllswresample-4.dllswscale-6.dll

Update reports

Has been moved to📑 CHANGELOG.md

Version of currently used FFmpeg library

Current FFMpeg version is5.0.

DependencyVersion
libavcodec59.18.100.0
libavformat59.16.100.0
libavutil57.17.100.0
libswresample4.3.100.0
libswscale6.4.100.0

About

This is a C++ based FFmpeg Encoder/Decoder for Python 3.6+ & numpy 1.19+. Both Linux & Win versions are provided. Theoretically you do not need to install FFmpeg for using this library.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp