Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > c152d44cf90e046b661655b5995890a5 > files > 947

mplayer-doc-1.0-1.rc2.18.2mdv2009.0.i586.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>6.1. Video formats</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - 电影播放器"><link rel="up" href="containers.html" title="第 6 章 Containers"><link rel="prev" href="containers.html" title="第 6 章 Containers"><link rel="next" href="audio-formats.html" title="6.2. Audio formats"><link rel="preface" href="howtoread.html" title="如何阅读此文档"><link rel="chapter" href="intro.html" title="第 1 章 介绍"><link rel="chapter" href="install.html" title="第 2 章 Installation"><link rel="chapter" href="usage.html" title="第 3 章 Usage"><link rel="chapter" href="cd-dvd.html" title="第 4 章 CD/DVD用法"><link rel="chapter" href="faq.html" title="第 5 章 Frequently Asked Questions"><link rel="chapter" href="containers.html" title="第 6 章 Containers"><link rel="chapter" href="codecs.html" title="第 7 章 Codecs"><link rel="chapter" href="video.html" title="第 8 章 Video output devices"><link rel="chapter" href="audio.html" title="第 9 章 音频输出设备"><link rel="chapter" href="tv.html" title="第 10 章 TV"><link rel="chapter" href="radio.html" title="第 11 章 广播电台"><link rel="chapter" href="ports.html" title="第 12 章 Ports"><link rel="chapter" href="mencoder.html" title="第 13 章 MEncoder的基础用法"><link rel="chapter" href="encoding-guide.html" title="第 14 章 Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="附录 A. 如何报告错误"><link rel="appendix" href="bugs.html" title="附录 B. 已知错误"><link rel="appendix" href="skin.html" title="附录 C. MPlayer skin format"><link rel="appendix" href="history.html" title="附录 D. History"><link rel="subsection" href="video-formats.html#mpg-vob-dat" title="6.1.1. MPEG files"><link rel="subsection" href="video-formats.html#avi" title="6.1.2. AVI files"><link rel="subsection" href="video-formats.html#asf-wmv" title="6.1.3. ASF/WMV files"><link rel="subsection" href="video-formats.html#mov" title="6.1.4. QuickTime/MOV files"><link rel="subsection" href="video-formats.html#vivo" title="6.1.5. VIVO files"><link rel="subsection" href="video-formats.html#fli" title="6.1.6. FLI files"><link rel="subsection" href="video-formats.html#realmedia" title="6.1.7. RealMedia (RM) files"><link rel="subsection" href="video-formats.html#nuppelvideo" title="6.1.8. NuppelVideo files"><link rel="subsection" href="video-formats.html#yuv4mpeg" title="6.1.9. yuv4mpeg files"><link rel="subsection" href="video-formats.html#film" title="6.1.10. FILM files"><link rel="subsection" href="video-formats.html#roq" title="6.1.11. RoQ files"><link rel="subsection" href="video-formats.html#ogg" title="6.1.12. OGG/OGM files"><link rel="subsection" href="video-formats.html#sdp" title="6.1.13. SDP files"><link rel="subsection" href="video-formats.html#pva" title="6.1.14. PVA files"><link rel="subsection" href="video-formats.html#nsv" title="6.1.15. NSV files"><link rel="subsection" href="video-formats.html#matroska" title="6.1.16. Matroska files"><link rel="subsection" href="video-formats.html#nut" title="6.1.17. NUT files"><link rel="subsection" href="video-formats.html#gif" title="6.1.18. GIF files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.1. Video formats</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">上一页</a> </td><th width="60%" align="center">第 6 章 Containers</th><td width="20%" align="right"> <a accesskey="n" href="audio-formats.html">下一页</a></td></tr></table><hr></div><div class="sect1" lang="zh-CN"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="video-formats"></a>6.1. Video formats</h2></div></div></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="mpg-vob-dat"></a>6.1.1. MPEG files</h3></div></div></div><p>
MPEG files come in different guises:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  MPG: This is the most <span class="bold"><strong>basic</strong></span> form of the
  MPEG file formats. It contains MPEG-1 video, and MP2 (MPEG-1 layer 2) or
  rarely MP1 audio.
</p></li><li><p>
  DAT: This is the very same format as MPG with a different extension. It
  is used on <span class="bold"><strong>Video CDs</strong></span>. Due to the way VCDs
  are created and Linux is designed, the DAT files cannot be played nor copied
  from VCDs as regular files. You have to use <tt class="option">vcd://</tt>
  to play a Video CD.
</p></li><li><p>
  VOB: This is the MPEG file format on <span class="bold"><strong>DVDs</strong></span>.
  It is the same as MPG, plus the capability to contain subtitles or non-MPEG
  (AC-3) audio. It contains encoded MPEG-2 video and usually AC-3 audio, but DTS,
  MP2 and uncompressed LPCM are allowed, too. <span class="bold"><strong>Read the
  <a class="link" href="dvd.html" title="4.2. DVD回放">DVD</a> section</strong></span>!
</p></li><li><p>
  TY: This is a TiVo MPEG stream. It contains MPEG PES data for audio and
  video streams, as well as extra information like closed captions. The
  container is not an MPEG program stream, but a closed format created by
  TiVo. For more information on TiVo stream format, please refer to
  <a class="ulink" href="http://dvd-create.sourceforge.net/tystudio/tystream.shtml" target="_top">
  the TyStudio page</a>.
</p></li></ul></div><p>
Series of frames form independent groups in MPEG files. This means that you
can cut/join an MPEG file with standard file tools (like
<span class="command"><strong>dd</strong></span>, <span class="command"><strong>cut</strong></span>), and it remains completely
functional.
</p><p>
One important feature of MPGs is that they have a field to describe the
aspect ratio of the video stream within. For example SVCDs have 480x480
resolution video, and in the header that field is set to 4:3, so that it is
played at 640x480. AVI files often lack this field, so they have to be
rescaled during encoding or played with the <tt class="option">-aspect</tt>
option.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="avi"></a>6.1.2. AVI files</h3></div></div></div><p>
Designed by Microsoft,
<span class="bold"><strong>AVI (Audio Video Interleaved)</strong></span>
is a widespread multipurpose format currently used mostly for MPEG-4 (DivX and
DivX4) video. It has many known drawbacks and shortcomings (for example in
streaming).
It supports one video stream and 0 to 99 audio streams and can be as big as
2GB, but there exists an extension allowing bigger files called
<span class="bold"><strong>OpenDML</strong></span>. Microsoft currently strongly
discourages its use and encourages ASF/WMV. Not that anybody cares.
</p><p>
There is a hack that allows AVI files to contain an Ogg Vorbis audio
stream, but makes them incompatible with standard AVI.
<span class="application">MPlayer</span> supports playing these files. Seeking is
also implemented but severely hampered by badly encoded files with
confusing headers. Unfortunately the only encoder currently capable of
creating these files, <span class="application">NanDub</span>, has this problem.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">注意</h3><p>
DV cameras create raw DV streams that DV grabbing utilities convert to two
different types of AVI files. The AVI will then contain either separate
audio and video streams that <span class="application">MPlayer</span> can play or
the raw DV stream for which support is under development.
</p></div><p>
There are two kinds of AVI files:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  <span class="bold"><strong>Interleaved:</strong></span> Audio and video content is
  interleaved. This is the standard usage. Recommended and mostly used. Some
  tools create interleaved AVIs with bad sync.
  <span class="application">MPlayer</span> detects these as interleaved, and this
  climaxes in loss of A/V sync, probably at seeking.
  These files should be played as non-interleaved
  (with the <tt class="option">-ni</tt> option).
</p></li><li><p>
  <span class="bold"><strong>Non-interleaved:</strong></span> First comes the whole
  video stream, then the whole audio stream. It thus needs a lot of seeking,
  making playing from network or CD-ROM difficult.
</p></li></ul></div><p>
</p><p>
<span class="application">MPlayer</span> supports two kinds of timings for AVI
files:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  <span class="bold"><strong>bps-based:</strong></span> It is based on the
  bitrate/samplerate of the video/audio stream. This method is used by
  most players, including <a class="ulink" href="http://avifile.sf.net" target="_top">avifile</a>
  and <span class="application">Windows Media Player</span>. Files with broken
  headers, and files created with VBR audio but not VBR-compliant encoder
  will result in A/V desync with this method (mostly at seeking).
</p></li><li><p>
  <span class="bold"><strong>interleaving-based:</strong></span> It does not use the
  bitrate value of the header, instead it uses the relative position of
  interleaved audio and video chunks,
  making badly encoded files with VBR audio playable.
</p></li></ul></div><p>
</p><p>
Any audio and video codec is allowed, but note that VBR audio is not well
supported by most players. The file format makes it possible to use VBR
audio, but most players expect CBR audio, thus they fail with VBR. VBR is
uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed
that most AVI encoders/multiplexers create bad files when using VBR audio.
There are only two known exceptions: <span class="application">NanDub</span> and
<a class="link" href="mencoder.html" title="第 13 章 MEncoder的基础用法"><span class="application">MEncoder</span></a>.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="asf-wmv"></a>6.1.3. ASF/WMV files</h3></div></div></div><p>
ASF (Active Streaming Format) comes from Microsoft. They developed two
variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools
(<span class="application">Windows Media Player</span> and
<span class="application">Windows Media Encoder</span>)
and is very secret. v2.0 is published and patented :). Of course they differ,
there is no compatibility at all (it is just another legal game).
<span class="application">MPlayer</span> supports only v1.0, as nobody has ever seen
v2.0 files :). Note that ASF files nowadays come with the extension
<tt class="filename">.WMA</tt> or <tt class="filename">.WMV</tt>.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="mov"></a>6.1.4. QuickTime/MOV files</h3></div></div></div><p>
These formats were designed by Apple and can contain any codec, CBR or VBR.
They usually have a <tt class="filename">.QT</tt> or <tt class="filename">.MOV</tt>
extension. Note that since the MPEG-4 group chose QuickTime as the recommended
file format for MPEG-4, their MOV files come with a <tt class="filename">.MPG</tt> or
<tt class="filename">.MP4</tt> extension (Interestingly the video and audio
streams in these files are real MPG and AAC files. You can even extract them
with the <tt class="option">-dumpvideo</tt> and <tt class="option">-dumpaudio</tt> options.).
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="vivo"></a>6.1.5. VIVO files</h3></div></div></div><p>
<span class="application">MPlayer</span> happily demuxes VIVO file formats. The
biggest disadvantage of the format is that it has no index block, nor a
fixed packet size or sync bytes and most files lack even keyframes, so
forget seeking!
</p><p>
The video codec of VIVO/1.0 files is standard
<span class="bold"><strong>h.263</strong></span>.
The video codec of VIVO/2.0 files is a modified, nonstandard
<span class="bold"><strong>h.263v2</strong></span>. The audio is the same, it may be
<span class="bold"><strong>g.723 (standard)</strong></span>, or
<span class="bold"><strong>Vivo Siren</strong></span>.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="fli"></a>6.1.6. FLI files</h3></div></div></div><p>
<span class="bold"><strong>FLI</strong></span> is a very old file format used by
Autodesk Animator, but it is a common file format for short animations on the
net.
<span class="application">MPlayer</span> demuxes and decodes FLI movies and is
even able to seek within them (useful when looping with the
<tt class="option">-loop</tt> option). FLI files do not have keyframes, so the
picture will be messy for a short time after seeking.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="realmedia"></a>6.1.7. RealMedia (RM) files</h3></div></div></div><p>
Yes, <span class="application">MPlayer</span> can read (demux) RealMedia
(<tt class="filename">.rm</tt>) files.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="nuppelvideo"></a>6.1.8. NuppelVideo files</h3></div></div></div><p>
NuppelVideo
is a TV grabber tool (AFAIK:). <span class="application">MPlayer</span> can read
its <tt class="filename">.NUV</tt> files (only NuppelVideo 5.0). Those files can
contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo
compressed, and YV12+lzo compressed frames.
<span class="application">MPlayer</span> decodes (and also
<span class="bold"><strong>encodes</strong></span>
them with <span class="application">MEncoder</span> to MPEG-4 (DivX)/etc!) them all.
Seeking works.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="yuv4mpeg"></a>6.1.9. yuv4mpeg files</h3></div></div></div><p>
<a class="ulink" href="http://mjpeg.sf.net" target="_top">yuv4mpeg / yuv4mpeg2</a>
is a file format used by the
<a class="ulink" href="http://mjpeg.sf.net" target="_top">mjpegtools programs</a>.
You can grab, produce, filter or encode video in this format using these tools.
The file format is really a sequence of uncompressed YUV 4:2:0 images.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="film"></a>6.1.10. FILM files</h3></div></div></div><p>
This format is used on old Sega Saturn CD-ROM games.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="roq"></a>6.1.11. RoQ files</h3></div></div></div><p>
RoQ files are multimedia files used in some ID games such as Quake III and
Return to Castle Wolfenstein.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="ogg"></a>6.1.12. OGG/OGM files</h3></div></div></div><p>
This is a new fileformat from
<a class="ulink" href="http://www.xiph.org" target="_top">Xiphophorus</a>.
It can contain any video or audio codec, CBR or VBR. You'll need
<code class="systemitem">libogg</code> and
<code class="systemitem">libvorbis</code> installed before
compiling <span class="application">MPlayer</span> to be able to play it.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="sdp"></a>6.1.13. SDP files</h3></div></div></div><p>
<a class="ulink" href="ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt" target="_top">SDP</a> is an
IETF standard format for describing video and/or audio RTP streams.
(The "<a class="ulink" href="http://www.live555.com/mplayer/" target="_top">LIVE555 Streaming Media</a>"
are required.)
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="pva"></a>6.1.14. PVA files</h3></div></div></div><p>
PVA is an MPEG-like format used by DVB TV boards' software (e.g.:
<span class="application">MultiDec</span>,
<span class="application">WinTV</span> under Windows).
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="nsv"></a>6.1.15. NSV files</h3></div></div></div><p>
NSV (NullSoft Video) is the file format used by the
<span class="application">Winamp</span> player to stream audio and video.
Video is VP3, VP5 or VP6, audio is MP3, AAC or VLB.
The audio only version of NSV has the <tt class="filename">.nsa</tt> extension.
<span class="application">MPlayer</span> can play both NSV streams and files.
Please note that most files from the
<a class="ulink" href="http://www.winamp.com" target="_top">Winamp site</a> use VLB audio, that
can't be decoded yet. Moreover streams from that site need an extra
depacketization layer that still has to be implemented (those files are
unplayable anyway because they use VLB audio).
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="matroska"></a>6.1.16. Matroska files</h3></div></div></div><p>
Matroska is an open container format.
Read more on the <a class="ulink" href="http://www.matroska.org/" target="_top">official site</a>.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="nut"></a>6.1.17. NUT files</h3></div></div></div><p>
NUT is the container format developed by <span class="application">MPlayer</span> and
<span class="application">FFmpeg</span> folks. Both projects support it.
Read more on the <a class="ulink" href="http://www.nut.hu/" target="_top">official site</a>.
</p></div><div class="sect2" lang="zh-CN"><div class="titlepage"><div><div><h3 class="title"><a name="gif"></a>6.1.18. GIF files</h3></div></div></div><p>
The <span class="bold"><strong>GIF</strong></span> format is a common format for web
graphics. There are two versions of the GIF spec, GIF87a and GIF89a.
The main difference is that GIF89a allows for animation.
<span class="application">MPlayer</span> supports both formats through use of
<code class="systemitem">libungif</code> or
another libgif-compatible library. Non-animated GIFs will be displayed as
single frame videos. (Use the <tt class="option">-loop</tt> and
<tt class="option">-fixed-vo</tt> options to display these longer.)
</p><p>
<span class="application">MPlayer</span> currently does not support seeking in GIF
files. GIF files do not necessarily have a fixed frame size, nor a fixed
framerate. Rather, each frame is of independent size and is supposed to be
positioned in a certain place on a field of fixed-size. The framerate is
controlled by an optional block before each frame that specifies the next
frame's delay in centiseconds.
</p><p>
Standard GIF files contain 24-bit RGB frames with at most an 8-bit indexed
palette. These frames are usually LZW-compressed, although some GIF encoders
produce uncompressed frames to avoid patent issues with LZW compression.
</p><p>
If your distribution does not come with
<code class="systemitem">libungif</code>, download a copy from the
<a class="ulink" href="http://sourceforge.net/projects/libungif" target="_top">libungif
homepage</a>. For detailed technical information, have a look at the
<a class="ulink" href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt" target="_top">GIF89a specification</a>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="audio-formats.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">第 6 章 Containers </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> 6.2. Audio formats</td></tr></table></div></body></html>