Saving as Flash in C ++

How to save IPLImageOpenCV as a Flash file? Maybe there is a library that does this?

+5
source share
4 answers

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.

+4

Flash, IplImage ( char * imageData). 1 4 , , . Flash .

+1

lital, , , openCV flash. - Red5

, ,

Red5 - Flash- Java, :

  • (FLV, F4V, MP4)

    • ....
0

You can dump images in a sequence of files, say img00000.ppm, img00001.ppm, ..., and then delegate the video encoding to MEncoder, which, according to docs , supports flv.

What we usually do to prepare videos like this one .

0
source

All Articles