Compiling and Installing Snowmix.

Updated for Snowmix 0.5.2

Introduction


This page contains information about compiling, installing and testing latest Snowmix version. Information for compiling Snowmix version 0.5.1 is also available.

Preparations and bootstrap.


To compile, install and run Snowmix, Snowmix source code must be downloaded onto a supported platform. Furthermore Snowmix requires a number of libraries and tools.

The good news is that Snowmix's boostrap script will detect platform and offer to install any missing package or libraries.

Top

Sudo.

The bootstrap script will use the command sudo for installing missing packages and you will be required to provide your password for sudo for it to succeed.

If you are uncomfortable providing the password to the boostrap script, you can alternatively install any missing packages your self beforehand. See the list of required software here. The bootstrap script will then either detect the installed packages or ask to skip detecting possibly missing packages and proceed without executing sudo needing the password. Unfortunately this does not fully apply for the Mac OS X, but you can look in the boostrap script for any wrong doing your self.

Some distros, such as Debian and others, the users do not by default have access to execute *sudo* commands. To have access to execute the *sudo* command on a Debian system, you need to add your username to the sudo group in the /etc/group file. Alternatively you may be able as root to run the command:

# adduser YOUR_USERNAME sudo

After adding your username to the sudo group, you need to log out and log in again. ALterntive to adding your user name to the sudo group, you can alter the /etc/sudoers file to grant you access to execute the sudo command. This takes effect immediately. If *sudo* is not installed, you need to add it as root.

su - apt-get install sudo

On Linux Mageia 9, you need to add your user to the "wheel" group to be able to use sudo. After adding user to the wheel group, you have to reboot. Logout and login is not enough. More on < ahref="https://wiki.mageia.org/en/Configuring_sudo">sudo on Mageia here.

On Ubuntu you can manually install the missing packages using the following command:

sudo apt-get install build-essential automake autoconf libtool g++ pkg-config libsdl2-dev tcl-dev \ libpango1.0-dev libpng12-dev libosmesa6-dev freeglut3-dev freeglut3-dev liborc-0.4-dev \ python3-dev libpython3-dev

This may work on Debian as well.

Some Ubuntu/Debian alike distros may require tcl8.6-dev or tcl8.5-dev instead of tcl-dev. tcl-dev in one of its versions/incarnations is needed by Snowmix to include the embedded Interpreter offering advanced scripting.

The preferred version of libpng is 1.6. However, installing this versions often conflicts with a lot of other precompiled packages usually compiled for libpng12. If you can install libpng16-devtools, Snowmix will prefer that version over version 1.2 and you can remove libpng12-dev from the list of files required to be installed. This file is listed in files in the bootstrapd directory of Snowmix.

For version 0.5.2, libSDL has been upgraded from 1.2 to 2. Support for libSDL 1.2 is no longer supported. The Python packages are only needed if support for an embedded Python interpreter in Snowmix is desired.

Top

GStreamer


GStreamer-1.0 (GStreamer 0.10 is no longer officially supported here nor at the GStreamer project) is needed by the demo examples and the scripts to feed audio and/or video streams to Snowmix and to read mixed video and/or audio from Snowmix.

GStreamer versions 1.2.0-1.2.1 have an issue with the alpha value (setting value to 127 instead of 255) when converting video streams from I420/YUV to BGRA.

GStreamer versions 1.2.1-1.2.2 have a performance issue (uses 2-4 times as much CPU) when converting video streams from I420/YUV to BGRA lowering the overall performance of a Snowmix video mixer system.

Gstreamer versions 1.5.0-1.5.2 seems to have issues with Matroska mux and TS mux and demux, but appear otherwise to be fine.

Due to these issues, the scripts of Snowmix will require GStreamer 0.10 if GStreamer 1.2.0-1.2.2 is installed, but an upgrade to newer versions is strongly recommended.

Snowmix version 0.5.2 was primarily developed using the 1.8.x to 1.16.x of GStreamer. The recommended GStreamer version is GStreamer-1.16.2 or newer. Version 1.6.3 was the recommended version for Snowmix 0.5.1 and version 1.4.5 was the recommended version for Snowmix 0.5.0.

The basic GStreamer tools can on Ubuntu be installed by executing the following command although this may be an older version:

$ sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa

GStreamer packages for other platforms are listed for most on the required software page.

Because some modules like faac and others seem to be missing in some of the prebuilt binary packages of GStreamer, it is recommended, that you take the time to compile GStreamer yourself. Make sure to document how to in a script, so you have when GStreamer releases new versions. For most platforms, all you have to do is to:

./autogen.sh make sudo make install

For each package, you can at the end of autogen.sh (actuallay it is after './configure' performed by autogen) see which module elements that are included and which are not. It will for a lot of module element depends on whether or not you have the right libraries and development (typical the devel version) files for header files installed on your system. It takes some times to go through, but it is worth it.

Alternative to compile and install GStreamer yourself, the author of Snowmix can do it for you for a smaller fee.

Top

Tcl/Tk


If you want to run the GUI utilities such as snowaudio.tcl for controlling audio, snowscene.tcl for controlling scenes or snowoutput.tcl to monitor output timing and buffers, you will need Tcl/Tk and BWidgets. To install these packages on a Ubuntu platform execute one of the following:

$ sudo apt-get install tcl8.6 tk8.6 bwidget tcl8.6-dev $ sudo apt-get install tcl8.5 tk8.5 bwidget tcl8.5-dev $ sudo apt-get install tcl tk bwidget

Once again, the boostrap script supplied with Snowmix will offer to install the required packages, Tcl and Tk tools included for all supported platforms.

Top

Compiling Snowmix:


Unpack the Snowmix package, enter the main directory and run the bootstrap script. The script may be needed to run more than once if packages are missing. After running the bootstrap script, you can rerun the configure program with your own customized settings. After bootstrap and the optional configure process, you run the make command as shown below:

$ tar -xzvf Snowmix-0.5.2.tar.gz $ cd Snowmix-0.5.2 $ ./bootstrap # Run ./bootstrap again if the script terminates asking to be run again. May have to run 1-4 times or so. That is normal. $ make

That's it. Please pay attention to what the bootstrap script will tell you when it finish, hopefully without any errors. At the end of the boostrap script you will be told something like this:

You can rerun ./configure --prefix=YOUR_INSTALLATION_DIR if you need to change the installation path for Snowmix You can revert the bootstrap script by executing the command './strapboot' >>>>>>>>>> PLEASE NOTE <<<<<<<<<<<< By default the Snowmix will be installed in /usr/local. If you want to change this, please run ./configure --prefix=YOUR_CHOICE If Snowmix is installed into /usr/local you need to set the enviroment variable SNOWMIX to /usr/local/lib/Snowmix-0.5.2 Consider adding the following to your ~/.bashrc or ~/.bash_profile export SNOWMIX=/usr/local/lib/Snowmix-0.5.2 Then after finishing this script, logout and login again to continue Press return to continue Now you can compile Snowmix and install snowmix using the following commands: make sudo make install After that, you can run Snowmix by executing the command snowmix ini/YOUR_INI_FILE Or you can run the demo by executing the command 'snowmix_demo' For questions and help, please use the discussion forum at http://sourceforge.net/projects/snowmix/ where you in the Wiki also can find a lot of documentation, examples and help. See also website http://snowmix.sourceforge.net/ for ressources and documentation

Please read what the boostrap script tells you and take the actions it suggests.

After succefully running make, you now have the binary snowmix in the src directory. You can change the default installation directory through the configure command before running the make command. Use ./configure --help for more information.

Platform Comments


Canonical Ubuntu: Tested with Ubuntu Desktop 24.4.3 LTS and Ubuntu Desktop 25.10. All works. Both were amd64.

Debian: Tested with Debian 13.1.0 Trixie. All works.
Needs package sudo and you need to add permissions to run sudo for the user running the bootstrap script.

Fedora: Tested with Fedora Workstation 43. All works however Gstreamer in pipeline uses an image sink that seems small. Probably easy to fix using another video sink than gl_sink.
Tested with Fedora Workstation 42. All works.

Mageia: Tested with Mageia 9. All works.
Tested with Mageia 8. The bootstrap has problems installeing required pakages. This will not be fixed as Mageia 9 works and Mageia 8 is almost 5 years old at the release of Snowmix 0.5.2.

Manjaro: Tested with Manjaro KDE 25.0.10. All works. Make sure you use bash as shell.

Linux Mint: Tested with Linux Mint Cinnamon 22.2. All works.
Tested with Linux Mint Cinnamon 20.2. All in Snowmix works, but the GStreamer plugins have issues decoding the provided Big Bunny movie feeding it into Snowmix as live video. As Mint 22.2 works, this will not be investigated further.

MX Linux: Tested with MX Linux 23.6_64. All works.
Tested with MX Linux 21_?_64. Most works, but it will not link object file when compiling for OpenGL Support (glshapes - 3D). The compiler says "... recompile with -fPIE". Because it works with MX 23, this will not be further investigated.

OpenSUSE: Tested with OpenSUSE Tumbleweed 20251015. All works.
Tested with OpenSUSE Leap 16. While Snowmix works, the package gstreamer-plugins-libav isn't found by zypper. You need to find the right version yourself and install it manually. Without it, you may miss important decoders such as decoder for H.264 etc. As such the script input2feed cannot play, decode and input to Snowmix the accompanying video Big Bunny ...
Because Tumbleweed works and because the issue is associated with issues for providing H.264 in the OpenSUSE distro, this will not be addressed further or fixed by the Snowmix developer.

Top

Comments for Platform previously supported.


The comments for previously supported platforms, has not been validated for Snowmix 0.5.2 because the platforms are no longer supported. However for some it may prove useful, the comments have been preserved here.

Linux CentOS: You need to add permissions to run sudo. GStreamer seems to miss H.264 and AAC encoder and decoder modules needed for the demo example. CentOS 8 does not provide a ready made package for BWidget. You will have to download and install BWidget manually for any of the GUI tools to work.

Linux Chakra: Runs fine, but Chakra seems to miss BWidget as an installable package although available for Arch Linux. Perhaps you can download it and install it your self.

FreeBSD PCBSD: You need to execute the following command

sudo ln -s /usr/local/bin/bash /bin/bash

for the scripts to work. Run all commands in bash rather than other shells. No video/image sinks was found for GStreamer1.0 for PCBSD10.2. No 'wish' needed for tcl GUI programs was found.

Top

Including Support for embedded Python interpreter


The embedded Python interpreter introduced with Snowmix 0.5.2 is alpha code and must be specifically requested included at compile time. To include support for Python, you must specify it to be included before compiling. The following command includes support for Python:

$ cd TO_WHERE_THE_SNOWMIX_CODE_TREE_RESIDES $ ./bootstrap $ ./configure --enable-snowmixpython --prefix=/usr/local --libdir=/usr/local/lib $ make clean $ make $ sudo make install

Note that on Mac OS X, the prefix should be /opt/local.

You can use the following command to list the flags you can set for the configure command after running the bootstrap command:

./configure --help
Top

Including Support for OpenGL 3D Graphics


Because Glshapes introduced in version 0.5.0 is still alpha-code in Snowmix version 0.5.2, you need to compile or recompile Snowmix to include support for Glshapes. To do this you will need to execute the following commands:

$ cd TO_WHERE_THE_SNOWMIX_CODE_TREE_RESIDES $ ./bootstrap $ ./configure --enable-snowmixosmesa --enable-snowmixx11 --enable-snowmixglu --enable-snowmixglut \ --prefix=/usr/local --libdir=/usr/local/lib $ make clean $ make $ sudo make install

Please note that Mac OS X users and others, may want to use the prefix to be /opt/local and libdir to be /opt/local/lib or whatever is preferred on the platform.

OpenGL has not been tested on the ARMv7 platform. Most implementations with ARMv7 offers OpenGL ES as opposed to regular OpenGL. Quite likely only few changes to Snowmix will be necessary to get Snowmix to work with OpenGL ES, but this is currently untested.

You can read more about Snowmix OpenGL Support in the Snowmix GL Shapes Guide.

Top

Installing Snowmix:


From Snowmix version 0.5.0, Snowmix is supposed to be installed before running. You can technically run Snowmix without installing it by setting the enviroment variable SNOWMIX to the base of Snowmix's directory. However then you are on your own. So to install you need to execute the following command:

$ make install

However unless you set installation directory in the configuration process to be something writable, or you are root, you may have to do:

$ sudo make install

From Snowmix version 0.5.0 and onwards, Snowmix is intended to be installed and has been tested as such.

Top

Testing and running Snowmix:


It is strongly advised not to run Snowmix as root. Testing Snowmix requires that you have installed a complete set of GStreamer and GStreamer plugins. You will need the plugin-base, plugin-good, plugin-bad, plugin-ugly and plugin-libav. On how to to install GStreamer and these plugins, if not already installed by the bootstrap script or by other means earlier, please use Google to search for help.

IMPORTANT: Before running any of the scripts, you need to set the enviroment variable SNOWMIX as explained by the end of the boostrap script.

A permanent solution would be to add the following to your .bash_rc file in your home directory:

export SNOWMIX=/usr/local/lib/Snowmix-0.5.2

Please note that the actual setting depends on where you installed your Snowmix collection.

On Mac OS X you should set the SNOWMIX variable in your ~/.bash_profile. PLEASE see the section further down on installing Snowmix on the Mac OS X platform regarding the SNOWMIX variable and the installation path.

When Snowmix has been installed and you have set your SNOWMIX environment variable permanently and logged out and in again, you can now run the Snowmix demo as test:

$ snowmix_demo

This demo will open one terminal window for Snowmix, one experimental audio mixer based on Tcl/Tk, one terminal running output of audio and video as well as more terminal windows running test input streams. If all goes well, you will hear audio and see a window with the mixed result depending on which menu point you choose when running the demo.

If you want to test individual ini files, you can do so using the following commands and replacing the *some_ini_file* with your choice of ini file. Available ini files are found in the $SNOWMIX/ini directory and ~/.snowmix/ini directory.

# In a terminal window $ cd $ snowmix ini/some_ini_file # In another terminal window $ xterm -e bash output2screen # In a third terminal window $ xterm -e bash input2feed 1

In the window running Snowmix, you can now type Snowmix commands. To begin with, you can type 'help' and press return. Type 'quit' when you want to stop Snowmix. If you terminate Snowmix in any other way, some of the shared memory allocated will stay allocate and build up until you can not start Snowmix again. Allocated shared memory can be found listed in /run/shm or /dev/shm (on Linux) and can be deallocated by deleting files in there. The files you need to delete are /run/shm/shmpipe*. However if you don't know what you are doing, bets are you will create problems for you and your machine. If you delete the shm files there, you will have to restart your GStreamer pipelines.

Top

Core Dumps.

Snowmix will core dump if the shared memory file system is full. On Linux you can see the state of the shared memory file system is full by executing the command:

$ df -k /run/shm

If Snowmix exits abnormally (or by using CTRL-C), Snowmix will leave shared memory allocated. If this happens a couple of times, you will eventually run out of shared memory space. The allocated shared memory space can be released by deleting the files /run/shm/shmpipe*. However if you do that, you will have to restart your GStreamer pipelines feeding Snowmix and reading from Snowmix.

The following is no longer thought to be true, but left here for later inspection. In the code in controller.cpp Snowmix will core dump when calling mmap() after shm_open() and ftruncate(). So far I don't know how to prevent it. Suggestions and hints are welcomed. This problem however seems to have gone, though it has not yet been fully verified.

Top

Compiling Snowmix for Mac OS X.


Snowmix compiles on Mac OS_X Lion, Mountain Lion, Maverick and Yosemite. It might also work on older Snow Leopard, but it has not been tested.

HighSierra, Sierra, ElCapitan, Yosemite, Maverick and Mountain Lion

To compile Snowmix on OS X on El Capitan, Yosemite, Maverick and Mountain Lion, you need to install Xcode, which Apple provide through App Store for free. So install Xcode first and possibly the Command Line Utilities. The bootstrap script will check for the Utilities and offer to be download and install it if missing.

Lion and Snowleopard

To compile Snowmix on OS X on Lion and Snowleopard you first need to install Xcode, which Apple may no longer provide through App Store for free. Then you need to download the Command Line Utilities and install this package as the bootscript can not do this. You can find the Utilities for Lion on the Apple Developer website, but for Snowleopard you may have to search elsewhere.

HighSierra, Sierra, El Capitan, Yosemite, Maverick, Mountain Lion, Lion and Snowleopard.

The boostrap script will offer to download and install port for Mac as well as a number of libraries mentioned in the Linux Section. It will also offer to download and install GStreamer for Mac for you. If you have a GStreamer version older than 1.6.3, you may want to remove that version before running the bootstrap script.

When Xcode has been installed (and started to acknowledge various licenses etc. and Snowmix has been downloaded to your Download directory, you can execute the following commands to compile Snowmix:

$ cd $HOME $ mkdir Developer $ cd Developer $ tar -xzvf $HOME/Downloads/Snowmix-0.5.2.tar.gz $ echo 'export PATH=/opt/local/bin:/Library/Frameworks/GStreamer.framework/Commands' >>~/.bash_profile $ echo 'export SM=$HOME/Developer/Snowmix-0.5.2' >>~/.bash_profile $ echo 'export SNOWMIX=/opt/local/lib/Snowmix-0.5.2' >>~/.bash_profile

Please note the use of single quotes as opposed to double quotes.

What you set the SNOWMIX enviroment variable depends on what you have selected when you ran the configure sctipt. If you ran the configure script through the bootstrap script, Snowmix will be installed into /opt/local/lib/Snowmix-VERSION for the OS X platform when you run the installation command. If however you ran the configure script afterwards, it will depend if you specified a path for the prefix. The configure script used without argument, will by default select an installation path in /usr/local rather than /opt/local. The bootstrap script may install port packages into the /opt tree by default.

Now logout and login again for changes to take effect and then run the following commands assuming you did set the PATH to include /opt/local/bin :

$ cd $SM $ ./bootstrap $ make $ sudo make install $ snowmix_demo

If '/opt/local/bin' is not included in your PATH environment variable as described, the bootstrap script may not fail, but subsequent executing "make" probably will.

If you do not allow the bootstrap script to install any possibly missing packages and tools, the subseqent make command is likely to fail unless all required software is installed and found.

If GStreamer is not in your PATH environment variable as described above, the demo script is likely to fail.

Reports on success and failures on the Mac OS X platform are very welcome in the Support Forum.

Important. The Tcl GUI scripts works poorly on OS X if tcl/tk and wish is not version 8.6. Recommended version is 8.6.4 or newer. By default Mavericks and earlier versions of Mac OS X have by default a Tcl version earlier than 8.6. If you have an OS X based system upgraded several versions, you may have several versions of Tcl installed all over the system. Some of them may even be version Tcl 8.4. This need to be cleaned. New Tcl can be downloaded for free from ActiveState Download.

Top