This is a utility function for the user to get the frame duration based on the codec id, frame size in bytes, and various AVCodecContext parameters.