Apache flv streaming done right
- Download my tuned version of mod_flvx or the original mod_flv by Paul Querna.
- Install apxs tool (also avaliable in RPMs for most systems as httpd-devel)
- Compile and install your module with the following command:
apxs -c -i ./mod_flvx.c
- 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
- 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