Snowmix Guide

Peter Maersk-Moller

Beginners Guide to Snowmix.

This Guide is obsolete and has been replaced by this new FAQ on the new Snowmix website


Introduction

This is The Beginners Guide to Snowmix intended to get you started using Snowmix without to much hazzle although some reading may be required.


Content

  • What is Snowmix?
  • Which features does Snowmix offers?
  • Which OS platforms does Snowmix support?
  • What are the hardware requirements for running Snowmix?
  • What about Snowmix for Windows?
  • What other software requirements does Snowmix have?
  • How do I get Snowmix?
  • How do I compile and install Snowmix?
  • How do I test Snowmix?
  • How do I terminate/shutdown Snowmix?
  • How do I write my own ini file?
  • How do I get mixed video out from Snowmix?
  • How do I feed video and audio into Snowmix?
  • Where can I find a Reference Manual for Snowmix commands?
  • Where can I find Snowmix manuals?
  • Where can I find Snowmix tutorials?
  • Where can I find Snowmix videos?
  • What are the different overlaying capabilities of feeds, virtual feeds, images, shapes and text compared?
  • How do I get started with Snowmix scripting?
  • How do I get started with Advanced Snowmix scripting?
  • What are Snowmix Libraries?
  • Where can I find out more about synchronizing audio and video in Snowmix?
  • How can I get free help and support with Snowmix?
  • Is paid consultancy available?
  • How can I contribute to Snowmix?
  • What are "End of Life Announcements"?
  • What has been written about Snowmix?

What is Snowmix?

Snowmix is a very flexible command line tool for dynamically mixing live audio and video feeds. Snowmix supports overlaying video, images, texts and graphic elements. It offers animation, scripting, advanced clipping, simple blending and pattern gradient blending. Snowmix is not an application, but with the Snowmix libraries and a little imagination, tailoring Snowmix into one, is a walk in the park or a piece of cake if you like.


Which features does Snowmix offers?

Some of the features offered by Snowmix are:

  • Unlimited number of regular video feeds (input of video feeds).
  • Unlimited geometries and frame rate (only limited by the computer CPU and RAM).
  • Unlimited number of virtual video feeds (copies of regular feeds).
  • Unlimited number of shape based video feeds (copies of regular feeds).
  • Limitless scaling independently for width and height for all types of video feeds.
  • Handling of PAR (Pixel Aspect Ratio) for regular video feeds.
  • Limitless rotation of images, virtual and shape based video feeds.
  • Rectangular clipping for regular and virtual video feeds.
  • Limitless clipping for shape based video feeds and images.
  • Support of complex shape and pattern based alpha blending.
  • Support for alpha blending for all types of video feeds and images.
  • Support for image transparency (images with an alpha channel).
  • Unlimited number of vector based (font based) texts in any color on top or underneath video.
  • Unlimited vector based rotation and alpha blending of text.
  • Support for solid and shaded (transparent) background for text.
  • Support for gradients and individual linear pattern shading for text backgrounds.
  • Support for animation of text, images and video feeds.
  • Support for complex graphics, image and video feed drawing, clipping, patterns,
    gradients and masking using graphic primitives of the 2D Cairo Graphics library.
  • Unlimited number of audio inputs, audio mixers and audio outputs.
  • Independent muting and volume control for all audio elements.
  • Support for simple and advanced scripting.

But the complete list is a lot longer. Development Plans are also available.


Which OS platforms does Snowmix support?

Snowmix is supported on a wide range of Linux distributions and versions of Mac OS X. Snowmix version 0.4.5 release was tested on the following platforms:


What about Snowmix for Windows?

Snowmix has not been tested on Windows. While the code from version 0.4.6 is modified to be able to compile with Visual Studio, Snowmix depends on shmsrc/shmsink modules of GStreamer and these modules depends on POSIX socket based named pipes (AF_UNIX), mmap() and shm_open(). POSIX socket based named pipes and POSIX shared memory are not available on native Windows. Nevertheless efforts to port GStreamer shmsrc/shmsink to Windows is underway, but not there yet. When these efforts matrialize in a released binary of GStreamer for Windows, Snowmix is likely to be releasd for Windows as well.


What are the hardware requirements for running Snowmix?

Snowmix is very relaxed with its hardware requirements and it has been tested successfully on a variety of older and newer computers with i386/i686, amd64 (x84-64) and ARMv7 compatible processors.

Snowmix is being developed by the author on an old 2007 Lenovo Thinkpad T61 with 2GB of RAM to ensure that Snowmix can run on a wide range of hardware including older hardware.

Although Snowmix itself have very modest hardware requirements, a complete video mixer system with many input pipelines decoding HD video, Snowmix mixing HD video and an output pipeline aggressively encoding high quality low bandwidth video will require a substantial amount of both CPU power and CPU to memory bandwidth.

The author is using Snowmix to produce Live TV rocket launches from the Baltic Sea for Copenhagen Suborbitals. The productions are in HD (720p - 1280x720@25fps) with up to 10 camera input and up to 10 audio input on an old Dell PowerEdge 1950 Generation III with with two Xeon 2.33-2.5G0Hz E5420 CPUs, each with 4 cores and 4-8GB RAM in total although less is required. This type of CPU was released for sale in 2007 so obviously Snowmix can run on older hardware as well as very well on newer hardware. Snowmix only uses a fraction of CPU as most CPU on a complete system goes to decoding video and audio streams for input as well as encoding the mixed audio and video stream for output.


What other software requirements does Snowmix have?

Snowmix depends on libcairo from CairoGraphics.org and Pango available for Linux, Mac OS X and Windows among others. Libcairo is already part of most Linux distributions. Prebuilt binaries are also available for Mac OS X and Windows although Pango may have to be built using MacPort.

Snowmix also depends on SDL, libPNG and Tcl/Tk which all have multi-platform support including Linux, Mac OS X and Windows.

For configuring and compiling Snowmix, gcc/g++ and autotools are necessary. Details are available on the page on how to compile, test and install Snowmix.

The bootstrap script supplied with Snowmix will offer to check, download and install necessary tools, libraries and needed software for you.

Snowmix uses a shared memory model for efficiently inputting to and outputting video from Snowmix. The shared memory model is compliant with GStreamer shmsink and shmsrc so GStreamer is recommended as required software too. All the scripts for inputting and outputting audio and video to and from Snowmix uses GStreamer.


How do I get Snowmix?

Snowmix is distributed for free as Open Source Software and latest versions can be downloaded from SourceForge here. Binaries are not available.


How do I compile and install Snowmix?

Instructions on how to compile, test and install Snowmix are available here. The bootstrap script supplied with Snowmix will offer to check for missing libraries and tools and offer to download and install them for you. If you have installed an earlier version of Snowmix or want to track the development of Snowmix or want to find interesting details, please view the Changelog. Please also take a look at the Release Notes.


How do I test Snowmix?

Instructions for a running a demo test are available here. Assuming you have set the environment variable SM to the directory of your Snowmix file tree as you were told when running the boostrap file, then you can now run the Snowmix demo using the following commands:

$ cd $SM/scripts
$ ./demo

How do I shutdown/terminate Snowmix?

Snowmix will terminate cleanly if the command quit is executed in either the Snowmix console window or through a control connection. If Snowmix on the other hand is killed either through an external kill signal or through sending a CTRL-C in the Snowmix console window, allocated shared memory will stay allocated and in a sense lost. If this happens a lot of times, Snowmix will eventually allocate all available shared memory in a system. This is bad and you will need to reboot your system or find another way to delete/free allocated shared memory. On Linux, you can see and free allocated shared memory using the following commands:

$ df -k /run/shm
$ rm /run/shm/shmpipe*

How do I write my own ini file?

Snowmix requires an initilization file (or ini file for short) with some specific Snowmix commands to run. Minimal examples of ini files with explanation are available here. See section on Reference Manual and Manuals further down this page for more information on commands for a Snowmix ini file. See also a list of all Snowmix commands available.


How do I get mixed video out from Snowmix?

Snowmix comes with a few example scripts in the scripts directory for getting audio and video out from Snowmix. Some of these are:

  • scripts/av_output2dummy : Getting audio and video from Snowmix for dumping.
  • scripts/av_output2screen : Getting audio and video from Snowmix for display on screen and playing through the audio device.
  • scripts/av_output2tcpserver : Getting audio and video from Snowmix for encoding, muxing and make it available as a tcp server.
  • scripts/output2dummy : Getting video from Snowmix for dumping.
  • scripts/output2screen : Getting video from Snowmix for display on screen.
  • scripts/output2rtp : Getting video from Snowmix for encoding and streaming as RTP.
  • scripts/output2file : Getting video from Snowmix for encoding, encapsulation and saving it to a mp4 file.

More details and instructions for outputting from Snowmix can be found for video here and audio here in the last part.


How do I feed video and audio into Snowmix?

Snowmix comes with a few example scripts in the scripts directory for feeding audio and video into Snowmix. Some of these are:

  • scripts/input2feed : Feeding audio or video or video and audio from a file into into Snowmix.
  • scripts/v4l2input2feed : Feeding Live video from a Linux Video Device into into Snowmix.
  • scripts/rtsp2feed (0.4.5 and onward) : Fetching a RTSP stream and feed audio and video into Snowmix
  • scripts/rtsp2feed2 (0.4.5 and onward) : Fetching a RTSP stream and feed audio and video into Snowmix

More details and instructions for outputting from Snowmix can be found for video here and audio here in the last part.


Where can I find a Reference Manual for Snowmix commands?

Reference manuals for Snowmix commands has been written although a few are still work in progress. The list below lists the reference manuals including a link to each manaual.


Where can I find Snowmix manuals?

A number of manuals has been written. For more information, please see list below:


Where can I find Snowmix tutorials?

A number of Snowmix tutorials has been written. For more information, please see list below:


Where can I find Snowmix Videos

See Snowmix in action on Snowmix's YouTube Channel. Here you can also find the Snowmix Tutorials. If you have videos created with Snowmix, we would be happy to post such videos on Snowmix's YouTube channel. Contact us through the support forum.


What are the different overlaying capabilities of feeds, virtual feeds, images, shapes and text compared?

There is a table with explanation for comparison of all the overlaying capabilities of feeds, virtual feeds, images, shapes and texts.


How do I get started with Snowmix scripting?

If you would like to understand how scripts in Snowmix work, please take a look at the Guide to Snowmix Scripting. It explains basic Snowmix scripting and has examples. When you master basic Snowmix scripting, take a look at the next section on advanced Snowmix scripting.


How do I get started with Advanced Snowmix scripting?

If you understand basic Snowmix scripting and would like to understand how advanced scripting is possible with Snowmix, please take a look at the Guide to Advanced Snowmix Scripting. It is currently under development, but it does have links to examples with advanced Snowmix scripting. Advanced scripting in Snowmix is based on using the Tcl interpreter embedded with Snowmix.


What are Snowmix Libraries?

A collection of scripts, also known as Snowmix libaries, are as part of the Snowmix source available in the slib directory. The Snowmix libraries adds complex features and operations as well ease of use to Snowmix. Snowmix libraries are mostly implemented using advanced Snowmix scripting. You can read a lot more about the Snowmix Libraries here and by following the links on these pages.


Where can I find out more about synchronizing audio and video in Snowmix?

There is a guide available for advanced information on audio and video sync in Snowmix.


How can I get free help and support with Snowmix?

Snowmix comes with a free support forum were you can ask questions and share information. Please remember to create a new thread for new questions so we don't get very long threads with many different questions. That way hopefully we all can navigate the support forum a lot easier and all benefit from questions and answers.


Is paid consultancy available?

Yes paid consultancy on Snowmix, GStreamer, Streaming and networks is available. Please contact the author through the support forum for initial contact.


How can I contribute to Snowmix?

First of you can start using Snowmix and help spread the word about Snowmix to friends, colleagues and contacts.
Second you can tell us about what you are using Snowmix for in the support forum. We would very much like to receive screenshots of the mixing you do with Snowmix, but also text telling us what you are using Snowmix for. We would also like to receive movie clips with made with Snowmix we can post on our Snowmix4video YouTube channel.
Third you can write a short review telling what you think of Snowmix.
Fourth we would very much like to receive help reading through the documentation we have written here on this site and receive suggestions and corrections for language and facts.
Fifth we would very much like to receive requests and suggestions for new features for Snowmix in the support forum.

If you like to contribute code to Snowmix or find errors in the code and have a fix for it, please contact the author in the support forum.


What are "End of Life Announcements" ?

Features of Snowmix that are being changed or removed from Snowmix in the next major release, are listed as EndOfLifeAnnouncements. A major release is a release where the major version number is changing. Releasing 0.5.0 after 0.4.x is a major release while releasing 0.4.5 after 0.4.4 is a minor release. If Snowmix is stopping supporting a specific syntax of its commands, this would result in a major release. When the command syntax is changed, normally both the new and the old syntax is available in a new minor release. If you are writing your own ini files or are using your own programs to send commands and queries to Snowmix, reading the End of Life Announcements are important to you.


What has been written about Snowmix?

There is a page on Snowmix in the media with links to articles about Snowmix. If you find articles about Snowmix not listed on this page, please tell us in the support forum.

...

Copyright Peter Maersk-Moller (C) 2012-2015. All rights reserved.


Related

Discussion: Is there like a step 1 tutorial around somewhere?
Wiki: AV Sync
Wiki: Audio
Wiki: Changelog
Wiki: Development Plans
Wiki: Home
Wiki: Overlaying Capabilities
Wiki: Reference Audio Feeds
Wiki: Reference Audio Mixers
Wiki: Reference Audio Sinks
Wiki: Reference Cairo Graphics
Wiki: Reference Command
Wiki: Reference Feeds
Wiki: Reference General
Wiki: Reference Images
Wiki: Reference Placed Shapes
Wiki: Reference Shapes
Wiki: Reference Texts
Wiki: Reference Virtual Feeds
Wiki: Release Notes
Wiki: Reserved Commands
Wiki: Shapes
Wiki: Snowmix News
Wiki: Snowmix in the media
Wiki: Tutorials
Wiki: Video Text