Table of Contents
If the majority of your video content is in .mp4 aka MPEG-4 format using either the original MPEG-4 codec or the improved H.264 standard, it is possible to enable a streaming mode in the Apache webserver. If you do this people will be able to play the video directly in their web browsers and be able to jump around in the timeline to skip segments, or repeat them. This is not a built-in feature but one that can quite easily be added using a plug-in module for Apache called mod_h264_streaming .
HOWEVER there are constraints as this software is not free although the source code is fully available. The software is free to use on non-commerical sites but requests attribution with a statement like This website uses H264 pseudo video streaming technology by CodeShop be added to the site. If you are using the web server commercially, you need to acquire a license at http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-License-Version2 - the license is inexpensive - 35 Euro/Approx $42 - so it shouldn't be a huge issue and well worth it for the improvement in user experience.
For Fedora/CentOS systems, the mod_h264_streaming driver has been packaged by the RPM Fusion project rpmfusion.org and is called mod_h264_streaming-2.2.7-6.el7.x86_64.rpm. If you follow the instructions on rpmfusion.org to enable the correct Non Free repository on your particular distribution, it should simply install with dnf install mod_h264_streaming.
We have not been able to find a reliable source for a similar package on Ubuntu/Debian systems, so we would recommend following the pretty clear instructions given on the author's site at: http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-License-Version2
![]() | Note |
---|---|
You may notice that the website hasn't been updated in a lot of years but it all still seems to work and there doesn't seem to be any other major alternative other than perhaps the Apache Traffic Server project - trafficserver.apache.org but that is a massive package covering a multitude of proxy cache functionality of which MP4 streaming is only a tiny part. |
The H264 streaming driver consists of just three files - two live
in the apache 2 configuration directory (/etc/httpd
on Fedora/CentOS/RHEL, /etc/apache2
on Ubuntu/Debian)
and a third (mod_h264_streaming.so
) in with the other
apache modules in /usr/lib64/httpd/modules
.
The two configuration files are conf.d/h264_streaming.conf
and conf.modules.d/10-h264_streaming.conf
.
The first one h264_streaming.conf
simply tells Apache to
pass .mp4 files to the h264-streaming module for extra processing:
AddHandler h264-streaming.extensions .mp4
The second one 10-h264_streaming.conf
simply tells
apache to install the module as it starts up:
LoadModule h264_streaming_module modules/mod_h264_streaming.so
In summary, the vast majority of WACS sites will be significantly improved by adding this module and it is our strong recommendation that you do so if hosting mp4/H264 video files.
WACS should work just fine with mod_perl and it should significantly improve the performance of your website if you choose to use it. What it does is to execute the perl language that WACS is written in INSIDE the webserver itself rather than starting up the perl interpreter /usr/bin/perl each time.
More details will be added soon by essentially running the command a2enmod mod_perl should activate it. Once activated every thing should operate normally, only faster; the only caveat is that you will probably need to restart (as opposed to just reload) the webserver if you install any updated wacs programs while the webserver is runing.