General information
The best quality can be achieved by using the H264 or the WMV9 codec. Use a resolution of 1280x720 and a framerate of 30 fps. The bitrate for encoding should be between 5 and 17.5 Mbps depending on the complexity of the video. For best audio quality use AAC/MP3/WMA with a sampling frequency of 44 KHz and a bitrate of 256-320 Kbps.
Note: Neither higher FPS nor an extreme high resolution gives you better quality. Whenever the encoder on the server needs to do much conversion you will have an equal big quality loss.
Exporting from TrackMania
For exporting from TM and for storing videos, you should always use the following codecs: Huffyuv/Lagarith (Huffyuv/Lagarith are true lossless codecs), Indeo 5.2 (100% quality) or x264 (lossless profile). Note, that the files get pretty big with these :) Try to keep the same base configuration through the whole creation process (1280x720@30FPS) so you don't lose quality or the aspect ratio.
Optimal settings
» H264
Make use of H264 profiles and levels, they exist for a good reason. For 720p use the "High" profile and the "3.1" level if you can choose them. They set paramters and limits which are best suited for 720p video at 30fps. For "normal" videos you can use from 5 to 10 Mbps. If there are a lot of movements/changes/effects, something between 10 an 17.5 Mbps may be better. The video should be clean and smooth before the upload (it is possible that your processor won't show the video lag-free, but everything from a Core2Duo/Athlon X2 should run without problems).
If you do not have Adobe Premiere or other software with an included H264 Codec, use the
opensource x264vfw codec.
In Premiere and Vegas you should always choose 30 Frames-per-second or "FPS", "progressive" for Field Scan and "1" or "squared" for Pixel Aspect Ratio. You also want to make a "twopass" variable bitrate encoding (VBR) to ensure high quality, and set the "Average" or "Target" bitrate to what is suited best for you. Set the maximum bitrate 20% higher than the target bitrate. Never set keyframes manually! H264 is intelligent enough to decide on it's own when to use them.
For x264 VFW go to the third tab and set the number of threads to the number of CPU cores your computer has. To encode in a twopass encoding you have to export the video the first time with the option "Multipass - 1st pass" set the bitrate to the desired bitrate. When the encoding is finsihed, you will see 2 files. A .mp4 (can be different, depending on your software) and a .stats file. Do not tamper with them, they contain important information for the encoder! Just export your video again to the same file but change the x264 mode to "Multipass - Nth pass". When the second encoding is finsihed, check your video file. All other settings for the VFW codec are already good, there is no need to play with them. If you can set keyframes in your video-editing software, don't set them ;)
» WMV
For WMV in Adobe and Vegas use always the Windows Media 9.x codecs, both audio and video. There are almost the same settings like for H264, so read the text above :) If you are not sure about a setting, let it at it's default value. Especially the keyframe setting which is 1 keyframe every 5 seconds and the buffer size which is 20 seconds. Since encoding with a WMV VFW interface is a pain in the **s it won't be covered here. But many applications support it.
» FLV
Flash video is already deprecated and shouldn't be used anymore. It is also very inefficient :)
» DIVX/XVID
The DivX codec family can be used too, but they are specialized for movie content. Thus there will always be problems with videogame content at high resolutions. If you have a codec version and setting that works good for you, consider yourself lucky and share that information with other users.