Building video incrementally from incoming jpeg images

Solution 1:

Why do you want to build it one frame at a time? How does that help you? Why not have your script rebuild the video every 15 minutes (30 frames) or something more reasonable like that?

SWF is an unusual file format for video output. In general, no, you can't add a single frame to the end of SWF (or FLV) movies because it requires a stateful compressor--the compressor would have to remain in RAM and remember the state of the last keyframe and all interframe compression done since then in order to encode the next frame.

If for some reason you absolutely need to add one frame to the end of your in-progress video, use MPEG 1. MPEG 1 video is just a sequence of single frames with no interframe compression, so you can have FFMPEG compress each JPEG and just cat it onto the end of the work in progress. Of course the result will be a huge poorly-compressed file by modern standards.