Skip to content

treytencarey/IrrlichtVideoPlayerLib

Repository files navigation

IrrlichtVideoPlayerLib

An FFMPEG project that works with Irrlicht

Based on the following GitHub projects, which were outdated and uplifted in this project:

Features

  • Play video files and display them on 3D textures.
  • Screen capture and display it on 3D textures.
  • Output stream to file.

Installation

Build Irrlicht however you'd like.

Build FFMPEG using the following steps (used this roxlu article as a reference):

  1. Install MSYS2 to c:/msys64
  2. Edit c:/msys64/msys2_shell.cmd and remove rem from the line with rem MSYS2\_PATH\_TYPE=inherit
  3. Open a x64 Native Tools Command Prompt for VS 2019
  4. Run c:/msys64/msys2_shell.cmd
  5. In the new MSYS2 shell, perform:
pacman -Syu
pacman -S make
pacman -S diffutils
pacman -S yasm
pacman -S nasm
 
mv /usr/bin/link.exe /usr/bin/link.exe.bak
  1. Get sources for x264 and ffmpeg, then fix build scripts:
mkdir tmp
cd tmp
mkdir sources
mkdir build
cd sources
 
git clone --depth 1 https://code.videolan.org/videolan/x264.git
git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git

cd tmp/sources/x264
curl "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" > config.guess
sed -i 's/host_os = mingw/host_os = msys/' configure
  1. Compile x264
cd tmp/build
mkdir x264
cd x264
 
CC=cl ./../../sources/x264/configure --prefix=./../../installed --enable-shared
make -j 8
make install
mv ./../../installed/lib/libx264.dll.lib ./../../installed/lib/libx264.lib
  1. Compile FFMPEG (IMPORTANT NOTE: This is different than the article referenced earlier):
cd tmp/build
mkdir ffmpeg
cd ffmpeg
 
export CC=cl
 
./../../sources/ffmpeg/configure \
             --prefix=./../../installed \
             --toolchain=msvc \
             --arch=x86_64 \
             --enable-yasm  \
             --enable-asm \
             --enable-shared \
             --disable-static \
             --disable-programs \
             --enable-libx264 \
             --enable-gpl \
             --extra-ldflags="-LIBPATH:./../../installed/lib/" \
             --extra-cflags="-I./../../installed/include/"
 
make V=1 -j 8
 
make install
  1. To compile out of the box, make sure your project directory structure looks like this:

SomeFolder/IrrlichtVideoPlayerLib/IrrlichtVideoPlayerLib/ (this repository)

SomeFolder/Hello/libs/tmp/ (place ffmpeg and x264 were installed and built from the previous step)

SomeFolder/irrlicht-code/ (place Irrlicht was downloaded -- this project uses the statically linked version, so you'll need to build Irrlicht statically)

License

MIT

About

An updated FFMPEG player that works with Irrlicht.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages