A way of rendering video in python.
Pre-compiled libs are present under bin folder.
-
Move to the
windowsdirectory.cd windows -
Install visual cpp build tools for building on windows.
winget install Microsoft.VisualStudio.BuildTools -
Install FFmpeg from https://gyan.dev
winget install Gyan.FFmpeg.Shared -
Copy all files under
ffmpegdirectory/binfolder to./bin/windows. -
Edit
Makefileaccordingly. -
Steps to build the dll (Windows):
nmake clean nmake
After compiling move the libvideo.dll to bin/windows folder.
-
Move to
linuxdirectory.cd linux -
Install ffmpeg and other libs.
sudo apt install build-essential pkg-config ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev -
Build using make
make clean make
After compiling move the libvideo.so to bin/linux folder.
Using pythonforandroid toolchain
- Add
videonativeandffmpegas requirements in buildozer.spec. - Use
p4a.fork = novfensecandp4a.branch=videonativeto build for android.
For building libvideo.so yourself compile the ffmpeg library for the android and make it available in path.
then move to android directory and run make.
cd android
make