Saturday, May 1, 2010

Installing Apache FLV module on Windows

Most modern FLV players can show a video from a specific point. But this can only be done with server side help. In order to support this feature you will first have to inject meta data to the FLV file. This can be done, for example, with a command line named: Yamdi

The meta data, is actually a vector mapping specific points in time to their corresponding byte in the FLV file. When you move the video progress bar, the player is sending a request for the FLV file with a parameter named “start”. The parameter contains the specific byte in the FLV file from which we would like to see the vide.

Apache has a very nice module, named mod_flvx, that supports FLV streaming out of the box. When it receives a request for FLV with with the “start” parameter, it automatically knows to return the file starting at the given byte.

Finding a Windows compiled version of the module took me quite some time. So I put it here as a direct download.

Put the module under Apache modules directory and add these lines in your httpd.conf configuration file:

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

Restart your server, and you are ready to go. You can test the module, but making a request with the start parameter to some FLV file. For example:

http://localhost/myflv.flv?start=10000

If the module is installed properly, Apache will return the FLV file starting from byte 10,000.

2 comments:

  1. by adding http://localhost/myflv.flv?start=10000 at the address bar of browser works fine. Is there any way to work with jwplayer in wordpress?

    Thank you alot

    ReplyDelete