I mentioned in creating Flash videos using FFMpeg that you could use Ming to create your own Flash video player. I've added a patch to the ruby -ming extension for video streaming so now it is possible to create a streaming player with both PHP and Ruby using their Ming extensions. The following examples show you how.
First a little background. You can read about playing back external FLV files dynamically with actionscript at the Macromedia website. It includes references to the NetConnect class and NetStream class that together let you stream a FLV file. The main thing Ming does for you in the following simple examples is give you a SWF with a video player in it and let you attach some action script to it.
Here is how you do it in PHP:
$movie = new SWFMovie(7);
$strAction = "
$stream = new SWFVideoStream();
And here is how you do it with Ruby:
movie = SWFMovie.new(7)
movie.set_background(0xff, 0xff, 0xff)
strAction = '
vstream = SWFVideoStream.new
item = movie.add(vstream)
Here is the result of the above examples: