Smooth Streaming Module for Apache
For Apache/Windows? we have a binary available. Just copy the mod_smooth_streaming.so to your modules directory and continue with the 'Configuration'.
Dependencies
We will be using apxs2, the APache eXtenSion tool, to build and install the module for the Apache server.
Make sure you have apxs2 installed:
sudo apt-get install apache2-threaded-dev
The module also depends on Expat for parsing the XML manifest files:
sudo apt-get install libexpat1-dev
Download
Download the source of the Smooth Streaming Module for Apache.
cd ~ wget http://smoothstreaming.code-shop.com/download/apache_mod_smooth_streaming-1.0.7.tar.gz tar -zxvf apache_mod_smooth_streaming-1.0.8.tar.gz
Download the source of the command line utility 'mp4split'. This tool converts MP4 files to Fragmented MP4 and also creates the necessary manifest files.
wget http://smoothstreaming.code-shop.com/download/mp4split-1.0.7.tar.gz tar -zxvf mp4split-1.0.8.tar.gz
Build
cd ~/mod_smooth_streaming-1.0.7 ./configure --with-apxs=`which apxs2` make sudo make install
cd ~/mp4split-1.0.8 ./configure --with-expat make sudo make install
Configuration
We're going to tell Apache that files ending in .ism (“IIS Smooth Streaming Media”) are going to be handled by the smooth_streaming_module. The requests made by Silverlight are actually in a different form, but we will be rewriting them to files with a .ism extension.
In your httpd.conf:
LoadModule smooth_streaming_module /usr/lib/apache2/modules/mod_smooth_streaming.so AddHandler smooth-streaming.extensions .ism
In your .htaccess:
RewriteEngine On RewriteRule ^(.*/)?(.*)\.([is])sm([l])?/[Mm]anifest$ $1$2.$3sm$4/$2.ismc [PT] RewriteRule ^(.*/)?(.*)\.([is])sm([l])?/QualityLevels\(([0-9]+)\)/Fragments\((.*)=([0-9]+)\)(.*)$ $1$2.$3sm$4/$2.ism?bitrate=$5&$6=$7 [PT]
Note that you have to allow Apache to read the .htaccess file (i.e. 'AllowOverride FileInfo') or, even better, move the rewrite rules to a <Directory> section in your main server configuration file.
After restarting your web server, you can continue with verifying your setup.
License
This version is free if you agree to the noncommercial license. Please mention its use on your website, in the lines of 'This website uses video streaming technology by CodeShop'.
Our commercial license is very inexpensive, see the following page to check if you need a commercial license.
Feedback
If you have any questions, thoughts or ideas on Smooth Streaming you can leave a message on our forum.
