Compression technique is its own thing. It takes some experimenting. Below, there is a good thread on it. Uploading to youtube, vimeo, etc. will never have the same high quality as the original. Mostly that has to do with bit rate. The internet forces us to make a tradeoff between bitrate and raster. When the video is uploaded to youtube, vimeo, etc. it is flipped to many formats so the video can be screened on multiple browsers, HTML 4, iPads, iPhones, Android, and so on. You want make sure you upload the format required by youtube, vimeo, etc. so when they flip it into their special sauce, it gets the best quality possible — but that quality will have some loss here and there.
Here is a more detailed explanation. MTS video is not like film, a series of individual images. It is already very compressed. The first frame, called the Intraframe, the I-frame, contains all the video information, rgb and pixels. The next frame contains what has changed, and the frame after that contains what has changed again. And so on, for about 15 frames (1/2 second). Then a new I-frame. When you make an edit that is not on an I-frame, the computer renders an I-frame anyway. (Not so long ago, the processing of that render was really difficult, but contemporary computers can handle it.) In the compression software, the I-frames are called key frames.
Long story short, you can also improve the quality of an image by lowering the number of key frames. You can also force key frames on scene breaks, and I haven’t needed to do that since I switched to CS6, but it was a normal procedure in FCP 7.
Those strategies will increase the file size and bit rate, but will add some quality.