VAST is a popular ad format for publishers. This document outlines various enhancements to VAST video that MoPub has employed.

Please be advised that all MoPub Marketplace inventory requires fully secure creatives, as specified by the field. Further details on secure creative here.

What is VAST

VAST (Video Ad Serving Template), is a template for a standard XML-based ad response for in-stream video ad serving. It is a standard developed by the Interactive Advertising Bureau (IAB).

How VAST Works

VAST is a XML template that contains all required assets and tracking pixels for video ad serving. This includes:

  • Video URL to an externally hosted video asset
  • Impression pixel to 3rd party ad server
  • Video tracking pixels for video start, 1st quartile, midpoint, 3rd quartile, and video complete
  • Click tracking pixel + destination URL


  1. MoPub supports VAST 2.0 and 3.0 for Linear Videos per the IAB VAST 3.0 specification
  2. VAST InLine and Wrapper
  3. Interstitial placements only
  4. Supported media MIME types:
    • iOS:
      • video/mp4
      • video/3gpp
      • video/3gpp2
      • video/quicktime
      • video/x-m4v
    • Android:
      • video/mp4
      • video/3gpp
  5. Not supported media MIME types:
    • Flash (flv, swf) is not supported
  6. Video file size limits:
    • Max file size (iOS & Android): Recommended 2MB (recommended maximum file size is 10MB). Videos that are closer to 2MB can have a better performance.
    • If the request to retrieve the video file exceeds 30 seconds, it will be considered a timeout.
  7. MoPub supports both landscape and vertical video.

Bid Response Best Practices

2.5 Requirements

    • Details: The “adm” (or admarkup field) contains the entire XML markup for either VAST 2.0 InLine, VAST 2.0 Wrapper, VAST 3.0 InLine, or VAST 3.0 Wrapper
    • URL-encoded VAST tags are NOT supported. Per the VAST spec, all URLs must be wrapped in <[CDATA[ ]]> and must not be encoded
  2. (optional)
    • The VAST version of the bid response ad markup.

2.3 Requirements

IMPORTANT: There are three (3) required and (1) optional video-specific fields for RTB 2.3 VAST video bid responses (See fields below)

    • Details: This field indicates the type of video being served
    • Valid Value(s): “VAST 2.0” or “VAST 3.0”
    • Example: "crtype": "VAST 3.0"
    • Details: The value in the ‘duration’ field must match the actual length of the video being served
    • Valid Value(s): 5-120 (Must adhere to min/max duration range passed in the bid request)
    • Example: "duration": 30
    • Details: The “adm” (or admarkup field) contains the entire XML markup for either VAST 2.0 InLine, VAST 2.0 Wrapper, VAST 3.0 InLine, or VAST 3.0 Wrapper
    • URL-encoded VAST tags are NOT supported. Per the VAST spec, all URLs must be wrapped in <[CDATA[ ]]> and must not be encoded
  4. (optional)
    • Details: This integer array field indicates the type of creative being served. Per section 5.3 of the IAB Open RTB 2.3 specification, the value ‘6’ indicates the creative is of type “In-Banner Video (Auto-Play)”. This field is NOT required for serving VAST video but is required for serving in-banner video.
    • Valid value(s): 6 (This field must contain the integer 6)
    • Example: "attr": [6]

Video Creative and Companion Banner Best Practices

  • Media File Dimensions: Bid responses with VAST tags should include a variety of media file options for proper display regardless of device and orientation. Our video player will pick the best video option from the VAST tag.

  • Aspect Ratio Guidelines: All video aspect ratio sizes are supported, including 16:9, 4:3, 3:2, 16:10 and 1:1 (including the inverse ratios for vertical video, e.g. 9:16). Per the IAB Digital Video Ad Format Guidelines, 16:9 is the recommended aspect ratio.
  • Media File Encoding: iOS and Android devices have varying support for video and audio mime types. Below is our recommended media file encoding so your video has the greatest chances of success across all devices.
Media Encoding Description
H.264 Baseline Profile Level 3.0 Also known as MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is the most popular format for the recording, compression, and distribution of video content.
AAC LC Advanced Audio Coding (AAC) Low-Complexity (LC) is an MPEG-2/MPEG-4 profile that is supported by all mobile devices
HE-AACv1 AAC High-Efficiency v1 is an MPEG-4 profile that is supported by all mobile devices
  • Industry Icon: Bid responses with VAST 3.0 tags may incorporate an industry icon, such as the AdChoices icon, for supported inventory.
    • We will only support the use of a single industry icon in a given response. We will choose the icon closest to the media file that’s being played. If an industry icon exists in wrapper tags, it will be preceded by the icon in the main VAST tag, if it exists.
    • We will ignore x/y coordinates for the icon and will always place it in the top left corner to ensure a consistent user experience.
    • DSPs should submit icons that are approximately 35×35 in size for the industry icon. Wider icons are OK, but taller icons will lead to a poor user experience.
  • Duration: Videos with a duration > 30 seconds are not allowed. Note: publishers can now request video up to 120 seconds, however, DSPs should continue to refrain from submitting videos with a duration > 30 seconds.
  • Quality: QA video to ensure it is high quality. ie, it is not blurry and adheres to MoPub’s creative content policies
  • Companion banner: Companion banners appear after the video completes.
    • MoPub supports companion banners for iOS and Android implemented via <StaticResource>, <HTMLResource>, and <IFrameResource>. These will be supported for VAST 2.0 and VAST 3.0 tags.
      • Note: Companion type support is outlined below in ‘Companion Targeting’.
    • .png, .bmp, .jpeg, and .gif files are supported in <StaticResource>
    • We will prioritize processing companion banners in the following order once we’ve picked the best size: Static, HTML, iframe.
    • MoPub does not support the <CompanionClickThrough> element for HTML and Iframe companion banners. Per IAB’s VAST spec this element is only applicable for Static companion banners. Click through tracking for or should happen from the HTML snippets within.
  • Companion banner size: Minimum size of 300×250. There is no maximum size; however, images larger than the device screen will be scaled down proportionately to fit the screen, and centered. Note that if your static companion banner image does not have the same general aspect ratio as the screen; the scaled-down image will be wrapped by a black border that extends to the screen’s edge. HTML and iframe companion banners should not exceed the screen size. If submitting multiple companion banners, our SDK will pick the one that fits the device and orientation best.
  • Video birate: There are no limitations on video bitrate, however, best practices do apply:
    • Video bitrate combined with video duration should net out to a recommended file size of 2MB (recommended maximum 10MB). Videos that are closer to 2MB can have a better performance.
    • Ideally below 512kbps or lower
  • Video: H.264 Baseline Profile Level 3.0, constant bitrate
  • Audio: AAC, Low-complexity profile, constant bitrate, 2 channels, 44.1K Hz sampling rate

Additional VAST 3.0 Behaviors

Below are additional behaviors of VAST 3.0 specifically related to MoPub’s implementation:

  • We do not support Ad Pods. Our player will only look for ads videos with sequence set to 1, 0, or empty.
  • Progress event ( VAST 3.0 allows the ad creator to supply a progress tracker parameter to track when a video reaches a specific percent or time, in addition to the standard quartile trackers.
  • Wrapper chain management. ( We do not support any of the functionality in wrapper chain management.
  • Error Reporting (2.4.2) We support the following errors to be reported to a DSP. We will look into adding others, if there is demand for them.
    • 100 – XML parsing error
    • 301 – timeout of Wrappers
    • 303 – no ad error response
    • 400 – any error that occurs as a result of trying to play/display the video
    • 600 – any companion ad error
    • 900 – any other error
  • Macro support (2.4.4) VAST 3.0 supports placing a number of macros at the end of URLs for additional tracking. We support all of the macros outlined in the spec:
    • [ASSETURI]

CloudFront & China

If you are using CloudFront and targeting mainland China, it’s possible that your CDN hosted content may not display. This can be due to a variety of factors (such as latency or inability to download content). Amazon CloudFront’s content delivery article states the following:

“Amazon CloudFront uses a global network of edge locations, located near your end users in the United States, Europe, Asia, South America and Australia. Amazon CloudFront edge locations are currently not available inside of China.”

Supported VAST Extensions

MoPub VAST Extensions

  • Custom call to action: DSPs can replace the standard “Learn More” call to action with a custom one, up to 15 characters in length. To do so, DSPs should add the node to their VAST XML ( This can be added to a Wrapper or standard tag. This extension is supported in both Wrapper and InLine elements.
 <VAST version="3.0">
        <!-- Other VAST XML Elements-->
          <Extension type="MoPub">
            <MoPubCtaText>Install Now</MoPubCtaText>

Best Practices for Optimal Performance

  • Video File Size: We recommend having a 2MB file size (recommended maximum file size is 10MB). Videos that are closer to 2MB can have a better performance compared to those that are of larger file size. Keep in mind that data connection speeds and latencies vary throughout the world.
  • Media File Delivery: MoPub supports download delivery and not streaming. We also do not support video files such as Flash (flv, swf) or any other streaming file types. If you plan on using a VAST Wrapper, we recommend the following tips for optimal performance.
  • VAST wrapper: Use no more than 5 wrappers max. The more wrappers you have, the longer it can take to download the appropriate assets and show the video. Verify that your wrapper links appropriately to your XML source. If it does not, then we may not be able to load the video.
  • Media File Encoding: Make sure your video is encoded for H.264 Baseline Profile Level 3.0 for the most compatibility.

Commons Causes for Low or 0% Clear Rate

DSPs may find that they win auctions, but do not end up successfully clearing (showing) an impression for certain creatives. Below is a list of reasons for why this may happen for VAST. Note: This is not an all-encompassing list. We recommend always testing your creative.

  • Blank XML - Be sure that you are not using a wrapper which points to blank XML.
  • XML errors (i.e. - not properly following the VAST spec).
  • Video file size exceedingly large- We recommend 2MB.
  • Geos with slower internet connection- You may want to consider targeting devices on Wifi only for some countries.
  • Publisher integration - If you notice a high volume of your auctions are being won but not cleared by a specific Publishing App, that could be the driving force behind a low clear rate.
  • Improper encoding - any field not properly encoded can result in the impression not clearing. For example, are you using a macro for the Publisher name? Be sure to encode the name to accomodate for any spaces.
  • Media File Encoding Make sure your video is encoded for H.264 Baseline Profile Level 3.0 for the most compatibility.

Frequently Asked Questions

General and Inventory Avails

  1. How do I know if the inventory supports VAST video?
    • The inventory which supports VAST will pass the object
  2. Which ad sizes support VAST?
    • Interstitial placements only
  3. Is VAST 3.0 backwards compatible to support VAST 2.0 tags?
    • Yes.
  4. How do I know if the inventory supports 15 sec or 30 sec video?
    • Marketplace Partners:
      • The bid request will pass the specific durations that are supported per app:
      • To view how VAST inventory duration is indicated in the bid requests, please review the MoPub OpenRTB Spec.
      • If the video is 17.6 seconds, round to the closest integer. For example if the video is 17.6 seconds, serve the duration as 18.
  5. How can I find the inventory that supports VAST in my MoPub Analytics account?
    • Login to your MoPub Analytics account and select the dimension “Video Enabled: Yes” to see what inventory which supports VAST.
  6. How does VAST differ from HTML5?
    • VAST Video follows the IAB VAST Spec. As part of the RTB Response, the DSP provides a VAST document to us. MoPub then uses a custom Javascript-based video player that takes the VAST XML as an input and parses out these assets and is responsible for video playback tracking pixels
    • HTML5 Video on the other hand doesn’t have to follow any specific pre-defined spec. In this case the video URL, impression trackers, click trackers etc. are present in an HTML5 payload which the SDK Webview can then interpret – similar to any regular HTML5 ad i.e. display ads. Since VAST is a standard spec which has gone through rigorous testing on MoPub, we recommend to use VAST spec over HTML5.
  7. Do you support VAST with VPAID?
    • No, we recommend using MRAID for interactivity with mobile video ads.
    • Note that all VAST capable inventory is compliant with MRAID 1.0.
  8. When do you charge for a video view? On completion or on start of the video?
    • MoPub charges based on rendered/cleared impressions. The rendered impression tracker is fired when the video becomes visible to the user. The VAST ‘start’ event tracker fires immediately as well for all SDK versions.
  9. What is the lower limit to the fps / quality of video you will serve?
    • Lowest recommended is 24fps
  10. Does MoPub support pre-caching?
    • Yes – for all SDKs
  11. Will we provide quartile tracking for reporting?
    • Not through MoPub reporting, it is up to the DSP / advertiser to incorporate 3rd party quartile tracking into the VAST template and MoPub will be responsible for making sure these pixels are called at the right time during video playback.
  12. What type of engagement metrics can we expect to see with VAST video?
    • MoPub’s reporting will not change as part of Video. Thus we continue to provide metrics for impressions (when the player becomes viewable) and clicks. We do not provide metrics for quartile tracking and completion of video.
    • DSPs and Advertisers will be able to see their own metrics from the Video-specific tracking pixels that are part of the VAST template.
  13. What are the eCPM for video ad units?
    • This will vary based on application type (game etc.), country (CPMs will higher for US vs. India for example) and size of the publisher. However, on average, you can expect video ad eCPMs to be at least around 1.5-2x of Interstitial Ad Units.
  14. What formats and types of video does MoPub support (inline/banner/click to expand etc)?
    • Linear Video only.
    • Auto-play video only.
    • Pre-roll video is NOT supported
    • We do not support inline video, non-linear ads, overlay ads, or simultaneous playback of video with companion banners.
    • Only interstitial ad units for phones and tablets. No video support for banner ad units or medium rectangle ad units.
    • **NOTE: **As of June 2019, VAST videos will automatically render in the same orientation as a user’s mobile device (i.e. portrait or landscape). The MoPubForceOrientation VAST extension has been deprecated. DSPs can safely remove this extention from their VAST ad markup. Note - Android SDKs up to v5.7.1 will continue to respect MoPubForceOrientation Portrait and Landscape flags. Our video player will always pick the best video option from the VAST tag.
  15. Do you support companion banners?
    • Yes! MoPub supports <StaticResource>, <IFrameResource> and <HTMLResource>. For <StaticResource>, the companion must be 300x250 or larger. For 16x9 videos, we recommend a 16x9 end card like 640x360 but will also accept and render 480x320 for phones. For iPad specifically, if the video is 4:3, we recommend 4:3 end card as well, for example 1024x768.
  16. Do we need to certify vendors, similar to MRAID, or do we allow any/all video creatives?
    • If using VAST 2.0 or VAST 3.0, MoPub does not need nor require certification.

Video & Companion Banner Behavior

  1. Are there any differences to mobile video as compared to desktop video?
    • The VAST 2.0 and VAST 3.0 template is the same for desktop & mobile.
    • Unlike desktop, VAST Video ads in mobile are typically standalone ads and are not played as a pre-roll or post-roll in an existing video.
    • Desktop video ads are played in the browser while you are viewing a video. On mobile, we only play video ads within an app – mobile web is not supported.
  2. What video durations are supported and how do they differ?
    • Videos between **16-30s **are referred to as “skippable videos”. Our platform automatically inserts MRAID controls to allow the user to skip or engage (click) with the video after **5s **of video play. A countdown timer is automatically inserted for the first 5s of the video prior to becoming “skippable”.
    • Videos between **1-15s **are referred to as “non-skippable videos”. Users are NOT able to skip or engage (click) with the video until the video fully completes. Our platform automatically inserts a countdown timer for these types of videos.
    • Some inventory now allows videos with duration between 31-120sec.
  3. Will the user be able to engage with the “Learn More” button before the video-ad has completed playback?
    • For skippable video ads (> 15s), the user will be able to engage with the video ad by clicking the “Learn More” button after 5s of video-play has elapsed.
    • For non-skippable video ads (<= 15s), the user will **not **be able to engage with the video ad until the video has completed playing.
  4. If I serve a 15s video (non-skippable) but declare it incorrectly as a 16s video (skippable) in our bid response, what is the expected behavior?
    • MoPub will use the ‘true’ length of the video (15s) to determine whether this particular video ad will treated as a skippable/non-skippable ad.
    • So, in this instance; MoPub will disregard the 16s (skippable) declaration and display this video as a 15s (non-skippable) video ad to the end-user.
    • **IMPORTANT **– declaring your video ad’s length improperly and/or incorrectly in the bid response is considered a policy violation for not respecting the publisher’s video-ad duration requirements.
  5. Where can the user click within the video ad to engage with it?
    • Assuming the video ad is clickable, the user can click anywhere on the video body to engage with the video ad. This includes the “Learn More” button and the companion banner that appears after the video ad completes (if provided by the video tag).
  6. If we improperly serve a video ad longer than the publisher’s max allowable duration (maxduration), what is the expected behavior?
    • Your video will **not **be cut off prematurely if it is longer than the publisher’s max video duration. It will play to completion.
    • **IMPORTANT **– Please note that it is considered a policy violation for not respecting the publisher’s video-ad min/max duration requirements.
  7. Do videos close automatically when finished?
    • No. **If **an appropriate companion banner is provided in the VAST tag, we will display this comp banner once the video is finished playing.
    • Even if a companion banner is not available, we will always provide the user with an opportunity to engage further once the video is finished playing with an on-screen “Learn More” button.
  8. Is it possible to auto-close/dismiss companion banners?
    • No, this is not possible.
  9. If the publisher has locked their app’s orientation to portrait, how will the video ad render?
    • All videos will appear in the orientation of the device.
  10. Do videos autoplay with sound on?
    • Yes, videos autoplay with sound on by default. MoPub will adhere to the hardware settings (i.e., if volume is off on the phone there will be no sound).
  11. What does the video ad space look like when I don’t have a companion banner?
    • End Card


  • Examples of VAST XML Responses can be found here.
    1. Is there a maximum allowed bitrate for video media files?
    • There are no limitations on video bitrate, however, best practices here are: 1) **Video bitrate combined with video duration should net out to a recommended file size of 2MB (recommended max 10MB). Videos that are closer to 2MB can have a better performance. **2) Ideally below 512kbps or lower.
      1. Would there ever be a case where the width and height from the banner are different from the width and height of the video? If yes, could you give the cases where that happens?
    • Yes – Most interstitial requests come in as Portrait in the impression object. However, the video object may be Landscape based on operating system and device size (regardless of ad unit size in bid request).
      1. Would there ever be cases where imp.banner object is empty or not present? (i.e. Is there such a thing as video-only requests, where the imp.banner object is not present and object IS populated)?
    • Yes – We call these “Video Only Line items.” These are cases when the publisher only wants a video to fill the ad space and does not want a static interstitial banner. We recently offered this functionality to Publishers, so volume on video-only requests is lower but in theory should be higher value. In early days, we’ve seen that more “premium” publishers prefer video-only over the chance of getting video or static ads.
    • We keep track of which impressions are “just banner” vs. “just video” vs. “both” in MoPub Analytics under the “Video or Banner” dimension.

Vertical video

  • Read width and height values from the bid request. Choose values where the w < h
  • Include a portrait companion banner


  • June 19, 2019 – MoPubForceOrientation VAST extension deprecated
  • May 3, 2017 – Added CloudFront & China information
  • Apr 21, 2017 – Clarified when VAST start tracker fires
  • Sep 9, 2015 – Added best practices for RTB 2.3
  • July 1, 2015 – Support for VAST 3.0 released and documentation updated accordingly
  • Jan 29, 2015 – Third-party macros issue has been fixed
  • Jan 22, 2015 – Non StaticResource companion banner issue has been fixed.
  • Jan 22, 2015 – Serving VASTAdTagURI wrapper tags via SSL (https) has been fixed.
  • Oct 21, 2016 – Added documentation for opt-in rewarded ad.

Last updated September 20, 2021

© 2022