I want to make a app that record video using webcam, I made the logic like get each frame as bitmap and store it to file using AForge VideoFileWriter WriteVideoFrame function, When I open then file using VideoFileWriter Open function,
writer.Open(path, VideoWidth, VideoHeight, frameRate, VideoCodec.H264, bitRate);
It is hard to determine the bitRate, when the bitrate is wrong, the whole program die without any error.
I think the bitrate is related to video frame width, height, framerate, bitcount as well as codec, But I not sure the specific formular to calculate. I want to compress the video using h264 codec. Can anyone help me to find out the solution? Thank you very much.