About PHP FLV (Flash Video) Streaming

PHP FLV streaming is a great flash technology, which has been created by a community of users who have experienced several different streaming services and have not been satisfied with any of them. It is a variation of 'progressive download', but with important benefits normally only found in streaming – such as immediate random access to different parts of a movie.

This solution dramatically reduces the cost of delivering streaming video as it does not require a specialized streaming server. Any web server with PHP installed can deliver PHP FLV Streaming video. Thousands of simultaneous connections are possible, depending upon your server’s bandwidth.

PHP Streaming streams are sent using Hypertext Transfer Protocol (HTTP) protocol. This connection-oriented protocol guarantees the safe delivery of every packet sent. If a packet is lost, the server continues re-transmitting it until the packet is delivered or the connection is lost. Since PHP Streaming uses the same protocol as common Web content, there is less a chance of encountering problems getting past firewalls than with content from a streaming server.

PHP Streaming can also take advantage of more advanced methods of compression than streaming video, such as Two-Pass Variable Bit Rate (VBR) encoding. It can take as much as 1Mbps for a streaming file to imitate the quality of a 600kbps file compressed using Two-Pass VBR.

Nearly every beneficial feature available with a specialized streaming server implementation can be achieved with PHP FLV Streaming, with the exception of live feeds or multicast support.

How does it work ?

Specialized video players, like those offered by RMP, are employed in the web pages to communicate with a small PHP file (about 2K) that resides on the web server. That is all that is necessary to control the streaming video data communication between the web browser and the web server. The player and PHP control file stream the movie to the user’s computer in small packets where it is played without being stored on the user’s hard drive – making playback highly efficient.

Users can immediately begin viewing any part of a movie without having to wait for the entire movie to download. The user can navigate to a specific part of the movie by either moving the scrubber bar or clicking on a convenient button. The scrubber bar or button position corresponds to a timecode, or keyframe of the FLV movie and the player immediately requests the web server to start streaming the movie from the desired timecode.

To enable this “seek-to-keyframe” function the FLV file needs to be enhanced slightly by “injecting” some data directly into the FLV file. A free utility called FLV Metadata Injector (PC only) from Buraks.com quickly modifies the FLV file by adding the necessary associations of timecode and keyframes. This “metadata” is then used to locate the precise point to start streaming the movie.

Difference between Streaming, Progressive Download and PHP Streaming

Benefit Streaming Progressive Download PHP Streaming
Real-time broadcasts X
Long clips X X
Immediate random access to different parts of a movie X X
Downloads entire movie X
Downloads required part of the movie X
FLV is cached on the local system X
Requires a specialized streaming server X
Requires a web server with PHP X
Can be stopped by firewalls X
Consistent high quality playback at any connection speed X X
Retransmits lost packets X X

Usage Scenarios

Scenario Streaming Progressive Download PHP Streaming
Live broadcasts X
WebTV X X
E learning X X
Online rich media presentation X X
Movie trailers X X
Short product training clip X X
Offline product (CD, DVD) X