Installing the H264 Streaming Module on a cpanel server

The H264 Streaming Module is a webserver plugin that enables HTTP pseudo-streaming – the technology that allows you to jump to any part of a video regardless of whether it has been downloaded yet.

This post is mostly an aide-memoire for us, but putting it ‘out there’ in case it’s useful to others too.

HTTP pseudo-streaming – what is it?

HTTP Pseudostreaming lets you play back MP4 and FLV videos in portions – this means your video viewers can seek to parts of a video which have not yet been downloaded (as you can do on YouTube).

It’s useful for browsers which require flash mode (as HTML5 browsers can pseudo-stream automatically), and because it uses HTTP, your videos will work regardless of firewall settings.

For full information, please see the excellent article on the JW PLayer site.

Installing the H264 Streaming Module on a Cpanel server

1) Login as root to the server via ssh.

2) Switch to your home directory, download and unpack the Module.

cd ~
tar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz
cd ~/mod_h264_streaming-2.2.7

NB: This example is for version 2.2.7. Check on the CodeShop website to ensure it is still the latest version 😉

2) Configure and install the module.

sudo make install

The installer will hopefully install in the /usr/local/apache/modules directory, but double check by looking at the information in the last 20 or so lines of the output!

Libraries have been installed in:

NB: If you get the following error:

** Unrecoverable Error **
The C compiler is not functional and auto repair failed.
Perl module installs require a working C compiler.
Please repair the C compiler and try again.

Chances are it’s a problem with the permissions on the /tmp folder. It should be owned by “root” and have 1777 permissions.
The permissions can be set via:

# chmod 1777 /tmp


3) Now include the module in the Apache configuration.

There are two ways to do this – via command line, or via WHM. We’re already in shell, so lets look at that way first.

a) Via Shell, using the vi text editor

vi /usr/local/apache/conf/includes/pre_main_global.conf

One in vi, hit the ‘i‘ key to enter insert mode and paste the following:

LoadModule h264_streaming_module /usr/local/apache/modules/
AddHandler h264-streaming.extensions .mp4

NB: If the module was installed in a different directory to /usr/local/apache/modules/ then adjust accordingly!

Now save the file – hit ESC key to exit insert mode, then type the following to save and quit.


Finally, rebuild the config file and restart apache

service httpd restart

b) Via WHM

Select “Apache Configuration”

Select “Include Editor”

Under “Pre-Main Include” select “All Versions”.

Enter the following:

LoadModule h264_streaming_module /usr/local/apache/modules/
AddHandler h264-streaming.extensions .mp4

NB: Again, checking the path to module is ok.

Select ‘Update’ and follow instruction to restart apache.

4) Finally, if you are using it commercially, you need to get a licence
(€39 for single webserver at time of writing)

Please share your thoughts

Your email address will not be published. Required fields are marked *

Want a pic to show with your comment?
Go get a Gravatar