How to compress video for EngageMedia

by Anna Helme April 20, 2015
This guide assumes that you have basic video production skills, and have managed to produce, shoot and edit your film already, and are now at the stage where you're looking to distribute your finished product.

For another version of this guide, visit v4c.org

Introduction & Recommended Settings.

 

“I’ve made my video, how do I get it ready for the web?”

This is a simple guide to compressing video for upload to the internet. Compressing just means to “make it smaller” so the file isn’t so big, and it doesn’t take such a long time to upload/download. As technology improves, internet connections are getting better and faster, but at the same time video files are getting higher in resolution and thus bigger, so compression is still a vital step in distributing your video on the internet.

Understanding this guide.

Some of you will be quite familiar with video and/or internet technology, so many of the principles we are talking about will make sense. Those who have been filmmakers or video editors will understand a bit about video and audio files, and how they work.

But some of you will be new to all of this, if so then don’t worry, we have a Glossary of Terms that will explain the basic concepts covered in this guide as well as step-by-step instructions to compress video using Handbrake.

Recommended Settings for HD Video.

For those of you who just need the settings, here are our basic recommendations what to use when compressing HD video (where the original is 1920 x 1080 pixels) for upload to the web in 2014:

  • Format MP4 (file extension .mp4)

  • Video

    • Codec: H264 (High profile)

    • Frame Rate: 24, 25 or 30 (Constant)

    • Frame Size / Resolution: 1280 x 720 (720p)

    • Fields: Progressive

    • Bitrate: 5,000 – 10,000 kbit/s

  • Audio

    • Codec: AAC-LC

    • Bitrate: 320 kbit/s

    • Sample Rate: 44.100 OR 48,000 kHz (retain original sample rate)


File-size Guide.

You can choose a bitrate within the range we have suggested (5,000 – 10,000 kbit/s). The higher the bitrate the better quality it will be. If you set the bitrate to 10,000 as opposed to 5,000, the file will be twice as big and take twice as long to upload.

For example, if you start with a 10 minute video, and choose 5000 kbit/s video bitrate and the settings above, the file-size of your compressed video will be about 400 MB. If you choose 10,000 kbit/s your file-size will be about 775 MB. You can use this guide to estimate how big your video will be - if your video is twice as long i.e. 20 minutes, it will be double this size i.e. about 1.5GB.

Keep in mind that most video websites automatically make even smaller versions of your video file to play back in the web browser. Some sites give you the option of letting some people download the original file you uploaded too.

How do I compress my video using these settings?

To skip to a simple tutorial on how to compress video into this format, try our guide for using Handbrake on Linux, Mac and Windows. However it can be really helpful to know a bit more about what you’re actually doing, and why. So read on for a bit more explanation of what all those numbers and letters actually mean.

Common Questions.

Why compress video?

As we discussed above, video files are usually too big to upload/download without compressing them, or making them smaller, first. But there are other reasons to compress (or “encode”) your video. You need to create a format that the system you are uploading it to will understand, so it needs to be a commonly acceptable type of file. The settings above will play back on all relatively new computers, if you use software such as VLC to play it back. It will also play back in most web browsers natively - check this list for details. And video-sharing sites such as EngageMedia, Vimeo and Youtube all reccommend using settings like these for upload to their systems.

Note: It's a good idea to keep an original higher quality copy of your video as a master version too e.g. in Apple Pro Res or your usual native editing format. This means you can re-compress the video in the future, into any other format that you may need.

What happens when you compress a video?

Well, the first thing is, it becomes smaller. But, the more compressed the video is, the less quality is able to be retained, and the more degraded the image usually becomes. Compression is a compromise between quality and file size. However, if you use an advanced codec such as H264, and a reasonably high bitrate, the quality can still be very good, and you won’t get many compression artefacts.

What are formats, and which are the most common?

The most common video file format these days is MPEG4 (which will have the file extension “.mp4”). This works on most platforms. Other common formats include WebM, Quicktime (.mov), AVI (.avi) and Matroska (.mkv).

What is a codec, and what are the best ones to use?

“Codec” stands for “compression/decompression”. It is the piece of software, an algorithm, that is used to make your video file smaller. It is used by the encoding program such as Handbrake to make it smaller, and then by the video player such as VLC to de-compress it again, ready for playback. H264 is the best currently available codec to use, creating the best quality files with the smallest file size. Learn more about codecs, container formats and more in the Glossary of Terms.

What if my internet connection is very slow or unreliable, and/or my audience has older, slower computers?

Try these settings for low bandwidth situations, and for end-users whose computers are older and might have trouble playing back a higher-bitrate/higher-resolution video such as the one we reccommend settings for above:

  • Format MP4 (file extension .mp4)

  • Video

    • Codec: H264 (Baseline profile)

    • Frame Rate: 24, 25 or 30 (Constant)

    • Frame Size / Resolution: 1024 x 576

    • Fields: Progressive

    • Bitrate: 2,000 kbit/s

  • Audio

    • Codec: AAC-LC

    • Bitrate: 128 kbit/s

    • Sample Rate: 44.100 OR 48,000 kHz (retain original sample rate)

FILE-SIZE GUIDE: A 10 minute video will be about 160megabytes using these settings.

What if I have Standard Definition (SD) video instead of HD?

Try these settings for SD NTSC video:

  • Format MP4 (file extension .mp4)

  • Video

    • Codec: H264

    • Frame Rate: 24, 25 or 30 (Constant)

    • Frame Size / Resolution: 720 x 547(square pixels)

    • Fields: Progressive

    • Bitrate: 2,000 kbit/s

  • Audio

    • Codec: AAC-LC

    • Bitrate: 128 kbit/s

    • Sample Rate: 48,000 kHz (retain original sample rate)

Try these settings for SD PAL video:

  • Format MP4 (file extension .mp4)

  • Video

    • Codec: H264

    • Frame Rate: 24, 25 or 30 (Constant)

    • Frame Size / Resolution: 768 x 576(square pixels)

    • Fields: Progressive

    • Bitrate: 2,000 kbit/s

  • Audio

    • Codec: AAC-LC

    • Bitrate: 128 kbit/s

    • Sample Rate: 48,000 kHz (retain original sample rate)

What about mobile phones?

This guide doesn't cover compressing video for mobile phones, as its a little more complicated. Unfortunately there's not just one setting we can reccommend for all devices. But if you follow our guide for compressing video with Handbrake, and then take a look at this page on the Handbrake wiki, you can find presets you can easily select within Handbrake for different kinds of mobile devices - just keep in mind you may have to make several different kinds of file to suit different devices.

For a tutorial on how to compress H264 using handbrake, further information and a glossary of terms, read on...