Page 1 of 1

Incorrect frame rate

PostPosted: Wed Feb 26, 2014 11:04 am
by Joseph82
I'm using the following code:

Code: Select all
VideoFileWriter writerOut = new VideoFileWriter();
writerOut.Open(outputMixed + videoFormat, 640, 240, 5, VideoCodec.WMV2);
Bitmap image = new Bitmap( width, height, PixelFormat.Format24bppRgb );
// write 600 video frames
for ( int i = 0; i < 600; i++ )
{
    image.SetPixel( i % width, i % height, Color.Red );
    writerOut.WriteVideoFrame( image );
}
writerOut.Close( );


So the video should last 600/5 = 120 seconds, instead it lasts 240 seconds. Why?