I setup a zoneminder system a few years ago and I tried to use the Ming software to generate SWF files which are viewable in a flash-enabled web-browser. You can see my old post here:
http://www.zoneminder.com/forums/viewtopic.php?t=4371
I haven't used zoneminder in a while, so I might be out-of-date by even posting this thread...
Recently, I have played around with Ming and Ffmpeg and came up with a better way to do things...
My old method did not compress things much. It just took frame-by-frame jpeg images and made a flash movie out of it. I think that Ming does some compression by adding the second argument of "9" in the $movie->save(); function, but I don't think the compression is as good as it could be.
Anyway, I think it would be better to have flash read an .FLV file movie. The .FLV file can be compressed better, apparently. Using ffmpeg to generate FLV files, I think, does some additional compression on the frame-by-frame changes (or lack thereof) b/t JPEG images.
This is how to generate a .FLV file (called movie.flv) from a series of .JPEG images (named image0001.jpg - image9999.jpg):
Code: Select all
ffmpeg -i image%4d.jpg -f flv movie.flv
Code: Select all
%4d
Code: Select all
ffmpeg -i image%4d.jpg -f flv -
I made a PHP script that runs such a command that outputs the FLV to standard output.
Code: Select all
<?php
$exec_string = "ffmpeg -i image%4d.jpg -f flv - ";
header('Content-type: application/flv');
passthru($exec_string);
?>
At this point, you can do two things:
1. You can try to add the .FLV to a PHP script that generates SWF files using the Ming library.
2. You can create a .SWF file which uses ActionScript to load a .FLV file from a URL.
Option 2 is nice b/c most webservers do not have the Ming extension installed. You can create a SWF file on your own system and upload it.
Both of these options are well documented. Here is one page, for example, that documents this...
http://klaus.geekserver.net/ming-video/examples.html