Containers, Codecs and Bitrate Explained for Editors
Understand what video containers, codecs and bitrate mean, how they affect quality and file size, and how to choose settings with confidence.
Objective
Explain the difference between a container, a codec and a bitrate, and use that knowledge to pick sensible export and delivery settings.
Before you start
- Familiarity with importing and exporting a video
- Basic idea of resolution and frame rate
Overview
Every video file has a name ending in something like .mp4 or .mov, and every export screen asks about codecs and bitrates. These words sound technical, but each one answers a simple question. What kind of box is the file? How was the picture squeezed? How much data is allowed per second?
When these ideas are fuzzy, people guess. They pick the highest number and end up with a huge file that uploads slowly. Or they pick a tiny number and get blocky, smeared video. Learning the three terms takes ten minutes and saves you from both problems.
Think of shipping a set of items. The container is the box. The codec is how the items were folded to fit inside. The bitrate is how much space you let them take up. The same footage can look good or bad depending on all three.
Step-by-step
-
Think of a container as a box
A container, also called a format or wrapper, is the file type: for example MP4, MOV or MKV. It holds the pieces of your video together. Inside are usually a video stream, one or more audio streams, and sometimes captions and metadata.
The container does not decide how good the picture looks. It decides what can be stored inside and which programs and devices will open it. Two files with different extensions can contain the same video. Changing a container without changing the content is called rewrapping, and it is often quick because nothing needs to be re-encoded.
-
Understand what a codec does
A codec is the method used to compress and decompress the video or audio. The name comes from coder-decoder. Raw video is enormous, so every camera, editor and platform uses a codec to make it smaller.
Common video codecs include H.264 and H.265, also called HEVC. Common audio codecs include AAC. Each has strengths. Some are built for small files and easy playback. Others keep more detail and are easier to edit, but produce big files. The codec determines how efficiently the picture is stored and how hard your computer has to work to play it back.
-
Know the two jobs of codecs: capturing and delivering
Cameras often record with codecs designed to save space on a card. These are efficient but can be demanding to edit smoothly, because your computer must decode complicated frame relationships on the fly.
Delivery codecs are used for the final file that viewers watch. They aim at small size with good-looking results. Editing and delivery have different needs, which is why a file that plays well online may feel clumsy in a timeline. If your footage feels slow when editing, see the guide on fixing laggy video playback.
-
Learn what bitrate means
Bitrate is the amount of data used for each second of video, usually written in Mbps (megabits per second) for video and kbps for audio. A higher bitrate gives the encoder more room to keep detail, so the picture usually looks cleaner, especially in fast motion, water, leaves, confetti and other busy scenes.
But bitrate also controls file size almost directly. Double the bitrate and the file roughly doubles in size. That is why there is a balance. Too low and you see blocks, banding and smearing. Too high and the file is wasteful. The right amount depends on resolution, frame rate, codec and how much detail the footage contains.
-
Understand constant and variable bitrate
Constant bitrate, often abbreviated CBR, uses about the same amount of data every second. Variable bitrate, or VBR, uses more data on complex moments and less on simple ones. For most online video, variable bitrate gives better quality for the same file size, since a still shot of a wall does not need as much as a chase scene.
Some export screens offer a target bitrate and a maximum bitrate with VBR. The target is the average you are aiming for. The maximum limits how high spikes can go. When in doubt, leave the maximum at the editor's default or set it a little above the target.
-
See how resolution and frame rate change the need
More pixels and more frames per second need more data. A 4K video needs a higher bitrate than a 1080p video to look equally clean. A 60 fps video needs more than a 24 or 30 fps video with the same content.
Platforms often publish guidance on this. For instance, YouTube lists recommended upload bitrates for standard dynamic range video of about 8 Mbps for 1080p at 24 to 30 fps, 12 Mbps at 48 to 60 fps, 16 Mbps for 1440p, and 35 to 45 Mbps for 2160p at 24 to 30 fps. Treat published figures as recommendations and check the platform's current page, because they can be updated.
-
Pick a safe default for most uploads
For everyday online video, a widely supported choice is an MP4 container, an H.264 video codec and AAC audio. Nearly every phone, browser, social app and video site accepts it. Match the frame rate and resolution to your project, rather than scaling up.
Before you reach for newer options like H.265, make sure your audience and destination support it. Smaller files are only helpful if the file plays everywhere you need it. When you are unsure, the safe default is the one that rarely causes surprises.
-
Match the file to its purpose
Ask what the file is for. An upload to a video site needs a good-looking, moderate-size file. A file for archiving or handing to another editor needs more quality and fewer compromises, even if it is large. A quick preview for a client needs a small file that sends easily.
It is normal to make several versions from the same project. Name each one clearly, for example with the purpose and resolution in the file name, so you do not send the wrong one.
-
Check the result before you share
After exporting, open the file in a regular media player, not only your editor. Watch the full length at least once, or skim the busiest parts. Look for blocky areas, color banding in skies or gradients, and audio that sounds out of sync.
Check the file size and the properties. Most players and operating systems can show the codec, resolution, frame rate and bitrate. Confirm they match what you intended. If something looks wrong, change one setting at a time and export again.
Examples
A vlogger exports a 1080p upload
The project is 1080p at 30 fps. The vlogger chooses MP4, H.264 and AAC audio, and sets the video bitrate near the platform's published recommendation for that size. The file is a manageable size, uploads quickly and plays cleanly after processing.
A file looks blocky in a fast scene
A skateboarding clip looks smeared on export. The editor notices the bitrate was set very low to save space. They raise it, export again and compare. Motion looks cleaner, and the larger file size is the trade-off they accept.
Sending a draft to a client
A client only needs to review the pacing, not judge fine detail. The editor exports a smaller 720p version with a lower bitrate that is easy to send by email link. The final delivery uses higher settings.
Common mistakes
- Thinking the file extension sets quality. MP4 and MOV are containers. Quality comes mostly from the codec and bitrate used inside them. Two MP4 files can look very different.
- Setting the bitrate as high as possible. Past a point, more data brings little visible gain. It only makes files larger and uploads slower.
- Setting the bitrate too low to save space. Low bitrates cause blocks, banding and blur, especially in busy or dark scenes. Compare against a recommended range before deciding.
- Upscaling low-resolution footage. Exporting 720p footage as 4K does not add detail. It only makes the file bigger. Export at the resolution of your source.
- Using a rare codec for wide sharing. A file that will not open on a viewer's device is worse than a slightly larger one. For wide sharing, use widely supported combinations.
Best practices
- Keep one trusted export preset for each destination so you do not have to rethink settings each time.
- Change one setting at a time when testing, so you know what caused a difference.
- Check a short section with fast motion; it reveals bitrate problems fastest.
- Look at the file properties in your operating system to confirm what you actually exported.
- Read the platform's help page for current upload recommendations before a big project.
Key takeaways
- The container is the box, the codec is the compression method, and bitrate is the data per second.
- Higher bitrate generally means better quality and a bigger file.
- MP4 with H.264 and AAC is a widely supported default for online video.
- Higher resolution and frame rate need more bitrate.
- Always watch the exported file before you share it.