If the video ad is an FLV or SWF file, then the ad may contain embedded information, including the actual duration of the media. (This embedded information in the FLV or SWF files is known as metadata in Flash video.)
If this duration metadata is auto-detected by the player, then that value will be used for calculating midpoint tracking times. However, if no metadata is detected, the information in the XML element called duration is used for those calculations.
The XML element named duration is a numeric value entered by the trafficker, representing the length of the video ad in seconds. This value also controls the counter you see when a video ad is displayed and also acts as the value for midpoint tracking capabilities. For expanding banner ads, this value controls how long the banner is displayed in its expanded size before collapsing to its smaller size.