The most codecs provided with Windows are very slow. E.g. the MJPEG Compressor can not handle big images, many frame drops will be the result. The DV Video Encoder resizes the image unwanted and also changes the frame rate.
Free codecs can be found in the internet. You may try http://ffdshow-tryout.sourceforge.net/download.php
The "ffdshow video encoder" seems to work. It must be configured. Tested is the "FFV1" setting. The "MPEG" and "HuffYUV" seem to crash.
A good source for codec information is http://www.Codecpage.com/
Good commercial codecs are
Picvideo of the company accusoft https://www.accusoft.com/products/picvideo-m-jpeg-codec/overview/
LeadMJPEG of Leadtools https://www.leadtools.com/sdk/multimedia/mjpeg
The H264 codec IC Measure installs optionally, is from https://sourceforge.net/projects/x264vfw/
Microsoft also describes, how to use the built in H264 codec in your own software:
IC Imaging Control 3.5, IC Capture 2.5 and IC Measure have a built in H264 codec.
Customer recommendations:
Grass Valley Lossless Codec https://www.grassvalley.com/products/hqx_codec/ compression app 1:6