2002-06-12 23:53:28 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2001-11-06 17:04:56 +00:00
|
|
|
<HTML>
|
|
|
|
|
2002-03-07 17:55:34 +00:00
|
|
|
<HEAD>
|
2002-08-04 00:07:55 +00:00
|
|
|
<TITLE>Formats - MPlayer - The Movie Player for Linux</TITLE>
|
2002-06-12 09:14:08 +00:00
|
|
|
<LINK REL="stylesheet" TYPE="text/css" HREF="default.css">
|
2002-06-12 23:53:28 +00:00
|
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
2002-03-07 17:55:34 +00:00
|
|
|
</HEAD>
|
|
|
|
|
2002-06-12 23:53:28 +00:00
|
|
|
<BODY>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H2><A NAME="formats">2.1 Supported formats</A></H2>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>It is important to clarify a common mistake. When people see a file with a
|
2002-08-10 20:26:43 +00:00
|
|
|
<B>.AVI</B> extension, they immediately conclude that it is not an MPEG file.
|
|
|
|
That is not true. At least not entirely. Contrary to popular belief such a
|
|
|
|
file <B>can</B> contain MPEG1 video.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR>
|
2002-08-10 20:26:43 +00:00
|
|
|
Examples of video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR>
|
2002-08-11 18:27:38 +00:00
|
|
|
Examples of file <B>formats</B> are: MPG, AVI, ASF.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P>In theory, you can put an OpenDivX video and MP3 audio into an <B>MPG</B>
|
|
|
|
format file. However, most players will not play it, since they expect MPEG1
|
|
|
|
video and MP2 audio (unlike <B>AVI</B>, <B>MPG</B> does not have the
|
|
|
|
necessary fields to describe its video and audio streams). Or you might put
|
|
|
|
MPEG1 video into an AVI file.
|
|
|
|
<A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A> and
|
|
|
|
<A HREF="encoding.html">MEncoder</A> can create these files.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H3><A NAME="video_formats">2.1.1 Video formats</A></H3>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="mpeg">2.1.1.1 MPEG files</A></H4>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-29 22:34:12 +00:00
|
|
|
<P>MPEG files come in different guises:</P>
|
|
|
|
|
|
|
|
<UL>
|
2002-08-10 20:26:43 +00:00
|
|
|
<LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It
|
|
|
|
contains MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI>
|
|
|
|
<LI>DAT: This is the very same format as MPG with a different extension. It
|
|
|
|
is used on <B>Video CD</B>s. Due to the way VCDs are created and Linux is
|
|
|
|
designed, DAT files cannot be played nor copied from VCDs as regular files.
|
|
|
|
You have to use the <CODE>-vcd</CODE> option to play the Video CD.</LI>
|
|
|
|
<LI>VOB: This is the MPEG file format on <B>DVD</B>s. It is the same as MPG,
|
|
|
|
plus the capability to contain subtitles or non-MPEG (AC3) audio. It
|
|
|
|
contains encoded MPEG2 video and usually AC3 audio, but DTS, MP2 and
|
|
|
|
uncompressed LPCM are allowed, too.<BR> <B>Read the <A
|
|
|
|
HREF="cd-dvd.html#dvd">DVD section</A>!</B></LI>
|
2002-03-29 22:34:12 +00:00
|
|
|
</UL>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>Series of frames form independent groups in MPEG files. This means that you
|
2002-08-10 20:26:43 +00:00
|
|
|
can cut/join an MPEG file with standard file tools (like <CODE>dd</CODE>,
|
|
|
|
<CODE>cut</CODE>), and it remains completely functional.</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<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 do not have this field, so they have to be
|
|
|
|
rescaled during encoding or played with the <CODE>-aspect</CODE> option.</P>
|
2001-11-07 18:18:22 +00:00
|
|
|
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="avi">2.1.1.2 AVI files</A></H4>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P>Designed by Microsoft, <B>AVI (Audio Video Interleaved)</B> is a widespread
|
|
|
|
multipurpose format currently used mostly for 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. File size is limited to
|
|
|
|
2GB, but there exists an extension allowing bigger files called
|
|
|
|
<B>OpenDMS</B>. Microsoft currently strongly discourages its use and
|
2002-08-11 18:27:38 +00:00
|
|
|
encourages ASF/WMV. Not that anybody cares.</P>
|
2002-04-01 08:02:41 +00:00
|
|
|
|
2002-05-24 00:49:06 +00:00
|
|
|
<P>There is a hack that allows AVI files to contain an Ogg Vorbis audio
|
|
|
|
stream, but makes them incompatible with standard AVI. <B>MPlayer</B>
|
|
|
|
supports playing these files. Seeking is also implemented but severely
|
|
|
|
hampered by badly encoded files with confusing headers. Unfortunately the
|
2002-07-24 01:56:08 +00:00
|
|
|
only encoder currently capable of creating these files, NanDub, has this
|
2002-05-24 00:49:06 +00:00
|
|
|
problem.</P>
|
|
|
|
|
2002-07-24 01:56:08 +00:00
|
|
|
<P><B>Note:</B> DV cameras create raw DV streams that DV grabbing utilities
|
2002-08-10 20:26:43 +00:00
|
|
|
convert to two different types of AVI files. The AVI will then contain either
|
|
|
|
separate audio and video streams that <B>MPlayer</B> can play or the raw DV
|
|
|
|
stream for which support is under development.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-29 22:34:12 +00:00
|
|
|
<P>There are two kinds of AVI files:</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
<UL>
|
2002-03-29 22:34:12 +00:00
|
|
|
<LI><B>Interleaved:</B> Audio and video content is interleaved. This is the
|
2002-10-18 17:57:05 +00:00
|
|
|
standard usage. Recommended and mostly used. Some tools create
|
|
|
|
non-interleaved AVIs with bad sync. <B>MPlayer</B> 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 <CODE>-ni</CODE>
|
|
|
|
option).</LI>
|
2002-03-29 22:34:12 +00:00
|
|
|
<LI><B>Non-interleaved:</B> First comes the whole video stream, then the whole
|
2002-03-27 00:54:45 +00:00
|
|
|
audio stream. It thus needs a lot of seeking, making playing from network or
|
2002-10-18 17:57:05 +00:00
|
|
|
CD-Rom difficult. (should be played with the <CODE>-ni</CODE> option)</LI>
|
2001-11-13 13:17:46 +00:00
|
|
|
</UL>
|
|
|
|
|
2002-03-29 22:34:12 +00:00
|
|
|
<P><B>MPlayer</B> supports two kinds of timings for AVI files:</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
<UL>
|
2002-03-27 00:54:45 +00:00
|
|
|
<LI><B>bps-based</B>: It is based on the bitrate/samplerate of the video/audio stream. This
|
2002-03-29 22:34:12 +00:00
|
|
|
method is used by most players, including <A HREF="http://avifile.sourceforge.net">avifile</A>
|
2002-07-24 01:56:08 +00:00
|
|
|
and Windows Media Player.
|
|
|
|
Files with broken headers, and files created with VBR audio but not with a
|
2001-11-13 13:17:46 +00:00
|
|
|
VBR-compliant encoder will result in A/V desync with this method (mostly at
|
|
|
|
seeking).</LI>
|
2002-03-27 00:54:45 +00:00
|
|
|
<LI><B>interleaving-based</B>: 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.</LI>
|
2001-11-13 13:17:46 +00:00
|
|
|
</UL>
|
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>Any audio and video codec is allowed, but note that VBR audio is not well
|
2002-08-10 20:26:43 +00:00
|
|
|
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 the Microsoft AVI specs only describe CBR audio. Most AVI
|
|
|
|
encoders/multiplexers create bad files when using VBR audio. There are only
|
|
|
|
two known exceptions: NanDub and <A HREF="encoding.html">MEncoder</A>.</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="asf">2.1.1.3 ASF/WMV files</A></H4>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2001-11-13 13:17:46 +00:00
|
|
|
<P>ASF (active streaming format) comes from Microsoft. They developed two
|
2002-08-10 20:26:43 +00:00
|
|
|
variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (Windows
|
|
|
|
Media Player and Windows Media Encoder) 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). <B>MPlayer</B> supports only v1.0, as nobody has
|
|
|
|
ever seen v2.0 files :). Note that ASF files nowadays come with the extension
|
|
|
|
.WMA or .WMV.</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="mov">2.1.1.4 QuickTime/MOV files</A></H4>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P>These formats were designed by Apple and can contain any codec, CBR or VBR.
|
|
|
|
They usually have a .QT or .MOV extension. Ever since the MPEG4 group chose
|
|
|
|
QuickTime as the recommended file format for MPEG4, their MOV files come with
|
|
|
|
an
|
|
|
|
.MPG or .MP4 extension (Interestingly the video and audio streams in these
|
|
|
|
files are real MPG and AAC files. You can even extract them with the
|
|
|
|
<CODE>-dumpvideo</CODE> and <CODE>-dumpaudio</CODE> options.).</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2002-07-24 01:56:08 +00:00
|
|
|
<P><B>Note:</B> Most new QuickTime files use <B>Sorenson</B> video and QDesign
|
2002-08-04 22:13:09 +00:00
|
|
|
Music audio. See our <A HREF="codecs.html#sorenson">Sorenson</A> codec
|
2002-07-24 01:56:08 +00:00
|
|
|
section. QDesign Music audio currently cannot be played.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="vivo">2.1.1.5 VIVO files</A></H4>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P><B>MPlayer</B> 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>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec
|
2002-08-10 20:26:43 +00:00
|
|
|
of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the
|
|
|
|
same, it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P>
|
2001-11-13 13:17:46 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P>See the <A HREF="codecs.html#vivo_video">VIVO video codec</A> and
|
|
|
|
<A HREF="codecs.html#vivo_audio">VIVO audio codec</A> sections for installation
|
|
|
|
instructions.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="fli">2.1.1.6 FLI files</A></H4>
|
2001-12-27 22:12:35 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P><B>FLI</B> is a very old file format used by Autodesk Animator, but it is a
|
|
|
|
common file format for short animations on the net. <B>MPlayer</B> demuxes
|
|
|
|
and decodes FLI movies and is even able to seek within them (useful when
|
|
|
|
looping with the <CODE>-loop</CODE> option). FLI files do not have keyframes,
|
|
|
|
so the picture will be messy for a short time after seeking.</P>
|
2001-12-27 22:12:35 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="real">2.1.1.7 RealMedia (RM) files</A></H4>
|
2001-12-27 22:12:35 +00:00
|
|
|
|
2002-06-09 15:21:57 +00:00
|
|
|
<P>Yes, <B>MPlayer</B> can read (demux) RealMedia (.rm) files. Seeking works,
|
|
|
|
but you have to explicitly specify the <CODE>-forceidx</CODE> option
|
|
|
|
(the format supports keyframes). Here are the lists of the supported
|
2002-08-04 22:13:09 +00:00
|
|
|
<A HREF="codecs.html#realvideo">RealVideo</A>
|
|
|
|
and <A HREF="codecs.html#realaudio">RealAudio</A> codecs.</P>
|
2002-06-09 15:21:57 +00:00
|
|
|
|
2001-12-27 22:12:35 +00:00
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="nuppelvideo">2.1.1.8 NuppelVideo files</A></H4>
|
2001-12-27 23:55:34 +00:00
|
|
|
|
|
|
|
<P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A>
|
2002-08-10 20:26:43 +00:00
|
|
|
is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its .NUV files (only
|
|
|
|
NuppelVideo 5.0). Those files can contain uncompressed YV12, YV12+RTJpeg
|
|
|
|
compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed frames.
|
|
|
|
<B>MPlayer</B> decodes them all (and also <B>encodes</B> them with
|
|
|
|
<B>MEncoder</B> to DivX/etc!). Seeking works.</P>
|
2001-12-27 23:55:34 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="yuv4mpeg">2.1.1.9 yuv4mpeg files</A></H4>
|
2001-12-28 00:33:26 +00:00
|
|
|
|
2002-08-10 20:26:43 +00:00
|
|
|
<P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is a file
|
|
|
|
format used by the <A HREF="http://mjpeg.sf.net">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
|
2002-08-11 18:27:38 +00:00
|
|
|
images.</P>
|
2001-12-28 00:33:26 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="film">2.1.1.10 FILM files</A></H4>
|
2002-01-24 17:14:09 +00:00
|
|
|
|
2002-03-27 00:54:45 +00:00
|
|
|
<P>This format is used on old Sega Saturn CD-Rom games.</P>
|
2002-01-24 17:14:09 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="roq">2.1.1.11 RoQ files</A></H4>
|
2002-02-03 11:00:39 +00:00
|
|
|
|
2002-02-08 13:56:36 +00:00
|
|
|
<P>RoQ files are multimedia files used in some ID games such as Quake III and
|
|
|
|
Return to Castle Wolfenstein.</P>
|
2002-02-03 11:00:39 +00:00
|
|
|
|
|
|
|
|
2002-10-18 17:57:05 +00:00
|
|
|
<H4><A NAME="ogg">2.1.1.12 OGG/OGM files</A></H4>
|
2002-04-27 09:27:31 +00:00
|
|
|
|
2002-07-24 01:56:08 +00:00
|
|
|
<P>This is a new file format from <A HREF="http://www.xiph.org">Xiphophorus</A>.
|
|
|
|
It can contain any video or audio codec, CBR or VBR. You will need to
|
|
|
|
have <CODE>libogg</CODE> and <CODE>libvorbis</CODE> installed
|
2002-05-03 22:07:12 +00:00
|
|
|
before compiling <B>MPlayer</B> to be able to play it.</P>
|
2002-04-27 09:27:31 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H3><A NAME="audio_formats">2.1.2 Audio formats</A></H3>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-28 17:30:46 +00:00
|
|
|
<P><B>MPlayer</B> is a <B>Movie</B> and not a <B>Media</B> player, although
|
|
|
|
it can play some audio file formats (they are listed in the sections below).
|
|
|
|
This is not a recommended usage of <B>MPlayer</B>, you better use
|
|
|
|
<A HREF="http://www.xmms.org">xmms</A>.</P>
|
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="mp3">2.1.2.1 MP3 files</A></H4>
|
2002-03-27 00:54:45 +00:00
|
|
|
|
|
|
|
<P>You may have problems playing certain MP3 files that <B>MPlayer</B> will
|
2002-08-10 20:26:43 +00:00
|
|
|
misdetect as MPEGs and play incorrectly or not at all. This cannot be fixed
|
|
|
|
without dropping support for certain broken MPEG files and thus will remain
|
|
|
|
like this for the foreseeable future. The <CODE>-demuxer</CODE> flag
|
2002-08-20 00:36:58 +00:00
|
|
|
described in the man page may help you in these cases.</P>
|
2001-11-06 17:04:56 +00:00
|
|
|
|
2002-03-28 17:30:46 +00:00
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="wav">2.1.2.2 WAV files</A></H4>
|
2002-03-28 17:30:46 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="ogg_vorbis">2.1.2.3 OGG files (Vorbis)</A></H4>
|
2002-03-28 17:30:46 +00:00
|
|
|
|
2002-04-27 09:27:31 +00:00
|
|
|
<P>Requires properly installed <CODE>libogg</CODE> and
|
|
|
|
<CODE>libvorbis</CODE>.</P>
|
2002-03-28 17:30:46 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="wma">2.1.2.4 WMA/ASF files</A></H4>
|
2002-03-28 17:30:46 +00:00
|
|
|
|
|
|
|
|
2002-08-20 00:33:04 +00:00
|
|
|
<H4><A NAME="mp4">2.1.2.5 MP4 files</A></H4>
|
2002-03-28 17:30:46 +00:00
|
|
|
|
2001-11-06 17:04:56 +00:00
|
|
|
</BODY>
|
|
|
|
</HTML>
|