User Documentation for Flash Streaming via PHP, FlvStreamProvider
FSP*1 is a PHP script that enables to stream FLV file via PHP. originally inspired by Streaming Flv Video via PHP take two, Stefan Richter.
FSP is not an substitution of FlashMediaServer.
But it able to seek the video position on demand, means "streaming".
The problems are, FMS needs port 1935 for RTMP protocol, and FMS can not work with Http Server at same time.
FSP will solve this problem simply. Just put this script and Flash videos on your server, then you can serve streaming video with 80 port.
Original script, provided by Stefan, is very cool, but it is not able to specify position via milisecond, and no seek position cache future. So I rewritten the script.
Installation.
- Copy http://www.guarana.cc/kent/streamSource.php as php script
- Place the script on your server
- Place Flash videos on your server
- ex: http://sample.com/path/to/streaming/video.flv
- you can change root by changing FSP_ROOT to where you want.
- default is same directory with get.php
- create a directory named "cache" add permission to apache to write.
- ex: htdocs/path/to/cache
- you can change this by changing FSP_CACHE to where you want.
- default is "cache"
Now you can access video.
For example, if you want to access streaming/video.flv, and position 30sec, specify file and position.
http://sample.com/path/to/get.php?file=streaming/video.flv&position=30000
If you want to create a cache for the video, access
http://sample.com/path/to/get.php?file=streaming/video.flv&createcache
manually.
Arguments are,
name | meaning | default |
file(required) | file name of the video | none |
position | position to seek in milisecond | 0 |
createcache | create cache | none |
Now you can create a streaming video/audio application!
- PHPでFLVストリーミング,その1 - Paradigm Shift Design
- PHPでFLVストリーミング,その2,成功したよパパン!の巻き - Paradigm Shift Design
- PHPでFLVストリーミング,その3 - Paradigm Shift Design
- FLVのファイルフォーマット - Paradigm Shift Design
- PHPでストリーミング,その4 - Paradigm Shift Design
- User Documentation for Flash Streaming via PHP, FlvStreamProvider - Paradigm Shift Design
*1:FlvStreamProvider