Skip to content

FFmpeg mpegCoder for Python

Compare
Choose a tag to compare
@cainmagi cainmagi released this 01 May 00:35
· 16 commits to master since this release

Instruction of this version

An important notice is that this version is based on FFmpeg 4.0. This version is released recently, some practices show that the Ubuntu lib could not be imported by python3.5 after building the newest version (Have been fixed).

In this release we provide three versions.

  • Windows 10, Python 3.6.4 & numpy 1.14.
  • Windows 10, Python 3.5.2 & numpy 1.13.
  • Ubuntu 16.04, Python 3.5.2 & numpy 1.14.

We believe that this release would help users who use tensorflow 1.5~1.7. Also we have no more special reports for this version. If you want to know how to use this release, you could still refer the instructions of ver 1.8 and ver 2.0.

Noted that in ver 2.0 we firstly provide the MpegClient for reading remote rtsp stream. But now we find that a major bug exists in ver 2.0 and ver 2.01. This bug would cause the memory leak with extracting more and more frames. Once you call ExtractFrame(), the memory leak happens. Fortunately, in this version we have fixed it. So indeed this is the first version that could be used in practice.

Instructions for Windows version

Users need to confirm that all .dll files are placed in the same location of mpegCoder.pyd. After that, users could enter that folder, and launch the module with

import mpegCoder

Instructions for Linux version

The required dynamic libraries have been packed with the Linux package. After extracting the file, users should get

.mpegCoder_2_05_Linux_py35.tar.xz
|---mpegCoder.so
`---dependencies
    `---...

The files in ./dependencies are all required dynamic libraries for importing mpegCoder. We recommend users move this folder to a proper path, and add this folder in LD_LIBRARY_PATH. Users could also move these dynamic libs to their /usr/libs or /usr/local/libs to make them work.

After that, users could place mpegCoder.so to their working directory, and use

import mpegCoder

to load the module.