quinta-feira, 7 de fevereiro de 2013

Formatos e afins

http://lifehacker.com/5893250/whats-the-difference-between-all-these-video-formats-and-which-one-should-i-use


What’s the Difference Between All These Video Formats, and Which One Should I Use?

Dear Lifehacker,
I know a lot of video players (like PotPlayer) can play any video file out there, but why are there so many video formats in the first place? Is there a real difference between DivX and XviD, or MP4, and MKV? When I rip a DVD, or go hunting for downloads, which format is the best to use?
Sincerely,
Confused About Codecs
Dear Confused,
The world of video formats can be pretty confusing, but there are only a few things you reallyneed to know. First, it's important to note that a video format is more than just its file extension. Extensions like AVI are not, in fact, video codecs—they're containers. A container is the file format which can use multiple different codecs—such as DivX or x264—to compress a certain standard of video—such as MPEG-4 or H.264, respectively—into a hard-drive friendly amount of space. Here's what you need to know about both codecs and containers, and what that means for the videos you rip yourself.

What Is a Codec?

Most of the video you'll come across is compressed, meaning its been altered to take up less space on your computer. For example, a regular Blu-Ray disc usually takes up around 30 or 50GB of space—which is a lot for a normal person to download or store on their hard drive. So, we compress movies to make them more manageable, usually with some loss in video quality.
A codec compresses and decompresses data. It interprets the video file and determines how to play it on your screen. Your computer comes with many codecs pre-installed, though you caninstall codec packs for wider support, or a program like VLC or PotPlayer (which we prefer to codec packs). Some examples include:
  • FFmpeg (which includes formats like MPEG-2, the format in which DVDs are stored, and MPEG-4, which is the video format Apple uses in the iTunes store)
  • DivX, which works with a certain type of MPEG-4 file, and was often used to rip DVDs in the pre-HD era
  • XviD, an open source version of DivX, popular among movie pirates
  • x264, which compresses H.264 videos (Also known as MPEG-4 AVC), and is very popular for high definition videos
There are a lot of different codecs out there, and it can get really confusing with all the different versions of MPEG standards. These days, you really only need to concern yourself with a few—which we'll talk about in a couple minutes.

What Is a Container?

A container is, essentially, a bundle of files. Usually a container consists of a video codec and an audio codec, though it can also contain things like subtitles. Containers allow you to choose one codec for your video and one for your audio, which is nice—that way, you can choose to use the high-quality DTS audio, or compress your audio to something like MP3 for even more space savings. It just gives you a bit more control over how you record your videos or rip your movies. Popular containers include:
  • AVI
  • Matroska (which uses the extension MKV)
  • MP4 (which has been popularized by Apple in the iTunes Store—note that this can also come with the M4V extension, but the container is the exact same)
  • MOV (which was created by Apple)
The main difference between different containers is not only the codecs they support but what other features they support—like subtitles or chapters. These days, MKV is an extremely popular container, mainly because it supports nearly any video codec under the sun, as well as a ton of extra features (plus it's open source).

So Which Should You Use?

What's the Difference Between All These Video Formats, and Which One Should I Use?These days, you'll only really come across a few different codecs and containers as you browse the web for video. DivX and XviD (DivX's open source counterpart) are popular for standard-definition videos, like ripped DVDs, but are mostly outdated, so I wouldn't use them to rip your own DVDs. Handbrake, our favorite DVD ripper and video encoder, supports three video codecs (which you can see under the "Video" tab) and two containers (which you'll find under "Output Settings"). H.264, which Handbrake uses by default, will give you the best quality, though if you don't care about quality, MPEG-4 will probably compress faster. As for containers, both MKV and MP4 support high quality H.264 video, but in general we prefer MKV for almost everything, since it has a few more extra features, supports higher quality audio, and is open source. The one downside of MKV is that it isn't as well supported by certain programs and devices. So, if you're putting these videos on your iPad, Apple TV, or Xbox 360, for example, you'll want to go with the more widely supported MP4. If you're watching them in VLC, PotPlayer, XBMC, or another video player that supports MKV, then MKV is the way to go.
That's a lot of information to throw at you in a few paragraphs, but like we said—despite how big and confusing the world of video is, a lot of those codecs are outdated, and you only really need to concern yourself with a few. If you want a more detailed comparison, check out Wikipedia's Comparison of Video CodecsComparison of Container Formats, and its entry on MPEG for more info on all the different variations of the MPEG standards of video compression.
Sincerely,
Lifehacker
https://en.wikipedia.org/wiki/Comparison_of_video_codecs
https://en.wikipedia.org/wiki/Comparison_of_container_formats

Profiles support

Modern standards define a wide range of features and require very substantial software or hardware efforts and resources for their implementation. Only selected profiles of a standard are typically supported in any particular product. (This very common situation for H.264 implementations for example.)
The H.264 standard includes the following seven sets of capabilities, which are referred to as profiles, targeting specific classes of applications:
  • Baseline Profile (BP): Primarily for lower-cost applications with limited computing resources, this profile is used widely in videoconferencing and mobile applications.
  • Main Profile (MP): Originally intended as the mainstream consumer profile for broadcast and storage applications, the importance of this profile faded when the High profile was developed for those applications.
  • Extended Profile (XP): Intended as the streaming video profile, this profile has relatively high compression capability and some extra tricks for robustness to data losses and server stream switching.
  • High Profile (HiP): The primary profile for broadcast and disc storage applications, particularly for high-definition television applications (this is the profile adopted into HD DVDand Blu-ray Disc, for example).
  • High 10 Profile (Hi10P): Going beyond today's mainstream consumer product capabilities, this profile builds on top of the High Profile — adding support for up to 10 bits per sample of decoded picture precision.
  • High 4:2:2 Profile (Hi422P): Primarily targeting professional applications that use interlaced video, this profile builds on top of the High 10 Profile — adding support for the 4:2:2 chroma sampling format while using up to 10 bits per sample of decoded picture precision.
  • High 4:4:4 Predictive Profile (Hi444PP): This profile builds on top of the High 4:2:2 Profile — supporting up to 4:4:4 chroma sampling, up to 14 bits per sample, and additionally supporting efficient lossless region coding and the coding of each picture as three separate color planes.
  • Multiview High Profile: This profile supports two or more views using both inter-picture (temporal) and MVC inter-view prediction, but does not support field pictures and macroblock-adaptive frame-field coding.
The standard also contains four additional all-Intra profiles, which are defined as simple subsets of other corresponding profiles. These are mostly for professional (e.g., camera and editing system) applications:
  • High 10 Intra Profile: The High 10 Profile constrained to all-Intra use.
  • High 4:2:2 Intra Profile: The High 4:2:2 Profile constrained to all-Intra use.
  • High 4:4:4 Intra Profile: The High 4:4:4 Profile constrained to all-Intra use.
  • CAVLC 4:4:4 Intra Profile: The High 4:4:4 Profile constrained to all-Intra use and to CAVLC entropy coding (i.e., not supporting CABAC).
Moreover, the standard now also contains three Scalable Video Coding profiles.
  • Scalable Baseline Profile: A scalable extension of the Baseline profile.
  • Scalable High Profile: A scalable extension of the High profile.
  • Scalable High Intra Profile: The Scalable High Profile constrained to all-Intra use.
An accurate comparison of codecs must take the profile variations within each codec into account.

[edit]Supported rate control strategies

Videocodecs rate control strategies can be classified as:
Variable bit rate (VBR) is a strategy to maximize the visual video quality and minimize the bit rate. On fast motion scenes, a variable bit rate uses more bits than it does on slow motion scenes of similar duration yet achieves a consistent visual quality. For real-time and non-buffered video streaming when the available bandwidth is fixed, e.g. in videoconferencing delivered on channels of fixed bandwidth, a constant bit rate (CBR) must be used.
CBR is commonly used for videoconferences, satellite and cable broadcasting. VBR is commonly used for video CD/DVD creation and video in programs.

Sem comentários: