--- formats.html Tue Mar 26 13:49:39 2002 +++ formats.html.diego Tue Mar 26 23:41:16 2002 @@ -14,25 +14,24 @@

2.1. Supported formats

-

It's important to clarify a popular mistake. When people see a file with -.AVI extension, they instantly declare that isn't an MPEG file. -That's not true. At least not entirely. If you tell them that such a file -can contain MPEG1 video, they laugh at you. Feel free to kick their dumbass -faces, then tell them to RTFM.

+

It is important to clarify a common mistake. When people see a file with a +.AVI extension, they immediately conclude that it is not a MPEG file. +That is not true. At least not entirely. Contrary to popular belief such a file +can contain MPEG1 video.

-

You see, a codec isn't equal to a file format.
+

You see, a codec is not the same as a video format.
Video codecs are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.
Video formats are: MPG, AVI, ASF.

In theory, you can happily put an OpenDivX video and MP3 audio -into a .MPG format file. Though most players won't play it, since -they expect MPEG1 video and MP2 audio (.MPG doesn't have the +into a MPG format file. Most players will not play it, though, since +they expect MPEG1 video and MP2 audio (.MPG does not have the necessary fields to describe its video and audio streams, like .AVI -does). Or put MPEG1 video to an .AVI. For example ffmpeg +does). Or you might put MPEG1 video into an .AVI file. FFmpeg and MEncoder can create these files.

-

Audio codecs and formats are basically the same terms.

+

In contrast to that audio codecs and audio formats are basically the same terms.

2.1.1. Video formats

@@ -41,73 +40,73 @@

2.1.1.1. MPEG files

-

  • MPG : this is the most basic form of MPEG file formats. Contains -MPEG1 video, and MP2 (MPEG-1 layer 2) audio, or rarely MP1.
  • -
  • DAT : this is the very same format as MPG, just different extension. Used -on Video CDs. Due to the nature VCDs are created and Linux is designed, -the DAT files can't be played nor copied from VCDs. You have to use the --vcd option to play the VideoCD.
  • -
  • VOB : this is the MPEG file format on DVDs. The same as MPG, plus -capability to contain subtitles, or non-MPEG (AC3) audio. Contains encoded MPEG2 -video, and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed too.
    +
  • MPG : This is the most basic form of the MPEG file formats. It contains +MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.
  • +
  • DAT : This is the very same format as MPG with a different extension. It is used +on Video CDs. Due to the way VCDs are created and Linux is designed, +the DAT files cannot be played nor copied from VCDs. You have to use the +-vcd option to play the Video CD.
  • +
  • VOB : This is the MPEG file format on DVDs. 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.
    Read the DVD section !
  • -

    In MPEG files, series of frames are grouped together, and are independent -from the other groups. What this means is you can cut/join an MPEG file with -standard file-tools (like dd, cut), and it remains completely functional.

    +

    Series of frames form independent groups in MPEG files. This means that you +can cut/join an MPEG file with standard file tools (like dd, cut), and it +remains completely functional.

    -

    One important feature for MPGs is that they have a field to describe +

    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 -it's played at 640x480. AVI files don't have this field, so one has to -rescale it during encoding or use option -aspect at playback.

    +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 -aspect option.

    2.1.1.2. AVI files

    -

    Designed by Micro$oft, the AVI (Audio Video Interleaved) is a -widespread multipurpose format, currently used mostly for DivX and DivX4 -videos. Has many known drawbacks, and inabilities (for example in streaming). -Has support for one video stream, and 0 to 99 audio streams. Can be as big as -2Gb. There exists an extension for it to be bigger, called OpenDMS. -M$ currently strongly discourages its use and propagates ASF/WMV. Not if +

    Designed by Micro$oft, AVI (Audio Video Interleaved) 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 and can be as big as +2GB. There exists an extension allowing bigger files called OpenDMS. +M$ currently strongly discourages its use and encourages ASF/WMV. Not that anybody cares.
    -NOTE : DV cameras can create two types of AVI format, one is the usual and +NOTE: DV cameras can create two types of AVI formats. One is common and playable, the other is neither.

    There are two kinds of AVI files:

    -

    MPlayer supports 2 kind of timing for AVI files: +

    MPlayer supports two kinds of timings for AVI files:

    -

    Any audio and video codec is allowed, but note that VBR audio isn't well -supported by most of the players. The file format makes it possible to use VBR +

    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 -unusual, and Microsoft's AVI specs only describe CBR audio. I also note, that -most AVI encoders/multiplexers create bad files if using VBR audio. Only 2 -exception (known by me): NaNDub and MEncoder.

    +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 exceptions (known to me): NaNDub and MEncoder.

    2.1.1.3. ASF/WMV files

    @@ -115,35 +114,35 @@

    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 (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's +and patented :). Of course they differ, there is no compatibility at all (it is just another legal game). MPlayer supports only v1.0, as nobody has ever seen -v2.0 files :) . Note, that .ASF files nowdays come with the extension .WMA or +v2.0 files :). Note that .ASF files nowadays come with the extension .WMA or .WMV.

    2.1.1.4. QuickTime/MOV files

    -

    These are from Macintosh. Usually have extensions of .QT or .MOV . Note -that since the MPEG4 Group chose QuickTime as the recommended file format -for MPEG4, their .MOV files come with .MPG or .MP4 extension (interesting -that in these files the video stream is a real .MPG file. With the +

    These are from the Macintosh. They usually have a .QT or .MOV extension. Note +that since the MPEG4 group chose QuickTime as the recommended file format +for MPEG4, their .MOV files come with a .MPG or .MP4 extension (Interestingly +the video stream in these files is a real .MPG file. With the -dumpvideo option you can even extract it.).

    -

    Codecs: any codecs allowed, both CBR and VBR. Note: most new mov files use -Sorenson video and QDesign Music audio. These formats are completely -secret, and only Apple's quicktime player is able to play these files (on +

    Codecs: Any codec is allowed, both CBR and VBR. Note: most new QuickTime files use +Sorensen video and QDesign Music audio. These formats are completely +secret, and only Apple's QuickTime player is able to play these files (on win/mac only).

    2.1.1.5. VIV files

    -

    MPlayer happily demuxes VIVO file formats. The format's big -disadvantage is that it has no index block, nor fixed packetsize or sync bytes, +

    MPlayer 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!

    -

    VIVO/1.0 files' video codec is standard h.263 . The VIVO/2.0 files' -video codec is a modified, nonstandard h.263 . Audio is the same, -it may be g.723 (standard), or Vivo Siren .

    +

    The video codec of VIVO/1.0 files is standard h.263. The video codec +of VIVO/2.0 files is a modified, nonstandard h.263. The audio is the same, +it may be g.723 (standard), or Vivo Siren.

    See the VIVO video codec and VIVO audio codec sections for installation @@ -152,10 +151,10 @@

    2.1.1.6. FLI files

    -

    FLI is a very old fileformat used by Autodesk Animator, but it's -a common fileformat for short animations on the Net. MPlayer demuxes +

    FLI is a very old file format used by Autodesk Animator, but it is +a common file format for short animations on the net. MPlayer demuxes and decodes FLI movies and is even able to seek within them (useful when -looping with the -loop option). FLI files don't have keyframes, so picture +looping with the -loop option). FLI files do not have keyframes, so the picture will be messy for a short time after seeking.

    @@ -173,22 +172,22 @@ is a TV grabber tool (AFAIK:). MPlayer 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, MPlayer decodes (and also encodes them with MEncoder to -DivX/etc!) them all. Seeking is under implementation.

    +frames. MPlayer decodes (and also encodes them with MEncoder to +DivX/etc!) them all. Seeking is being implemented.

    2.1.1.9. yuv4mpeg files

    yuv4mpeg / yuv4mpeg2 is -a fileformat used by mjpegtools programs. +a file format used by the mjpegtools programs. You can grab, produce, filter or encode video in this format using these. -The file is really a sequence of uncompressed YUV 4:2:0 images. +The file format is really a sequence of uncompressed YUV 4:2:0 images.

    2.1.1.10. FILM files

    -

    This format is used on old Sega Saturn CD-ROM games.

    +

    This format is used on old Sega Saturn CD-Rom games.

    2.1.1.11. RoQ files

    @@ -199,10 +198,17 @@

    2.1.2. Audio formats

    -

    Currently MPlayer is still a Movie and not a Media -player, thus the pure audio formats (for example MP3, WAV, audio ASF) are -unplayable. Use xmms, mpg123 -or whatever.

    +

    MPlayer used to be a Movie and not a Media player. +This is slowly changing and MP3, OGG VORBIS, ASF, MP4 and WAV are currently +supported. Nevertheless the main focus is still video, so you may prefer to +use alternatives like xmms or +mpg123 instead.

    + +

    You may have problems playing certain MP3 files that MPlayer will +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 -demuxer flag described +in the manpage may help you in these cases.