handbrake is the best freeware render-er out there, I use soreson squeeze for my windows machines...
I've been working on enabling uploading and rendering etc etc for a long time, but even with php scripts I can't seem to find a secure way to handle 2 hour high def files.. They are just too large and unfortunitly with my windows servers there has to be a directx 9+ soundcard installed in order to render the videos.. I run server 2008 r2 and server 2012 r2 currently and use the smooth streaming for static videos and hls for live channels.. handbrake renders all my live channels mp4's and soreson squeeze handles all the IIS smooth streaming formats..
As far as the codecs for go, I've found AAC for audio seems to work with any version on 99% of the end users devices and mainstream for the video codec..