Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] I want to play movies without hangs [SOLVED, sort of]
Date: Sun, 13 May 2012 23:56:24
Message-Id: CA+czFiA176JnKzVUDT8VnXSYK4TOH7_vh-8EkEguJBSNxOjKpw@mail.gmail.com
In Reply to: Re: [gentoo-user] I want to play movies without hangs [SOLVED, sort of] by Alan McKinnon
1 On Sun, May 13, 2012 at 7:27 PM, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
2 > On Sun, 13 May 2012 18:03:59 -0400
3 > Michael Mol <mikemol@×××××.com> wrote:
4 >
5 >> On Sun, May 13, 2012 at 5:33 PM, Alan McKinnon
6 >> <alan.mckinnon@×××××.com> wrote:
7 >> > On Sun, 13 May 2012 17:01:07 -0400
8 >> > Michael Mol <mikemol@×××××.com> wrote:
9 >> >
10 >> >> On Sun, May 13, 2012 at 4:53 PM, Alan McKinnon
11 >> >> <alan.mckinnon@×××××.com> wrote:
12 >> >> > On Sun, 13 May 2012 14:12:04 -0400
13 >> >> > Michael Mol <mikemol@×××××.com> wrote:
14 >> >> >
15 >> >> >> On Sun, May 13, 2012 at 4:56 AM, Alan McKinnon
16 >> >> >> <alan.mckinnon@×××××.com> wrote:
17 >> >> >> > [1] .avi files are notorious for this shit. It's what happens
18 >> >> >> > when you are Microsoft and you release any old crappy format
19 >> >> >> > without consulting the other experts out there (who will
20 >> >> >> > always outnumber you)
21 >> >> >>
22 >> >> >> Which better container formats were available at the time AVI
23 >> >> >> was released (1992)? The only contemporary container format I'm
24 >> >> >> aware of is RIFF, which came out in 1988. MPEG-1 didn't come
25 >> >> >> out until 1993, which was the same year the Ogg project
26 >> >> >> started. Real's stuff didn't come out until 1995. Matroska was
27 >> >> >> announced a decade later, in 2005.
28 >> >> >>
29 >> >> >> Matroska, MP4 and even OGG are nicer container formats, sure,
30 >> >> >> but they weren't around yet. And even with any of them, it's
31 >> >> >> perfectly possible to accidentally get A/V desync or stuttering
32 >> >> >> if you don't mux your streams properly.
33 >> >> >>
34 >> >> >> (This post draws heavily on Wikipedia for date information, and
35 >> >> >> dates may be considered only as accurate as Wikipedia...)
36 >> >> >>
37 >> >> >
38 >> >> > You missed the essence of my post entirely.
39 >> >>
40 >> >> Anti-Microsoft snark? I thought I was calling you on it.
41 >> >>
42 >> >
43 >> > I said .avi is a crappy format, and it is, that much is obvious to
44 >> > anyone who understands the simple basics of what a container should
45 >> > do.
46 >>
47 >> The MPEG group had only been formed four years prior to AVI's release,
48 >> and didn't release their first standard until a year later. Meanwhile,
49 >> Microsoft needed a video file format that:
50 >>
51 >> 1) Was a file format that sat on disk
52 >> 2) Synchronized audio and video
53 >
54 >
55 > This is the part they got wrong.
56 >
57 > Would you not agree that this is the second-most important feature
58 > required, where the ability to actually play the audio/video at all is
59 > the first?
60
61 You're going to have to go into detail. Last I checked, old versions
62 of Windows shipped with AVI files for their animations, and those AVI
63 files played fine. So it _sounds_ like they're able to play video, at
64 least.
65
66 And my largish collection of AMVs and videos I've put together myself
67 suggest that AVI can play synchronized audio and video.
68
69 > Getting that wrong is to me akin to building a car and forgetting to
70 > provide it with an adequate means of stopping. There are many other
71 > things that can be forgiven where one would need a predictive crystal
72 > ball, but needing time sync information in the container is just simply
73 > self-evident.
74
75 Only if you anticipate your audio and video streams deviating from
76 intended usages. AVI is used for far more things than it was designed
77 to do. Reading deeper into its history, it sounds like it was embraced
78 and extended by entities outside of Microsoft to do things it wasn't
79 designed for in the first place. So expecting it to handle VBR audio
80 or video with predictive frames is kinda like putting a supercharger
81 in a Pinto and complaining when it winds up sitting on its own roof.
82
83 >
84 >
85 >
86 >
87 >> 3) Integrated cleanly with their being-developed operating system (AVI
88 >> is very closely related to the Video for Windows API. It's worth
89 >> noting that WMF, another Microsoft format from this time, is
90 >> essentially a serialized form of their drawing primitives.)
91 >> 4) Ran smoothly on an 80386 at 33MHz with a 16-bit, 8MHz data bus
92 >> between the CPU and persistent storage.
93 >>
94 >> With the exception of perhaps (3), those are the "basics." Consider
95 >> that this was released in 1992, and then consider that it had probably
96 >> been under development for at least a couple years prior.
97 >>
98 >> I won't disagree that AVI is a crappy format by today's standards, and
99 >> that it should be avoided where possible, but what you consider simple
100 >> and obvious today was *new* at the time, and so not simple and
101 >> obvious.
102 >
103 > I'm not talking about today's standards. I'm talking about 1992
104 > standards.
105
106 _Those standards didn't exist._ That's been my key point.
107
108 Yes, there was SMPTE, but that's for video recording and production
109 houses, and that was certainly not a planned usage for AVI.
110
111 >
112 > It's not reasonable to expect MS devs to anticipate algorithms that did
113 > not exist then, or hardware that was 10 years away, or even that the
114 > internet would be what it is. I do expect devs to get right aspects of
115 > their software that will be used right at the time it is released.
116
117 The earliest AVI files I'm aware of were sequences of RLE bitmaps, and
118 the code doing playback knew *exactly* what the framerate was, because
119 it knew what the video was for. Framerate support was added by
120 external parties because external parties wanted to extend AVI for
121 their own purposes. For that matter, AVI was an extension of RIFF.
122
123 >
124 >>
125 >> > It would have been obvious to the .avi developers then. And yet it
126 >> > somehow made it's way to market and got used extensively
127 >> >
128 >> > You asked what alternatives were available. That is not a question I
129 >> > asked. It matters nothing that the public used .avi so much (they
130 >> > had precious little in the way of choice). So whether they had
131 >> > alternatives or not is irrelevant.
132 >>
133 >> It's entirely relevant if you want to consider whether not the
134 >> expertise to come up with a 2012-modern format *existed* in the
135 >> lead-up time to 1992.
136 >
137 > Again, I'm not talking about 2012
138
139 No, but you're talking from the perspective of 2012, with a 20-year hindsight.
140
141 >
142 >>
143 >> >
144 >> > The entire gist of my post was about how .avi as it stands is crappy
145 >> > and should never have been released by an entity with the
146 >> > engineering clout of Microsoft as they don't have the excuse of
147 >> > being one dude in Mom's basement who didn't know better. They
148 >> > really should have known better.
149 >>
150 >> Seriously, why? Why do you think that the entire engineering clout of
151 >> a company which hadn't yet taken over the desktop market(!) would be
152 >> focused on perfecting AVI, one piece of a large,
153 >> already-late-to-market product? They had a bunch of difficult things
154 >> to pay attention to, such as mixing protected-mode and real-mode
155 >> applications on hardware in a task-switching environment, and working
156 >> around compatibility for programs whose developers still assumed they
157 >> had full run of the system. On a 386.
158 >>
159 >
160 > No, I expect them to get the basics right. Cars and brakes.
161
162 Pintos and superchargers. AVI does far more than what it was designed
163 for, and even what you want it to have been designed to do wasn't even
164 in the forecast in 1992. In 1992, the biggest and most interesting
165 applications were still conceptual derivatives of VisiCalc. (Actually,
166 that's probably still true today, but in 1992 there wasn't as big a
167 base of software developers to work other concepts.)
168
169 --
170 :wq