AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Incorrect frame rate

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Incorrect frame rate

Postby Joseph82 » Wed Feb 26, 2014 11:04 am

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?
Joseph82
 
Posts: 5
Joined: Mon May 20, 2013 10:21 am



Return to AForge.NET Framework