Video compression is mysterious, kind of like your last girlfriend.
Cryptic abbreviations like H.264, MPEG-2 and AVC-HD beg the question, what does it mean?
Before I lose almost all potential readers of this post by introducing one of the most boring and technical subjects ever known to man, I promise to make it relevant. You can choose your level of interest out of these three categories.
- Video Blogger
- Film Enthusiast
- Pro Videographer
Choose which category best represents your interest in video and read only that selection if you wish. Personally, I find the intricacies of video compression to be thrilling.
Video Blogger
We all know that video blogs (vlogs) set a pretty low standard in video quality, but that doesn’t mean you have to ignore some basic video compression guidelines. Understanding a few basic fundamentals can help speed up your vlogging workflow and produce a better looking product.
Here are a few.
Compression Saves disk-Space:
While you might be excited about your new “HD” webcam and tempted to push the quality to the max, resist the urge and save disk space. If you really want to save all of your HD footage of you talking to the camera, consider using a program like MPEG Streamclip to recompress the footage after you’re done, to archive it.
Open the footage with Streamclip, choose “Export mpeg-4” and leave the quality at 50%. This should create a smaller file size for your archives.
Don’t Recompress:
Every time you convert, optimize, or export your video, you are probably recompressing your video footage and the more you recompress, the more your footage loses pixel information and the worse it looks.
For example; if you capture your video in Quicktime, import it into iMovie, export it, and upload it to Vimeo (or Youtube) you are quite possibly using four different compressions, one in each step. Avoid this by changing your settings in your editor (in iMovie Preference>Video>Import as; Full (original size)) or by skipping the editor and uploading straight from the raw file. Which leads to the next fundamental.
Know Your Camera:
Chances are your camera is already recording at a very high level of compression (high compression = lower image quality) . If you have a nice camera that gives huge file sizes, exporting your videos to a smaller size (higher compression level) will make your uploading time much shorter.
Film Enthusiast
You qualify as a film enthusiast if you make videos but aren’t employed by a film production organization. Most church media techs fall into this category, myself included. We love making great looking, creative works of art but wouldn’t necessarily call ourselves professionals even if we get paid for it.
There are basically two parts of production where compression is a concern: editing and finishing.
Editing:
Whenever you import/transfer/capture footage from your camera to your editing station, you are recompressing that footage, but choosing WHAT compression to use for editing can be more complicated than it sounds. Should you edit ProRes, 4:2:2, 4:4:4, XDCam, DV or one of the other countless choices? Unfortunately there isn’t a simple answer but I can recommend some guidelines that may help you decide.
Consider Your Product:
Are you producing an epic action/adventure film or a vlog? If it’s something like the latter, consider using a compression setting with a smaller file size (like XDCAM) to edit. If you are producing something complex that will require a lot of post production and effects work, you’ll want to choose a setting that contains as much pixel information as possible. Uncompressed 10 bit may be tempting (even though technically, your footage is still compressed), but unless you have unlimited disk space, I recommend something smaller. I’ve found Apple’s ProRes 422 HQ retains a massive amount of pixel information with a much smaller file size.
Finishing:
After your video is finally put together, all sequences and comps completely done (if there is such a thing), you are ready to decide on a finishing compression, the compression settings for your final product that you will deliver to whoever wanted it in the first place.
Most of the time, your customer will have decided that for you. Cable advertisers, movie theaters, web video hosts and church presentation software all have guidelines for how your finished product should be compressed. In some cases, those guidelines are very specific.
For the web, I recommend checking out Vimeo’s Compression Guidelines. These are fairly generic but are ideal for compressing your video for optimal web streaming. I’ve found these settings are good baseline for other displays including projectors and ProPresenter.
Archiving:
Once your video is for-real finished, you might want to consider recompressing your editing footage. All of that pixel information you were trying to retain when you color-corrected in ProRes 422 HQ is taking up massive amounts of space on your hard drive. It may seem tedious, but recompressing all of that footage to a setting with a much lower data rate will save you TONS of storage space in the long run.
Pro Videographer
Honestly, a lot of pro videographers don’t really know or care about the stuff I’m going to talk about here. Good artists aren’t necessarily concerned with the tech specs of their video. They just want it to look amazing.
Compression, or technically, “lossy compression” is the act of removing unnecessary bits of data from your file. It’s used in almost every digital format from text to still graphics to video. Video files are often ridiculously large.
Each pixel contains at least 24 and usually 32 bits. An SD frame contains 345,600 pixels. Each second of video contains 30 frames.
You get the idea. Compression exists to cut down on data rates.
Here are ways compression codecs can cut down on data.
Chroma Subsampling:
Taking into account that the human eye is MUCH more sensitive to brightness than it is to color, all video codecs take advantage of this and eliminate some of the color data in each pixel. This is the reason you’ll hear some pixel-purists say “there’s no such thing as uncompressed video”. Every single video codec does some amount of subsampling, the most famous of which is probably the 4:2:2 subsample. Here a 12 bit RGB value is cut down to 8 bits with almost no noticeable difference.
Colorists and visual effects guys love pixel information and complain about subsampling. The fact is that no camera (that I know of) records all the pixel information, so subsampling is just a fact of life. You can online your clips at Uncompressed 4:4:4 if it makes you happy.
VBR Encoding:
Variable bit rates reduce the amount of data stored by adjusting the bit rate. There are dozens of methods for encoding video at a variable bit rate. Each codec uses a different selection of them, but they almost always use two technologies.
- Target bit rate (either average or ranged): The target bit rate tells the compressor what data rate to allow for the video file.
- Multi-pass encoding: The compressor runs the video file once and stores the info in a log file. Then it runs the file again, referencing the log file for information about data it can subsample, compress, or remove.
Some VBR methods use macroblocks. They group the pixels in a certain area and record only the changes in that group.
VBR methods vary so much between codecs, it could be another whole article. The best way I’ve found to decide which settings to use is experimentation, which takes a long time, but is well worth it if you find compression setting that you love.
Interframe Compression (or Key Framing):
Rather than looking at each individual frame and compressing the data in that frame, interframe compression looks at the difference between one frame and the others near it. This way, instead of recording the entirety of each frame, some frames in a sequence only have to contain the difference or any changes between a frame and the adjacent one.
The I P and B frame method uses Interframe compression, choosing too frames in a sequence and analyzing the frames in between to record only differences in pixel data.
This kind of compression goes by many different names and varies a lot per codec and is used mostly with finishing compressions, so most video pros won’t have to worry about these.
However, interframe compression is important to think about for web streaming. If you have to limit your data rate to 2000 kb/s or lower, your finishing compression will have to use one of these methods, and even the best methods create some amount of stuttering.
Conclusion:
Well there it is. More than you ever wanted to know about video compression. As I always say, the only rule that really matters is this one: If it looks good, it is good.
Most compression software ships with great presets for all your compression needs. But understanding how compression works, and more importantly that recompression is your enemy, will help you on your way to producing fantastic videos.
Kyle Reed says
For the non video expert like myself these post are gold.
thanks for sharing
BrianNotess says
Gold eh?
Not sure I’d go that far. I’d say maybe bronze or possibly copper.
Ken Summerall says
Spot on. I would only make one suggestion. Under “Film Enthusiast” and “Archiving” I would suggest that you not re-compress your original footage. I would recommend the following workflow.
1. If you are shooting on tape, or SD card, P2, SxS, or Compact Flash – save your originals! For flash based memory this means copying everything on the card, as is, to your hard drive and then making the conversion to ProRes or your editing format of choice. (BTW, ProRes 422 HQ is overkill for about 98% of us)
2. Convert and edit.
3. Finish into your deliverable format or formats.
4. Trash your converted footage but save the original from the cards, or just save your tapes.
If you have edited in Final Cut or another professional editing program you will be able to go back and recapture or re-convert the footage that you need to make changes to your edit and still be at full quality. If you re-compress as suggested your will have to re-convert the compressed footage incurring a lose in quality. Using my suggested workflow saves you time and disk space!
Just my .02 worth.
Brian Notess says
Those are definitely great suggestions Ken.
My experience hasn’t been great trying to reconnect footage from original files, especially since we stopped using tape.
In FCP I’ve had good experience doing a “Media Manage” recompression of the footage that I actually used in my final project. No reconnecting or recapturing, just open the project up.
Thanks for the advice though, I definitely agree with your suggestions, I’ve just never been able to pull it off 😉