HELP NEEDED: Understanding codecs and compression

I am in urgent need of some help in understanding codecs and video compression settings. I have an interview for a training scheme I've been shortlisted for in a few days time and I have to be a little more up to speed then I am now so I could do with some help from any experienced but patient and plain-speaking users!

To give you some idea of where my weak spots are: I've only ever compressed through trial and error for upload to youtube and shootingpeople by inputting optimum settings I've found online. I've also not often used software like Compressor or Sorenson and I need to learn now so any useful links to tutorials would be super.

More importantly: I've only ever found optimum settings online as determined by other users and I wouldn't know how to determine them for myself or even what they mean and how they effect video quality for web streaming and dvd burning etc, so the things I could really do with some help with are as follows:

I know what some codecs are for example H.264, FLV (Flash) etc.. and I know what containers are in THEORY, but I really need this to be explained a little better i.e. a list of codecs and their best, ideal uses i.e. web streaming, dvd burning and the appropriate containers etc..

Lastly, if I received video files in various formats that weren’t ideal for web streaming or editing in FCP, how would I know how to convert them into formats that are suitable? i.e. I get a video file in .avi format but I need to edit it in FCP, would I convert to a .mov file?

On a side note, what’s the difference is between a codec and a standard (not sure if it’s that important)..

Thanks so much for your help in advance and sorry for the questions that are probably all over the place, I’m very unfamiliar with all this.

Posting the same question twice isn't going to inspire a response.
You also can't expect years of knowledge to be boiled down into a bite. Any answer will leave you with more questions. It sounds like you haven't read enough online or bought any of the many tutorial books and DVDs out there that would get you past step one.

Compression settings are usually based on the output medium and viewing device. Web settings are different than settings you might use for an interactive kiosk, just as settings for DVD or Blu-ray output are different than what you'd use for playing back a full-rez digital file for a presentation, etc.

A search online can give you a general basis of knowing the difference between these. But it's really not possible to give you a single answer on this unless we knew the output medium.

Codecs and Containers:

I know what some codecs are for example H.264, FLV (Flash) etc.. and I know what containers are in THEORY, but I really need this to be explained a little better i.e. a list of codecs and their best, ideal uses i.e. web streaming, dvd burning and the appropriate containers etc..

In basic terms, a codec is the compression/decompression algorythym used to reduce or compress the file size, and then the decompression algorythym used to play it back. The holy grail of codecs is one that makes the file as small as possible without visually impacting quality, and will play back quickly and efficiently on a large number of computers and platforms.

A container or wrapper is a little harder to explain, but it's basically a file format whose specifications regard only the way data is stored (but not coded) within the file. It stores the data itself and the information about how the data is stored, so when you go to load a Quicktime file in Final Cut, if the container has stored the info about the file correctly (according to quicktime specs), Final Cut will be able to load it and play it (provided you have the right coded).

Confused yet? Yeah...me too.

Lastly, if I received video files in various formats that weren’t ideal for web streaming or editing in FCP, how would I know how to convert them into formats that are suitable? i.e. I get a video file in .avi format but I need to edit it in FCP, would I convert to a .mov file?

We use transcoding software for this, but most NLE applications, Final Cut included, can load, play and convert a variety of formats and codecs. I'm not sure if Final Cut can load an .avi, but a program like Procoder or Sorenesen Squeeze would be able to convert it for you. For that matter, there are low cost and even free software converters availabe to do something this specific. As with any software, the less you pay, the worse the user interface (generally), and the more flaky the performance. Plus, apps like Procoder and Sqeeuze are only a few hundred dollars.

On a side note, what’s the difference is between a codec and a standard (not sure if it’s that important)..

Not sure I understand this question. But video standards are typically things like the various version of HDTV. There are no less than 5 distinct versions of HDTV, each with it's own pixel size, frame rate, interlace settings etc. So if that's what they're talking about, then a standard would be the broad definiion of a video format. So with standard definition, there is NTSC D1, which is 720x486 @ 4x3 aspect, 60i (60 interlaced fields), there is NTSC D1 widescreen, which is 720x486 @ 16x9 aspect (60 interlaced fields), NTSC D1 24p which is 720x486 @ 4x3, 24 fps with pulldown. Heck I could go on for another page and a half there are so many. But you get the idea. There are scores of video standards, including ones used in other countries, such as PAL and SECAM.

But...as the previous poster noted, even with a base knowledge and understanding of codecs, it takes years to become good at it. That said, (and we do a TON of encoding and transcoding), a lot of what we do to achieve high-quality results IS trial and error. But without the base understanding, that same trial and error would take much longer to get good results.

Thanks for your help. I should have been a little clearer: I'm really wanting to know if there is a general rule of thumb for determining the best codecs and compression settings for web streaming (not download). That may also be a difficult question to answer but that's what I'll be doing in this scheme so I'll need to have an idea. If there are any resources online that could help I'd love to know (I have been doing my own research and have found some articles but I don't quite understand the principles yet or have an idea of how to determine settings for this).

I know the aim of compression is to compress as much as possible (to reduce file and date size) without losing quality and ease of playback but I wouldn't know how to select from the endless list of bit rates and data rates for video and audio compression of a video file to make it playable for web streaming.

Anyway, I hope that's a little clearer, luckily I won't be dealing with kiosks etc and I don't need to know for presentations or blue ray, it's web streaming and maybe sometimes dvd burning I need to familiarize myself with.

May Bolton:
I'm really wanting to know if there is a general rule of thumb for determining the best codecs and compression settings for web streaming (not download).

Some of the big CDN (content distribution network or content delivery network) companies have compression and data rate tables you can download. But some are reluctant to provide this information because a big part of their business is doing the encoding for clients. I know at one time we downloaded a table from Playstream, but I looked on their site and couldn't find it. You might go to their site and just search for something like "compression table" or something like that.

You basically plug in the length of the clip, then check the connection speed and it spits out two lists. One listing the mutliple bit-rates to encode a file to if you want to provide users with varying bit-rates so it will stream reliably on virtually any connection, and the second a single bitrate that will play on the target connection speed.

But generally, for streaming you simply look at the average download speeds of the various internet services available. For instance, DSL typically delivers between 512kb and 1MB/sec download speeds. So your videos should not exceed 512kb in order to stream. If you want them to stream reliably over those connections, you should actually shoot for a little lower overal data rate (combined video and audio data rate). That said, we typically encode with the 512kb/sec combined data rate as the target for streaming video.

That ensures that it will probably stream on just about any connection out there (except for an antiquated modem of course). You also have to think about things like streaming over 3G if your clients want cell phone users to access content.

I know the aim of compression is to compress as much as possible (to reduce file and date size) without losing quality and ease of playback but I wouldn't know how to select from the endless list of bit rates and data rates for video and audio compression of a video file to make it playable for web streaming.

On this point you'll just have to educate yourself. You'll learn quickly that Flash Video doesn't give the best quality, but will play on just about any computer running any operating system, using just about any browser. H264 (a codec) in either Quicktime, Windows, and now even Flash, gives better quality, but because it's a newer codec, reduces playback compatibility, because many end users won't have the correct codec and either don't have their computer configured to automatically download it, or their corporate firewall won't allow it.

Generally, the older the codec, the better chance it will play on a wide range of computers. But...the older the codec, the worse the quality. Your job is to figure out what's important to your client and select the appropriate format and codec for them. We use Flash Video for 90% of what we do for the web simply because the quality is decent, and the compatibility is very high. Not to mention it's very easy to implement on web pages.