old-www/REF/VideoLAN-Quickstart/x131.html

243 lines
3.9 KiB
HTML

<HTML
><HEAD
><TITLE
>&#13;
What is a codec ?
</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="VideoLAN Quickstart"
HREF="index.html"><LINK
REL="UP"
TITLE="Introduction"
HREF="intro.html"><LINK
REL="PREVIOUS"
TITLE="
What is the VideoLAN project ?
"
HREF="x47.html"><LINK
REL="NEXT"
TITLE="
How can I use VideoLAN ?
"
HREF="x156.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>VideoLAN Quickstart</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x47.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 1. Introduction</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x156.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN131"
></A
>1.2. What is a codec ?</H1
><P
>&#13;To fully understand the VideoLAN solution, you must
understand the difference between a <EM
>codec</EM
> and a
<EM
>container format</EM
>
</P
><P
></P
><UL
><LI
><P
>&#13;A <EM
>codec</EM
> is a compression
algorithm, used to reduce the size of a stream. There are audio codecs
and video codecs. MPEG-1, MPEG-2, MPEG-4, Vorbis, DivX, ... are
codecs
</P
></LI
><LI
><P
>&#13;A <EM
>container format</EM
> contains
one or several streams already encoded by codecs. Very often, there
is an audio stream and a video one. AVI, Ogg, MOV, ASF, ... are
container formats. The streams contained can be encoded using different
codecs. In a perfect world, you could put any codec in any container
format. Unfortunately, there are some incompatibilities. You can
find a matrix of possible codecs and container formats on the <A
HREF="http://www.videolan.org/streaming/features.html"
TARGET="_top"
>features
page</A
>
</P
></LI
></UL
><P
>&#13;To decode a stream, VLC first
<EM
>demuxes</EM
> it. This means that it reads the container
format and separates audio, video, and subtitles, if any. Then, each of
these are passed <EM
>decoders</EM
> that do the mathematical
processing to decompress the streams
.</P
><P
>&#13;There is a particular thing about MPEG:
</P
><P
></P
><UL
><LI
><P
>&#13;MPEG is a <EM
>codec</EM
>. There are
several versions of it, called MPEG-1, MPEG-2, MPEG-4, ...
</P
></LI
><LI
><P
>MPEG is also a container format, sometimes refered
to as <EM
>MPEG System</EM
>. There are several types of MPEG:
ES, PS, and TS</P
><P
>When you play an MPEG video from a DVD, for instance, the MPEG
stream is actually composed of several streams (called Elementary
Streams, ES): there is one stream for video, one for audio, another for
subtitles, and so on. These different streams are mixed together into a
single Program Stream (PS). So, the .VOB files you can find in a DVD are
actually MPEG-PS files. But this PS format is not adapted for streaming
video through a network or by satellite, for instance. So, another
format called Transport Stream (TS) was designed for streaming MPEG
videos through such channels.</P
></LI
></UL
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x47.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x156.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>What is the VideoLAN project ?</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="intro.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>How can I use VideoLAN ?</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>