High-performance video rendering in Python powered by C++, FFmpeg, and miniaudio.
VideoNative is a lightweight, low-level Python extension designed for efficient video and audio decoding. By leveraging native C++ bindings, it bridges high-performance media frameworks directly into Python applications.
- FFmpeg - Industry-standard library for video decoding and scaling.
- miniaudio - Single-file audio playback and management library.
Tip
Looking for a complete implementation? Check out the CarbonPlayer repository for a full-fledged video player example built using this library.
Select your operating system below for step-by-step setup instructions.
Install the necessary C++ build tools and CMake using Windows Package Manager (winget):
# Install Visual C++ Build Tools
winget install Microsoft.VisualStudio.BuildTools
# Install CMake
winget install Kitware.CMakeDownload and extract the required FFmpeg master builds:
cd "$env:USERPROFILE\Downloads"
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip -OutFile ffmpeg.zip
Expand-Archive -Path ffmpeg.zip -DestinationPath . -Force
Rename-Item -Path "ffmpeg-master-latest-win64-gpl-shared" -NewName "ffmpeg"Option A: Direct installation via pip
pip install https://github.com/Novfensec/VideoNative/archive/main.zip --no-cacheOption B: Build the extension locally
pip install -e .
# OR using CMake directly
mkdir build
cd build
cmake ..
cmake --build . --config ReleaseInstall the necessary development headers and media libraries:
sudo apt update
sudo apt install build-essential pkg-config ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev
pip install ninja cmakeOption A: Direct installation via pip
pip install https://github.com/Novfensec/VideoNative/archive/main.zip --no-cacheOption B: Build the extension locally
pip install -e .
# OR using CMake directly
mkdir build
cd build
cmake ..
makeTo use VideoNative within Android environments, configure your buildozer.spec to use the appropriate fork and branch containing Android-specific patches:
-
Add
ffmpeg,videonativeandnumpyto your application requirements:requirements = python3, kivy, ffmpeg, videonative, numpy -
To follow the latest development configure the toolchain source or you can proceed with
p4a.branch=developand skip this configuration:p4a.fork = novfensec p4a.branch = videonative
This project is licensed under the MIT License. Please review the license files of the upstream dependencies FFmpeg and miniaudio for their respective licensing terms.