当前位置: 首页 >> 榆树网-网络 >> 文章正文

Apache flv streaming done right

  1. Download my tuned version of mod_flvx or the original mod_flv by Paul Querna.
  2. Install apxs tool (also avaliable in RPMs for most systems as httpd-devel)
  3. Compile and install your module with the following command:
    apxs -c -i ./mod_flvx.c 
  4. Add the following 2 lines to your httpd.conf or create a dedicated /etc/httpd/conf.d/mod_flvx.conf (path depends on your Linux distribution):
    LoadModule flvx_module modules/mod_flvx.so
    AddHandler flv-stream .flv 
  5. Restart Apache (i.e. with service httpd restart)

Testing:
# Using curl:

curl -I "http://mysite.com/video.flv?start=100000" 

..where 100000 is some byte position in your file. This should show you Content-Type: video/x-flv. Now increase the start= parameter and the Content-Length should be smaller accordingly.
# Using wget:

wget -O test.flv "http://mysite.com/video.flv?start=1048576" 

The generated test.flv should be of size originalSize – 1MB

From: http://flowplayer.org/forum/5/14679

相关文章

发表评论