libflv – creating FLV video streams

libflv is able to create FLV streams for use with Flash/SWF movies. Currently, libflv is only capable of creating video-streams with Screen Video Format codec (since SWF version 7) and MP3 audio streams.

Hostingstep.com started testing top hosting companies and recommends the following companies with

deals and coupon

SourceForge Project Page
Tutorial: 7.5.2005
Video and Audio Streaming with Flash and Open Source Tools
A tutorial describing creating and converting FLV content and creating a simple flash multimedia player. Download Player Sourcelibflv v0.2 28.02.2004
– improved api
– audio support (currently only Mp3)
– screen video code / capturing is a lot faster now
– flv-util: split / sync / edit flv filesInstall:
Download (local SourceForge) and extract the tar.gz archive.
cd libflv/src
make
make install
Example:
Also included in the archive is a very basic gtk screen capture tool, based on gimps screen-shot tool.

Example FLV stream: screen.flv
Example SWF file made with MING: screen.swf

Information on how to work with videos and MING can be found here.

Create Stream Object:

video_stream = ScreenVideo_newStream(width, height, blockSize, zlib_comp);
Create FlvStream:

FlvStream_newStream(“/tmp/out.flv”, NULL, video_stream, FLV_VERSION_1);
Write Frame:
Fill structure with image data:

int frame;
struct PixelData pixelData;

pixelData.width = width;
pixelData.height = height;

/* raw pixel data */
pixelData.data = data;

/* row ordering */
pixelData.rowOrder = TOPDOWN;

/* number of channels of pixel data
3 = RGB
4 = RGB + alpha
*/
pixelData.n_channels = n_channels;

/* row padding in bytes */
pixelData.rowPadding = padding;
write data:

FlvStream_writeVideoTag(flv, timeStamp, 0, &pixelData;);