Video ad file size too big?
Wed, 14 Sep 2016
How to make your video file size “upload ready” while maintaining quality output
By Toni Knowles, GM NZ, VeNA
13th September 2016
There is no excuse for poor quality video files – it’s a disservice to clients and irritates audiences.
As digital video advertising continues to grow, and with more branded video content being produced every day, one of the most common questions we receive is how best to reduce the file size of the original video asset, to meet publisher maximum file size specifications without compromising the quality of the video….by too much.
The original video files can be understandably HUGE. It’s an awesome HD video after all.
However, the digital advertising industry is moving to lighter file sizes to allow for fast loading and streaming, resulting in a better consumer experience.
Additionally across the ad tech ecosystem, where a significant and growing proportion of video is deployed programmatically, fast loading video is everyone’s friend. Time-outs cause not only tracking and reporting issues but can mean the impression is lost altogether (never delivered for the campaign / never monetised for the publisher).
Currently, local publisher and agency trading desk maximum video file sizes range from as small as 1.5MB up to around 10MB (YouTube’s maximum is 10MB)
So how do you go about converting a 50MB video asset to comply, while maintaining quality output? The good news is that smaller file sizes can still look good! It’s the combination of bitrate, resolution, the codec used and the frame rate that determines quality output – not simply the file size.
Here are the six video terms to understand when converting files to a smaller size, with the goal of achieving the best results for clients.
A codec – or coder/decoder – is an encoding tool that processes video and stores it in a stream of bytes. Codecs use algorithms to effectively shrink the size of the audio or video file, and then decompress it when needed. There are dozens of different types of codecs, and each uses a different technology in order to encode and shrink your video file for the intended application.
H.264 is commonly regarded as the most efficient and widely used codec to produce the best quality result when compressing videos for distribution across the web.
The recommended audio codec is AAC
Bitrate (also known as data rate) is the amount of data used for each second of video. This is measured in kilobits per second (kbps), and can be constant and variable. Your overall bitrate is a combination of your video stream and audio stream in your file with the majority coming from your video stream. A constant bit rate (CBR) uses the same amount of data every second, while a variable bit rate (VBR) adjusts the amount of data used depending on the complexity of the changes between frames. Generally, a variable bit rate will produce a smaller file, using less data for less complex frames. However, if there is a lot of action going on in the video, a variable bit rate will use more data to account for more movement.
Ideally you’re looking for that sweet spot between a high and low bit rate; too high and you’ll have a larger file without a significant increase in quality, too low and you’ll lose detail and start to see blocky areas in your video. Quality between CBR and VBR can vary, so you can try exporting two versions of your video using either bit rate type and see which one gives you the best quality for your video.
Appropriate bitrates depend on the resolution where the video ad plays. In general, the higher the resolution, the higher the bitrate should be for quality playback.
Using a video bits per pixel (VBPP) calculation, you can calculate the target bit rate (bits per second) for the given screen width and height where the video ad will play. For the H.264 codec, a guide is to use a VBPP within the range of .05 to 0.1; however, a video file with more movement may require a higher VBPP and therefore a higher target bitrate. The following formula can be used to calculate the appropriate bitrate for a particular resolution:
Target bitrate (bits per second) = width x height x frame rate x VBPP
A file will end up being approximately 1.5 MB per 15 seconds at 1000 kbps bitrate, but this may vary depending on ad content.
Container (or file extension)
A container exists solely for the purpose of bundling all of the audio, video, and codec files into one organized package.
Choose MP4 as the container - MP4 is efficient, but more importantly, it’s the most widely recognized file format for videos and the recommended format for uploading video to the web. The MP4 container is almost universally supported: Apple, Microsoft, Flash, and HTML5 all offer support for MP4 (there are some outliers). On top of that MP4 can use the H.264 video codec and the AAC audio codec, compatibility wise they are the best choices for compressing your video.
Other containers include
FLV (flash / Adobe) - The FLV container is only supported by the Flash plugin, which is not supported by the new HTML5 standard and Apple mobile devices.
AVI - The AVI container is targeted at desktop players
MOV (Quicktime) - The complexity of the MOV container can cause devices to stall when playing video
MVW - The WMV container requires specialized plugins and is generally only supported by Microsoft products
Is the relationship between the width and the height of your video dimensions expressed as a ratio. The most common aspect ratio for video is 16:9 (favours the wide screen of modern computer screens and phone screens). However 4:3 (standard screen) is still used occasionally – it will play in the widescreen environment with black padding (borders) on the sides or top and bottom.
When creating content, a 16:9 aspect ratio is preferred. Only use a 4:3 aspect ratio when the source material is 4:3
The frame rate is how many unique consecutive images are displayed per second in the video to give the illusion of movement. Around 24 frames per second, the typical film rate which often gives a "cinematic feel," is often the spec mentioned across our industry
Maintain the frame rate of the original content unless a publisher has a particular limitation. Avoid frame rate conversion.
Is a measure of the number of pixels a video contains both horizontally and vertically. Some common resolutions are 854x480 (16:9 aspect ratio); 640x360 (16:9 aspect ratio); 1280x720 (16:9 aspect ratio), 1920x1080 (16:9 aspect ratio); 640x480 (4:3 aspect ratio); Sometimes these are referred to just by their vertical dimension such as, 480p, 360p, 720p or 1080p.
The larger the resolution, generally the larger the file size.
Video file conversion tools
Video conversion tools can be helpful to convert video files to an “upload ready” state (smaller file size while looking to maintain the best quality output). Here are some we’ve used – once you select the codec (H.264) and the container (MP4), you can look to use the pre-set options for “smaller” file sizes, or if needed, select some additional settings such as reducing the resolution one level down, and as a last resort tweak the bitrate.
Further reading & credits to information sources