Maybe you can use a converter like
FFMPEG using a library like this:
CodePlex Archive[
^]
Usually converting to H264 or H265 offers the best compression, also you could opt to reduce the width and height (resolution) of the video.
If you want to do things professionaly, you could buy the Intel IPP library:
Intel IPP[
^]