2.1. Supported formats

MPlayer can read/play from the following devices/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.

You see, a codec isn't equal to a file 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 necessary fields to describe its video and audio streams, like .AVI does). Or put MPEG1 video to an .AVI. For example ffmpeg can create these files.

Audio codecs and formats are basically the same terms.

2.1.1. Video formats

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 MP2 is 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.

    One important feature for 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.

    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 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 anybody cares.
    NOTE : DV cameras can create two types of AVI format, one is the usual and playable, the other is neither.

    There are two kinds of AVI files:

    MPlayer supports 2 kind of timing 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 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.

    2.1.1.3. ASF/WMV files

    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 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 .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 -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 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, 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 .

    See the VIVO video codec and VIVO audio codec sections for installation instructions.

    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 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 will be messy for a short time after seeking.

    2.1.1.7. RealMedia (RM) files

    Yes, MPlayer can read (demux) RealMedia (.rm) files. Seeking is under implementation, and RM has keyframes so it will be flawless. Here are the lists of the supported RealVideo and RealAudio codecs.

    2.1.1.8. NuppelVideo files

    NuppelVideo 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.

    2.1.1.9. yuv4mpeg files

    yuv4mpeg / yuv4mpeg2 is also a fileformat for TV grabbing, or so :) I know only one thing about it: we support it.

    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.