2764
|
1 1. Input layer, supported devices, methods:
|
|
2 - plain file, with seeking
|
|
3 - STDIN, without seeking backward
|
6051
|
4 - network streaming (currently plain wget-like HTTP and MMS (.asx))
|
2764
|
5 - VCD (Video CD) track, by direct CDROM device access (not requires mounting disc)
|
|
6 - DVD titles using .IFO structure, by direct DVD device access (not requires mounting disc)
|
6051
|
7 - DVD titles using menu navigation (experimental/alpha, not yet finished)
|
2764
|
8
|
|
9 2. Demuxer/parser layer, supported file/media formats:
|
|
10
|
|
11 - MPEG streams (ES,PES,PS. no TS support yet)
|
|
12 note: mpeg demuxer silently ignore non-mpeg content, and find mpeg packets
|
|
13 in arbitrary streams. it means you can play directly VCD images (for example
|
|
14 CDRwin's .BIN files) without extracting mpeg files first (with tools like vcdgear)
|
|
15 It accepts all PES variants, including files created by VDR.
|
|
16 Note: VOB (video object) is simple mpeg stream, but it usually has 01BD
|
2765
|
17 packets which may contain subtitles and non-mpeg audio. Usually found on DVD discs.
|
2764
|
18
|
2765
|
19 Headers: mpeg streams has no global header. each frame sequence (also called GOP,
|
2764
|
20 group of pictures) contains an sequence header, it describes that block.
|
2765
|
21 In normal mpeg 1/2 content there are groups of 12-15 frames (24/30 fps).
|
2764
|
22 It means you can freely seek in mpeg streams, and even can cut it to
|
|
23 small parts with standard file tools (dd, cut) without destroying it.
|
|
24
|
|
25 Codecs: video is always mpeg video (mpeg1, mpeg2 or mpeg4).
|
|
26 audio is usually mpeg audio (any layer allowed, but it's layer 2 in most files)
|
2765
|
27 but 01BD packets may contain AC3, DTS or LPCM too.
|
2764
|
28
|
2765
|
29 FPS: mpeg2 content allows variable framerate, in form of delayed frames.
|
|
30 It's mostly used for playback 24fps content at 29.97/30 fps (NTSC) rate.
|
2764
|
31 (so called Telecine or 3:2 pulldown effect)
|
|
32 It means you see 30 frames per second, but there are only 24 different
|
|
33 pictures and some of them are shown longer to fill 30 frame time.
|
|
34 If you encode such files with mencoder, using -ofps 24 or -ofps 23.98
|
|
35 is recommended.
|
|
36
|
|
37 - AVI streams.
|
|
38 Two kind of RIFF AVI files exists:
|
2855
|
39 1. interleaved: audio and video content is interleaved. it's faster and
|
2764
|
40 requires only 1 reading thread, so it's recommended (and mostly used).
|
|
41 2. non-interleaved: audio and video aren't interleaved, i mean first come
|
|
42 whole video followed by whole audio. it requires 2 reading process or
|
|
43 1 reading with lots of seeking. very bad for network or cdrom.
|
|
44 3. badly interleaved streams: mplayer detects interleaving at startup and
|
|
45 enables -ni option if it finds non-interleaved content. but sometimes
|
|
46 the stream seems to be interleaved, but with bad sync so it should be
|
|
47 played as non-interleaved otherwise you get a-v desync or buffer overflow.
|
2765
|
48
|
2764
|
49 MPlayer supports 2 kind of timing for AVI files:
|
2855
|
50 - bps-based: it is based on bitrate/samplerate of video/audio stream.
|
2764
|
51 this method is used by most players, including avifile and wmp.
|
|
52 files with broken headers, and files created with VBR audio but not
|
|
53 vbr-compliant encoder will result a-v desync with this method.
|
|
54 (mostly at seeking).
|
|
55 - interleaving-based: note: it can't be used togethwer with -ni
|
|
56 it doesn't use bitrate stuff of header, it uses the relative position
|
|
57 of interleaved audio and video chunks. makes some badly encoded file
|
|
58 with vbr audio playable.
|
|
59
|
|
60 Headers: AVI files has a mandatory header at the begin of the file,
|
|
61 describing video parameters (resolution, fps) and codecs. Optionally
|
|
62 they have an INDEX block at the end of the file. It's optional, but
|
2865
|
63 most files has such block, because it's REQUIRED for seeking.
|
|
64 Btw usually it can be rebuilt from file content, mplayer does it with
|
2767
|
65 the -idx switch. Mplayer can recreate broken index blocks using -forceidx.
|
2764
|
66 As AVI files needs index for random access, broken files with no index
|
|
67 are usually unplayable.
|
|
68 Of course, cutting/joining AVI files needs special programs.
|
|
69
|
|
70 Codecs: any audio and video codecs allowed, but I note that VBR audio is
|
|
71 not well supported by most players. The file format makes it possible to
|
|
72 use VBR audio, but most players expect CBR audio and fails with VBR,
|
|
73 as VBR is unusual, and Microsoft's AVI specs only describe CBR audio.
|
|
74 I also note, that most AVI encoders/multiplexers create bad files if
|
|
75 using VBR audio. only 2 exception (known by me): NaNDub and MEncoder.
|
|
76
|
2855
|
77 FPS: only constant framerate allowed, but it's possible to skip frames.
|
2764
|
78
|
|
79 - ASF streams:
|
|
80 ASF (active streaming format) comes from Microsoft. they developed two
|
|
81 variant of ASF, v1.0 and v2.0. v1.0 is used by their media tools (wmp and
|
|
82 wme) and v2.0 is published and patented :). of course, they differ,
|
|
83 no compatibility at all. (it's just a legality game)
|
|
84 MPlayer supports only v1.0, as nobody ever seen v2.0 files :)
|
|
85 Note, that .ASF files are nowdays come with extension .WMA or .WMV.
|
|
86
|
|
87 Headers: Stream headers (codecs parameters) can be everywhere (in theory),
|
|
88 but all files i've seen had it at the beginning of the file.
|
|
89 Asf uses fixed packet size, so it is seekable without any INDEX block,
|
|
90 and broken files are playable well.
|
|
91
|
2765
|
92 Codecs: video is mostly microsoft's mpeg4 variants: MP42, MP43 (aka DivX),
|
2764
|
93 WMV1 and WMV2. but any codecs allowed.
|
2767
|
94 audio is usually wma or voxware, sometimes mp3, but any codecs allowed.
|
2764
|
95
|
|
96 FPS: no fixed fps, every video frame has an exact timestamp instead.
|
|
97 I've got stream with up to 3 sec frame display times.
|
|
98
|
|
99 - QuickTime / MOV files:
|
|
100 They come from Mac users, usually with .mov or .qt extension, but as
|
2865
|
101 MPEG Group chose quicktime as recommended file format for MPEG4,
|
2767
|
102 sometimes you meet quicktime files with .mpg or .mp4 extension.
|
2764
|
103
|
|
104 At first look, it's a mixture of ASF and AVI.
|
|
105 It requires INDEX block for random access and seeking, and even for
|
|
106 playback, like AVI, but uses timestamps instead of constant framerate
|
|
107 and has more flexible stream options (including network stuff) like ASF.
|
|
108
|
|
109 Headers: header can be placed at the beginning or at the end of file.
|
|
110 About half of my files has it at the begining, others has it at the end.
|
|
111 Broken files are only playable if they have header at the beginning!
|
|
112
|
|
113 Codecs: any codecs allowed, both CBR and VBR.
|
2767
|
114 Note: most new mov files use Sorenson video and QDesign Music audio,
|
|
115 they are patented, closed, secret, (TM)-ed etc formats, only Apple's
|
|
116 quicktime player is able to playback these files (on win/mac only).
|
2764
|
117
|
|
118 - VIVO files:
|
|
119 They are funny streams. They have a human-readable ascii header at
|
|
120 the beginning, followed by interleaved audio and video chunks.
|
|
121 It has no index block, has no fixed packetsize or sync bytes, and most
|
|
122 files even has no keyframes, so forget seeking!
|
|
123 Video is standard h.263 (in vivo/2.0 files it's modified, non-standard
|
|
124 h.263), audio is either standard g.723 or Vivo Siren codec.
|
|
125
|
|
126 Note, that microsoft licensed vivo stuff, and included in their netshow
|
|
127 v2.0 program, so there are VfW/ACM codecs for vivo video and audio.
|
|
128
|