If you want to save your output as a flash video (.flv), just use ffmpeg (libavcodec / libavformat). It is a cross-platform platform and supports the .flv format (besides a huge number of others), and this should be fairly easy to do. You can also embed audio.
In a note: ffmpeg is partially included in opencv (depending on your build) as a video encoder / decoder, but I don’t know if you can force it to write as .flv (choosing the right codec line) from inside opencv. In any case, it is not too difficult to convert IplImage to ffmpeg buffer and save from there.
You may have a problem in the latest opencv (2.1) that there are problems with ffmpeg-enabled builds or is created against some version of ffmpeg that you don't want. But, as mentioned above, you do not need to use ffmpeg through the opencv 2.1 api, since you can use it directly using the ffmpeg api.
Look for examples in libavcodec on how to write video, and check the opencv source on how to convert from IplImage to AVPacket / AVFrame. I have done this before, and it was pretty easy to do.