Skip to content

Novfensec/VideoNative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoNative

GitHub Release License Build Status Python Version

Video rendering in Python powered by C++, FFmpeg, and miniaudio.

GitAds Sponsored

Sponsored by GitAds

Overview

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.

Core Dependencies

  • FFmpeg - Industry-standard library for video decoding and scaling.
  • miniaudio - Single-file audio playback and management library.

Runtime requirements

Tip

Looking for a complete implementation? Check out the CarbonPlayer repository for a full-fledged video player example built using this library.

Financial Support

Donate via

Donate via PayPal

Build and Install Instructions

Select your operating system below for step-by-step setup instructions.

Windows

1. Prerequisites

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.CMake

2. Install FFmpeg Shared Libraries

Download 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"

3. Installation

Option A: Direct installation via pip

pip install https://github.com/Novfensec/VideoNative/archive/main.zip --no-cache

Option B: Build the extension locally

pip install -e .

# OR using CMake directly
mkdir build
cd build
cmake ..
cmake --build . --config Release

Linux

1. Prerequisites

Install 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 cmake

2. Installation

Option A: Direct installation via pip

pip install https://github.com/Novfensec/VideoNative/archive/main.zip --no-cache

Option B: Build the extension locally

pip install -e .

# OR using CMake directly
mkdir build
cd build
cmake ..
make

Android

Using the python-for-android Toolchain

To use VideoNative within Android environments, configure your buildozer.spec to use the appropriate fork and branch containing Android-specific patches:

  1. Add ffmpeg, videonative and numpy to your application requirements:

    requirements = python3, kivy, ffmpeg, videonative, numpy
  2. To follow the latest development configure the toolchain source or you can proceed with p4a.branch=develop and skip this configuration:

    p4a.fork = novfensec
    p4a.branch = videonative

License

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.

About

Video rendering in Python powered by C++, FFmpeg, and miniaudio.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages