Menu

Compilation

Anonymous Bruno Herbelin

Dependencies

Compilation tools

You need to have installed the following tools:

  • GCC 4 (C and C++ compilers)
  • CMake 2.6 or above
  • Qt build environment (moc, uic, etc)
  • SVN Subversion

Libraries

To compile GLmixer, you need the headers and libs (dev packages) of:

  • lib Qt 4.5 or above
  • lib ffmpeg (>52)
  • + optionnally lib OpenCV 2.0 (< 2.1)

Each of them may have dependencies that should also be satisfied.

Procedure

General instructions

  1. Install the dependencies
  2. Checkout GLMixer source files from here.

    svn checkout svn://svn.code.sf.net/p/glmixer/Source/trunk glmixer-Source
    
  3. Run CMake GUI and select the glmixer-Source top directory as location of the source (& choose a build directory)

  4. Do configure (choose the Makefile generator, or Ninja, or your favorite one)
  5. Make sure there is no error and set 'CMAKE_BUILD_TYPE' to 'Release'
  6. Do generate.
  7. Typically, run "make" (or "ninja") in a terminal to build the program (or use an IDE).

bh@nico:~/Developments/glmixer-read-only$ make clean
bh@nico:~/Developments/glmixer-read-only$ make
[  1%] Generating qrc_qtpropertybrowser.cxx
[  2%] Generating qtbuttonpropertybrowser.moc                                                                          
[  4%] Generating qtgroupboxpropertybrowser.moc                                                                        
[  5%] Generating qtpropertybrowserutils_p.moc                                                                         
[  7%] Generating qttreepropertybrowser.moc                                                                            
[  8%] Generating qteditorfactory.moc                                                                                  
[ 10%] Generating qtpropertybrowser.moc

...

[ 98%] Building CXX object src/CMakeFiles/glmixer.dir/qrc_textures.cxx.o                                               
[100%] Building CXX object src/CMakeFiles/glmixer.dir/qrc_images.cxx.o                                                 
Linking CXX executable glmixer      
[100%] Built target glmixer

Et voila! You can find the executable of GLMixer in the src directory of the build target.

Optionnal:

  • Do 'make package' (or "cpack") to generate an installer.
  • If you encounter problem related to Qt version, set 'DESIRED_QT_VERSION' to 4 (four). This obviously means that you also have installed Qt4.

Extensions

OpenCV

OpenCV optional build adds the possibility to import webcam streams into GLMixer.

  1. Install OpenCV libraries for your platform (see below).
  2. Check the 'USE_OPENCV' option in CMake when you are at step 5. Do configure once more. You will then have the possibility to fill in the field 'OpenCVDIR' with the location of your opencv installation (if you installed a Linux package, just put '/usr', if you are under Windows, enter a path like 'C:\OpenCV2.0' ). Configure once again to validate and continue the procedure from step 6.
  3. If all goes well, you now have the possibility to create a 'New Source Device' (menu 'Sources')

FreeFrameGL plugins

FreeFrameGL optional build adds the possibility to apply extra filters to your sources and to generate graphics from plugins. This includes the support for ShaderToy scripting.

  1. Choose a version in the 'USE_FREEFRAME' option in CMake. For x86_64 build (e.g. Linux), select version 1.6. For i386 build, select the version 1.5.
  2. Configure once again to validate and continue the procedure from step 6 of the compilation instructions.
  3. If all goes well, you now have the possibility to create a 'New Source Plugin' (menu 'Sources') and to load freeframe plugins in the 'OpenGL plugins' tab of the mixing toolbox

You will find several example plugins (shared library files) in the folder FreeFramePlugins of your build directory.

  • FreeFrameBlurPlugin
  • FreeFrameFragmentCodePlugin
  • FreeFrameQtScreenCapturePlugin
  • FreeFrameDelayPlugin
  • FreeFrameMonteCarloPlugin
  • FreeFrameShadowPlugin
  • FreeFrameWavePlugin
  • video4LinuxFFGLPlugin

You can load them from the the 'OpenGL plugins' tab of the mixing toolbox.

To create your own plugin, modify the template FreeFrameTestPlugin.

Shared Memory

Shared Memory optional build adds the possibility to import into GLMixer the output of an external program. Example programs are also provided.

  1. Check the 'USE_SHAREDMEMORY' option in CMake.
  2. Configure once again to validate and continue the procedure from step 6 of the compilation instructions.
  3. If all goes well, you now have the possibility to create a 'New Source Shared Memory' (menu 'Sources') and to 'Share to RAM' the output of GLMixer (menu 'Export').

You will find two example programs in the folder SharedMemory of your build directory:

  • ScreenMix : program to capture the screen
  • ScribbleMix : program to draw with the mouse

Linux specific

You would certainly choose to install the dependencies using the package manager of your distrib. If you are up-to-date, the latest version of the development packages should be good enough (typically for Qt). Here is a list of required packages for Ubuntu (to install with all their dependencies):

  • subversion
  • cmake-qt-gui
  • libqtcore4
  • libqtgui4
  • libqt4-xml
  • libqt4-opengl
  • qt4-qmake
  • libqt4-dev
  • libqt4-opengl-dev
  • libavcodec-dev
  • libswscale-dev
  • libavformat-dev
  • libavutil-dev
  • libavfilter-dev
  • libglew-dev

Dependencies from libav (depends on version):

  • libvorbis-dev
  • libx264-dev
  • libxvidcore-dev
  • libv4l-dev

For optionnal OpenCV:

  • libcv-dev
  • libcvaux-dev
  • libhighgui-dev
  • libv4l-dev

Windows specific

I compile using GCC with MinGW (http://www.mingw.org); the simpler is use the graphical installer and to follow the default procedure. Open a MSYS shell (the shell from MinGW) and install these additional packages:

mingw-get install mingw32-zlib
mingw-get install mingw32-libbz2

You will also need Subversion; either http://tortoisesvn.net/ or http://sourceforge.net/projects/win32svn/ (I use version 1.6 of win32svn because I use Eclipse IDE which is not compatible with latest tortoise 1.7).

Compiling FFMPEG

You will also need the assembly compiler used to optimize code of FFMPEG: just download the executable of YASM from http://www.tortall.net/projects/yasm/wiki/Download, and place a copy of the program renamed to 'yasm.exe' somewhere in the MinGW path (typically C:/MinGw/bin).

Get a recent version (or the latest GIT) from http://ffmpeg.org/download.html and run the standard compilation procedure in a MSYS shell (from the ffmpeg folder):

./configure --enable-memalign-hack --enable-runtime-cpudetect --enable-w32threads
make
make install

Optionnal: I recently had a compilation error and had to add the following line at the beginning of the ffmpeg Makefile before lanching make :

CFLAGS += "-std=gnu99"

NOT compiling FFMPEG

Get the development (Dev) and shared libraries (Shared) packages of ffmpeg from zeranoe and merge their folders into your MinGW root (copy the folders bin, lib and include in C:\\MinGW).

Other dependencies

Install those using their installers:

To install GLEW library, I did not find a very clean method (the compilation under MinGW crashes), but what I do works fine: first download the win32 binary from http://glew.sourceforge.net/index.html, then uncompress the zip and merge the folders into your MinGW root (copy the folders bin, lib and include in C:\\MinGW).

To install OpenCV (optionnal), the simpler is to download the library already compiled from opencv sourceforge (I use the OpenCV-2.3.0-win-superpack.exe) and to copy the include folder (e.g. OpenCV2.3/build/include) in your MinGW folder and the dlls from the bin folder (e.g. OpenCV2.3/build/x86/mingw/bin) to your MinGW bin folder. Otherwise get the source of the latest version and compile it. It uses CMake for configuration and generates a makefile to build the project in a mingw console.

Compile

You are ready to compile GLMixer under windows! Now follow the general instructions above.

NB: I did not try with MS Visual Studio, and don't see why I should use it as MinGW does the job, but you can try.

OSX specific

I compiled using the MacPort (http://www.macports.org/) tools and libraries. It will require !XCode that you can obtain from http://developer.apple.com. Also install the Command Line Tools (from the preference / Downloads / Components). Optionally, install PackageMaker if you want to make the DMG package (which is in the “Auxiliary Tools for Xcode” package as of Xcode 4.3).

After downloading the MacPort OSX package installer (http://www.macports.org/install.php) and following the instructions, you can now install glew, ffmpeg, qt development packages (and their dependencies).

One command line is enough to get all what is needed to compile GLMixer: type in a terminal:

sudo port install ffmpeg-devel qt4-mac glew cmake svn

You can also use MacPourt to install OpenCV (optionnal).

You are ready to compile GLMixer under OSX! Now follow the general instructions above. You may set the variable CMAKE_OSX_DEPLOYMENT_TARGET to your OSX version (e.g. 10.8) and CMAKE_OSX_ARCHITECTURES to your architecture (i.e. x86_64, i386 or ppc).

In order to generate a bundle after the compilation (i.e. a successfully ending make), you shall call

make package

Alternatively, get Cmake from here: http://www.cmake.org/cmake/resources/software.html. Warning: better use cmake 2.8.12 or above!

NB: if you are looking for a subversion (SVN) client for OSX, just use the command line version provided by MacPort :

sudo port install subversion

NB: I encountered a problem with the 'expat' mac port package under OSX 10.9 : the gnutar command does not exist: simply create an alias of tar : sudo ln -s /usr/bin/tar /usr/bin/gnutar

Statistics


Discussion

  • Anonymous

    Anonymous - 2015-01-14

    Originally posted by: ilovegam...@gmail.com

    I get an error during make. I have the full text over at http://pastebin.com/U3YC0fHL

    I am running Ubuntu 14.04.1 64bit

    63% Building CXX object src/CMakeFiles/glmixer.dir/VideoFile?.cpp.o /home/mmance/glmixer/glmixer-read-only/src/VideoFile?.cpp: In member function ‘void VideoFile?::close()’: /home/mmance/glmixer/glmixer-read-only/src/VideoFile?.cpp:469:41: error: ‘avformat_close_input’ was not declared in this scope

    avformat_close_input(&pFormatCtx);

    ^

    /home/mmance/glmixer/glmixer-read-only/src/VideoFile?.cpp: In member function ‘int VideoFile?::stream_component_open(AVFormatContext**)’: /home/mmance/glmixer/glmixer-read-only/src/VideoFile?.cpp:1033:120: error: ‘avcodec_descriptor_get’ was not declared in this scope

    qWarning() << filename << QChar(124).toLatin1()<< tr("The codec ") << avcodec_descriptor_get(codecCtx->codec_id)->long_name << tr("is not supported.");

    ^

    make2?: *** [src/CMakeFiles/glmixer.dir/VideoFile?.cpp.o] Error 1 make1?: [src/CMakeFiles/glmixer.dir/all] Error 2 make: *** all? Error 2

     
  • Anonymous

    Anonymous - 2015-01-16

    Originally posted by: bruno.he...@gmail.com

    Thanks for pointing out this issue. It seems you are not using the package of libavcodec : your libavcodec library is in /usr/local/lib

    I need to know the exact version of your libavcodec to fix the compilation:

    > ls /usr/local/lib/libavcodec*
    

    will show the list of library files with version numbers (e.g. libavcodec.so.56.1.0 in my computer)

    Otherwise, install the package libavcodec-dev (and libavcodec-extra if possible) and link with the library at /usr/lib/x86_64-linux-gnu/libavcodec.so

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.