Cool New Marketing Technologies: Caught and Served

The Complexities of Video Encoding

Where to start?  I just got through watching a (boring) webcast that was all about video transcoding and the first 15 minutes were spent explaining the breakdown of terminology for talking about digital video.  It occurred to me that everyone uses different terms to talk about video (codecs, formats, containers, etc) and our readers would probably benefit from a little explanation so the next time they need to “get their video on the web” they know what they’re really asking for.

Streams of video and audio are the most basic component of a digital video file.  There is one stream for video and usually two for audio, each taking up one track (video, audio-left, audio-right).

Codecs are COmpressor/DECompressor applications or programs that enable the encoding or decoding of the raw data streams.   You may have heard of some of these: Windows Media 9, H.264, MPEG-2, MP3, etc.  Each stream has a unique codec applied to it in compression and that same codec MUST exist on the end-user’s computer to decompress the streams for playback.  The good news is that most codecs are standardized and readily available, the bad news is that there are a lot of options.  Check out more info about codecs on Wikipedia.

Within a codec you’ll have a particular Profile that defines the parameters of the compression (size, bitrate, quality, etc).  When you want a higher quality video you’ll need to tweak the profile settings to get better quality.  The efficiency of that tweaking is determined by the codec (ie. better quality for a lower bitrate means that the codec is more efficient).  The basic principle to remember when applying a codec is that you’re removing unnecessary data, significantly reducing the data rate, but also reducing the quality of the video.  Reduce too much and it looks crummy, not enough and it’s too large a file for most users to download.

Containers hold together multiple streams and sync the tracks.  These are sometimes called “wrappers” and exist as QuickTime, AVI, ASF, WMV, 3GPP, etc.  The key here is that you can have different codecs within the same container (mp3 audio and h.264 video for instance).  The container also defines the file type, of which there are too many to explain here.

Formats are a specific combination of codecs with certain profile settings “wrapped” into a specific container – all strung together these define a format.  So, if you think about it, you can have hundreds of QuickTime files and each can be a unique format.  When you’re specifying a type of video you should communicate the format in its entirity, which includes:

  • Codec (audio: mp3 and video: h.264)
  • Profile Information: Size (640×480), bitrate (CBR 700kbps),  etc, etc (parameters are somewhat endless)
  • Container Type (QuickTime MOV)

You can see how this can get complicated very quickly.  Change a few variables and suddenly you have millions (yes, millions) of possible combinations.

Photo of the Cramer Media Lab

Photo of the Cramer Media Lab

Why is this important?  Cramer recognized several years ago that this media onslaught was just over the horizon and created the Media Lab.  Actually, that’s where I started at Cramer 5 years ago as an intern and I still consider it to be one of the most unique parts of our facility.  It is basically an anything-in/anything-out laboratory for transcoding (file to file) and encoding (tape to file).  So, if you have some strange format that you want converted, let us know and we’ll run it by the lab rats, as they like to be called.

Tags: , , , ,

5 Responses to “The Complexities of Video Encoding”

  1. Greg Jones says:

    Steve, where do you see video encoding headed in the future? Can you give any examples of videos/streams over the web that don’t sacrifice video quality? Where do you see HD on the web fitting into this picture?

    • Steve Gogolak says:

      It’s funny how our perception of HD is that is isn’t compressed. It is, however. Even the cable HD you watch at home from Comcast or Verizon Fios is compressed. Pretty much nothing that you have ever seen is actually uncompressed HD video. It is just FAR too high a data rate to support actual viewing.

      The HD on the web that YouTube is delivering now is of excellent quality, but it is still a fairly high bandwidth – over a megabit. Comfortable video data rates right now are below 500kbps to avoid excessive buffering.

      So where is it all going? Codecs will become more efficient to the point where they can deliver video that is so stunning that there is no room for improvement, as far as the human eye can see anyway. When you combine more efficient codecs with more readily available bandwidth, you’ll eventually hit an equilibrium point where you have optimum video quality delivered at a data rate that 90-95% of users can view. That’s where we’re headed. How far away are we? Who knows.

  2. Bobby P says:

    Looking forward to a time where file formats and codecs become standardized. But just like any burgeoning technology, it will be all over the map as various developers and manufacturers attempt to create their own standard. Would you agree that (in general) file formats decided by what the user can handle and HD tape formats are developed at the whim of the manufacturers? Take the battle between Panasonic and Sony (and JVC), for example. How many HD tape formats can we develop? Quick review: HDCAM is Sony’s format with unique qualities specific to frame rates and bitmaps. Then you have D5-HD from Panasonic. That has even more unique qualities, including it’s own tape shell. Then there’s DVCPro-HD. Another Panasonic creation with still more unique and exclusive properties and a fairly good size compression ratio (not to mention the variations on this including P2 card formats). Then (my favorite) HDV which I think was first done by JVC for low-end consumer cameras looking to pretend to be HD with some really bizarre format issues that will irritate you to no end if you ever try to edit this footage.

    So… Just when you think you got HD sorted out, the deeper you dig, the more you discover that the industry hasn’t sorted itself out yet. Good times ahead.

  3. Barry Clegg says:

    I think the the only place where you can truly see uncompressed HD is in the production truck at a sporting event or control room of a TV station. Right from the camera to a monitor. Even with our HDCAM, which is arguably the best HD format out there, when you hit record to start going to tape you start to see a difference, although you REALLY have to look for it.

    When it comes to streaming HD content it is getting better and better, and with YouTube and Vimeo’s ease of uploading HD content it is only going to get more prevalent.

    When I watch HD at home (and that is all I watch) ESPN has, what I consider, to be the best looking HD picture. Their format is actually 1280×720p at 60 frames, even at the graphics level.

    I think when it comes down to it what looks good, looks good. HDV, while a sub standard format compared to HDCAM, still looks good when played on an HD monitor. What I can’t wait for is the move to 21:9 aspect ratios as opposed to 16:9.

    http://www.reghardware.co.uk/2009/02/20/philips_cinema_tv_dated/

  4. Michal says:

    Hi, here are some information about video formats. Michal

Leave a comment