 <p>You can certainly do this in C++ with the <a href="http://msdn.microsoft.com/en-us/library/aa387410.aspx" rel="nofollow noreferrer">Windows Media Format SDK</a>. </p> <p>I have only used WMFSDK9 myself. It contains a sample called UncompAVIToWMV, which may get you started. From the Readme:</p> <blockquote> <p>It shows how to merge samples for audio and video streams from several AVI files and either merge these into similar streams or create a new stream based on the source stream profile. It also shows how to create an arbitrary stream, do multipass encoding and add SMPTE time codes.</p> </blockquote>