Skip to content

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

Notifications You must be signed in to change notification settings

cainmagi/FFmpeg-Encoder-Decoder-for-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFmpeg-Encoder-Decoder-for-Python

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.

Dependencies

This branch is used for archiving the dependencies used for building the project on different platforms. The installation scripts for ffmpeg would be stored here, while the Windows dependencies would be stored in the release page liste in the following table:

Branch Description Release page
install-ffmpeg-4_0_6.sh Scripts for installing ffmpeg 4.0.6 on Ubuntu. 2.0.5 πŸ”—
install-ffmpeg-4_4.sh Scripts for installing ffmpeg 4.4 on Ubuntu. 3.0.0 πŸ”—
install-ffmpeg-5_0.sh Scripts for installing ffmpeg 5.0 on Debian. 3.2.0 πŸ”—

Usage

install-ffmpeg-5_0.sh

Save the script in ~/, then run the docker:

docker run --gpus all --rm -it --shm-size=1g debian:bullseye

After that, run the following commands inside the container (root mode):

cd ~ && apt update && apt install wget
wget https://raw.githubusercontent.com/cainmagi/FFmpeg-Encoder-Decoder-for-Python/deps/install-ffmpeg-5_0.sh
chmod +rwx install-ffmpeg-5_0.sh
./install-ffmpeg-5_0.sh --all --nvcuda --sudofix

We recommend to use debian:bullseye (the current version), because its apt repository preserves the best compatibility, and provides most of the dependencies claimed in the issue #4 ❗.