Most of our clients will upload their video to a site like YouTube or Vimeo and then embed from there. These are the settings we recommend when exporting your video for Vimeo or YouTube

Video Settings

Codec: H.264
A codec is the format in which your video will be encoded. Different codecs have different features and varying quality. For best results, we recommend using H.264 (sometimes referred to as MP4).

Frame rate: 24, 25, or 30 FPS
If you know at which frame rate you shot, it is best to encode at that same frame rate. However, if it exceeds 30 FPS (frames per second), you should encode your video at half that frame rate. For example, if you shot 60 FPS, you should encode at 30 FPS. If you're uncertain what frame rate you shot at, set it to either "Current" or 30 FPS. If there is an option forkeyframes, use the same value you used for frame rate.

Data rate: 2000 kbps (SD), 5000 kbps (HD)
This setting controls both the visual quality of the video and its file size. In most video editors, this is measured of kilobits per second (kbps). Use 2000 kbps for standard definition or 5000 kbps for high definition video.

Resolution: 640x480 (SD), 1280x720 (HD)

Choose 640×480 for 4:3 SD video, 640×360 for 16:9 SD video, and 1280×720 or 1920×1080 for HD. If you have the option to control the pixel aspect ratio (not the display aspect ratio), make sure it's set to "1:1" or "1.00," sometimes referred to as "square pixels."

Audio Settings

Codec: AAC (Advanced Audio Codec)
For best results, we recommend using AAC for the audio codec.

Data rate: 320 kbps
320 kbps is the highest quality audio data rate we currently support.

Sample rate: 44.1 kHz
44.1 kHz is the highest audio sample rate we currently support.
Google's Matt Cutts explains the process in a video. Google's Quality Raters classify URLs as good, bad, spam and other classifications.

After an algorithm update, Google's engineers can do a side by side (blind taste test) directed to the Quality Raters and the raters say which side they like better."