Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Streaming MP4 Video From Your Webserver [Solved]

Posted on May 11, 2012 by Percy Kwong

If you’re lucky enough to be running Apache (a good portion of the internet does), you can stream your own videos direct from your website.  This involves the addition of a small module called Mod-H264.

Here’s how to do it.  You will need root access to do this and I am assuming you’re running Centos, but the directions should pretty much apply for all linux distributions out there.

First, you’ll need to download the package from code-shop.com

Execute the following statements:

cd /usr/src

wget http://h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz

tar -zxvf apache_mod_h264_streaming-2.2.7.tar.gz

cd mod_h264_streaming-2.2.7

./configure –with-apxs=`which apxs2`

make

make install

Now, go to your httpd.conf file and modify it.  Use the following command:

vi /etc/httpd/conf/httpd.conf

Add the following lines:

 

LoadModule h264_streaming_module /usr/lib/apache2/modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4

 

Now save the file and restart httpd by typing:

service httpd restart

That’s it!  You’ve now configured apache to stream .mp4 files!  Drop one into your web root and see what happens!  You’ll find it works quite well!

Here’s the reality.  If you’re streaming video, you’re going to want to use h.264 anyway due to the quality compression and the fact that it’s supported on pretty much every platform.  (ipads, iphones, android, blackberry, etc) anyway.

It’s a great solution and it really works quite well.  I use it for my family blog so that my family can see my little girl grow up!

 

 

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.
©2023 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb