H264 Streaming Module for Apache 实现 HTTP Pseudo-Streaming

结合jwplayer实现 HTTP Pseudo-Streaming (伪流)

Server:
The H264 streaming module for Apache, Lighttpd, IIS and NginX. It supports MP4 videos.
The FLV streaming module for Lighttpd. It supports FLV videos.

H264流模块安装:

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
Download

Download the source of the H264 Streaming Module for Apache.

cd ~
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
Build

cd ~/mod_h264_streaming-2.2.7
./configure –with-apxs=`which apxs2`
make
sudo make install
Configuration

Edit the configuration file (in /etc/apache/httpd.conf) so that file requests ending in “.mp4″ are handled by the h264_streaming_module.

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

sudo /etc/init.d/apache start
Build & Configuration (CentOS 5.2)

CentOS users can follow these intructions for building the module instead. It uses apxs (instead of apxs2) and httpd (instead of apache).

sudo yum install httpd-devel
sudo yum install httpd mod_ssl

cd ~/mod_h264_streaming-2.2.5
./configure
make
sudo make install

sudo vi /etc/httpd/conf/httpd.conf
Add the line
‘AddHandler h264-streaming.extensions .mp4′
after the line
‘LoadModule h264_streaming_module /usr/lib/httpd/modules/mod_h264_streaming.so’
sudo /etc/init.d/httpd start


调用代码:
[cc lang="html"]

JW Player goes here



参考文档:
Video Delivery: HTTP Pseudo-Streaming

Video Delivery: RTMP Streaming

更多
No Responses Post a comment

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS