A Haxe library which provides support for handling video, audio, and multimedia files and streams on native platforms.
extension-ffmpeg
boasts the following features:
- Decoding, display, and playback control for video and audio.
- Support for the most popular video formats, including
avi
,mp4
,webm
,flv
,mkv
, and more. - Utilities for easy integration into OpenFL and HaxeFlixel.
Contributions are highly welcome! Feel free to open an issue or pull request if you have any questions or suggestions.
To build extension-ffmpeg
from source, perform these steps to fetch dependencies:
- Do NOT download the repository by clicking the
Download ZIP
button on the Github page.
- Instead, run
git clone https://github.com/MasterEric/extension-ffmpeg
to create a local Git repository.
- Install Visual Studio 2019, installing the following components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
Windows SDK (10.0.17763.0)
- Install MSYS2. I installed to the
C:/CPP/msys64
directory. - Navigate to the project folder and call
git submodule update --init --recursive --remote
to download the source for FFmpeg.
Then, follow these steps:
- Open
x64 Native Tools Command Prompt for VS 2019
and call"C:\CPP\msys64\msys2_shell.cmd" -use-full-path
. - Call
pacman -Su git wget make tar unzip zip mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-cmake autoconf automake libtool mingw-w64-x86_64-jq python zstd nasm
(one-time step). - Navigate to the project folder, enter
./lib.src/
, and run./build_win64.sh
to build theWindows64
library files.
Now, we need to build libraries for 32-bit machines.
- This is necessary because
lime rebuild
performs two builds, one for each architecture.
- Open
x86 Native Tools Command Prompt for VS 2019
and call"C:\CPP\msys64\msys2_shell.cmd" -use-full-path
. - Navigate to the project folder, enter
./lib.src/ffmpeg
, and runmake clean
.
- This gets rid of any artifacts from the previous 64-bit build.
- Move back to
./lib.src/
and runbuild_win32.sh
to build theWindows32
library files.
This will generate the necessary .lib
files that you need to build the extension.
To build the extension itself, run lime rebuild extension-ffmpeg windows
.
You will need to repeat this step if you change any of the C++ files located in the project
folder.
Be sure to run lime rebuild extension-ffmpeg windows -debug
instead if you are planning to debug the target application.
To build extension-ffmpeg
from source, follow these steps:
- Do NOT download the repository by clicking the
Download ZIP
button on the Github page.
- Instead, run
git clone https://github.com/MasterEric/extension-ffmpeg
to create a local Git repository.
- Install these development packages:
libvdpau-dev libva-dev libx11-dev
- Navigate to the project folder.
- Call
git submodule update --init --recursive --remote
to download the source for FFmpeg. - Navigate to
./lib.src/
. - Run
./build_linux64.sh
.
- You will need to repeat this step if you modify the compile flags in the script (which are used to build FFmpeg's libs).
This will generate the necessary .a
files that you need to build the extension.
To build the extension itself, run lime rebuild extension-ffmpeg linux
.
You will need to repeat this step if you change any of the C++ files located in the project
folder.
Be sure to run lime rebuild extension-ffmpeg linux -debug
instead if you are planning to debug the target application.
To build extension-ffmpeg
from source, follow these steps:
- Do NOT download the repository by clicking the
Download ZIP
button on the Github page.
- Instead, run
git clone https://github.com/MasterEric/extension-ffmpeg
to create a local Git repository.
- Use Brew to install dependencies:
brew install nasm openssl
- Navigate to the project folder.
- Call
git submodule update --init --recursive --remote
to download the source for FFmpeg. - Navigate to
./lib.src/
. - Run
./build_mac64.sh
.
- You will need to repeat this step if you modify the compile flags in the script (which are used to build FFmpeg's libs).
This will generate the necessary .a
files that you need to build the extension.
To build the extension itself, run lime rebuild extension-ffmpeg mac
.
You will need to repeat this step if you change any of the C++ files located in the project
folder.
Be sure to run lime rebuild extension-ffmpeg mac -debug
instead if you are planning to debug the target application.
To build extension-ffmpeg
from source, follow these steps:
- Download and unzip the android ndk (r23c)
- Navigate to the project folder.
- Call
git submodule update --recursive
to download the source for FFmpeg. - Navigate to
./lib.src/
. - Change the ndk path in
build_android64.sh
to your ndk path, - Run
./build_android64.sh
.
This will generate the necessary .a
files that you need to build the extension.
To build the extension itself, run lime rebuild extension-ffmpeg android
.
this is still on testing, only 64 bits is supported as of now
Support for other platforms (Android, iOS, HTML5 via emscripten) is in development.
The extension-ffmpeg
library is made available under the permissive MIT License.
This software utilizes libraries provided by FFmpeg, licensed under the LGPLv3.0. Its sources can be downloaded here.
- MasterEric - Creator, lead developer and maintainer.
- JonnyCat - MacOS support.
- The contributors.