Skip to main content
Version: Next

Overview

This package is a single-module package. The classes are shown in the following figure:

In most APIs, the string formatted arguments accept both str and bytes objects. If a str object is given, its coding will be recognized by the file system encoding, see PyUnicode_DecodeFSDefaultAndSize. If a bytes object is given, the contents will be converted to a std::string directly. Therefore, if users want to use an argument with a specific encoding, they could use str_argu.encode('...') instead of using str_argu directly.

Classes

The module contains four classes:

Classes
Description
MpegDecoderThe FFMpeg decoder. It could be used for demuxing a video file, and return the extracted frames or GOPs.
MpegEncoderThe FFMpeg encoder. It is used for writing a video file. The data is encoded frame-by-frame.
MpegClientThe FFMpeg decoder designed for pulling and demuxing a remote video stream. This class manages a std::thread, and use the thread to synchronize the decoder with the real-time stream.
MpegServerThe FFMpeg encoder designed for muxing and pushing a remote video stream. The stream is pushed frame-by-frame. Note that this class is required to be used with an active server.

Functions

The following functions are global methods of the module.

Functions
Description
setGlobalUsed for setting the global configurations of the module.
readmeReadme function. This method is used for printing brief instructions and updating reports of the module.