Well, the thing is we/you are talking a lot of different matters at the time.
Which free screen capture softw did you use? I used to use a good one, a friend told me was the best (the one to capture games) but I don't remember which it was... I could ask... but if you tell me it would be better.
About this coding... well, I haven't done any screen capture my self in .NET (but I did in c++, via directx it worked fine) but I could check...
Apart of that, the reproduction thing... it's not that much about how you encode it, but which driver/codec/player/plugin/whatever the end-user uses to watch the video. Usually youtube has many versions of the same file, in HD, flv, 3gp, etc (you'll see that if you use a downloader in your browser )
If your avi is like too big, it probably is compressing to basic/old mpg raw format, to make a shorter, compress as avi and check the video parameters, as width, height, frame-rate, color palette, etc.