Initial commit
[biamove.git] / doc / biamove-doc.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >BiaMovE documentation</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
9 ><BODY
10 CLASS="BOOK"
11 ><DIV
12 CLASS="BOOK"
13 ><A
14 NAME="AEN1"
15 ></A
16 ><DIV
17 CLASS="TITLEPAGE"
18 ><H1
19 CLASS="TITLE"
20 ><A
21 NAME="AEN1"
22 ><SPAN
23 CLASS="APPLICATION"
24 >BiaMovE</SPAN
25 > documentation</A
26 ></H1
27 ><H3
28 CLASS="AUTHOR"
29 ><A
30 NAME="AEN5"
31 ></A
32 >Harishankar V</H3
33 ><DIV
34 ><DIV
35 CLASS="ABSTRACT"
36 ><P
37 ></P
38 ><A
39 NAME="AEN8"
40 ></A
41 ><P
42 >A short guide to video encoding using <SPAN
43 CLASS="APPLICATION"
44 >BiaMovE</SPAN
45 > (via <SPAN
46 CLASS="APPLICATION"
47 >Mencoder</SPAN
48 >)</P
49 ><P
50 ></P
51 ></DIV
52 ></DIV
53 ><HR></DIV
54 ><DIV
55 CLASS="TOC"
56 ><DL
57 ><DT
58 ><B
59 >Table of Contents</B
60 ></DT
61 ><DT
62 >1. <A
63 HREF="#INTRO"
64 >Introduction</A
65 ></DT
66 ><DD
67 ><DL
68 ><DT
69 ><A
70 HREF="#WHY"
71 >Why <SPAN
72 CLASS="APPLICATION"
73 >Mencoder</SPAN
74 ></A
75 ></DT
76 ><DT
77 ><A
78 HREF="#PHILOSOPHY"
79 >Philosophy</A
80 ></DT
81 ></DL
82 ></DD
83 ><DT
84 >2. <A
85 HREF="#VIDEOBASICS"
86 >Video encoding basics</A
87 ></DT
88 ><DD
89 ><DL
90 ><DT
91 ><A
92 HREF="#THEPROBLEMS"
93 >The problems</A
94 ></DT
95 ><DT
96 ><A
97 HREF="#CONCEPTS"
98 >Concepts</A
99 ></DT
100 ><DD
101 ><DL
102 ><DT
103 ><A
104 HREF="#BITRATE"
105 >Bitrate</A
106 ></DT
107 ><DT
108 ><A
109 HREF="#FRAMERATE"
110 >Framerate</A
111 ></DT
112 ></DL
113 ></DD
114 ></DL
115 ></DD
116 ></DL
117 ></DIV
118 ><DIV
119 CLASS="CHAPTER"
120 ><HR><H1
121 ><A
122 NAME="INTRO"
123 ></A
124 >Chapter 1. Introduction</H1
125 ><P
126 > <SPAN
127 CLASS="APPLICATION"
128 >BiaMovE</SPAN
129 > (pronounced "by-a-movie") is a graphical user interface to <A
130 HREF="http://www.mplayerhq.hu/"
131 TARGET="_top"
132 ><SPAN
133 CLASS="APPLICATION"
134 >Mencoder</SPAN
135 ></A
136 >, an extremely powerful and versatile cross-platform video encoding command-line utility. The problem with <SPAN
137 CLASS="APPLICATION"
138 >Mencoder</SPAN
139 > is that it is very complex and non-trivial to lay users.
140 </P
141 ><P
142 > Adding to the complexity is the existence/non-existence of video/audio codecs, proprietary technologies and technical terminology related to audio and video. I had a very difficult time poring over the <SPAN
143 CLASS="APPLICATION"
144 >Mencoder</SPAN
145 > documentation to find specific options so I decided that while I was learning how to use it, why not create a GUI front-end for it?
146 </P
147 ><DIV
148 CLASS="SECT1"
149 ><HR><H2
150 CLASS="SECT1"
151 ><A
152 NAME="WHY"
153 >Why <SPAN
154 CLASS="APPLICATION"
155 >Mencoder</SPAN
156 ></A
157 ></H2
158 ><P
159 > Why <SPAN
160 CLASS="APPLICATION"
161 >Mencoder</SPAN
162 > and why not <SPAN
163 CLASS="APPLICATION"
164 >FFMpeg</SPAN
165 >? Well, for one, <SPAN
166 CLASS="APPLICATION"
167 >Mencoder</SPAN
168 > can wrap around <SPAN
169 CLASS="APPLICATION"
170 >FFMpeg</SPAN
171 > libraries using <TT
172 CLASS="FILENAME"
173 >libavcodec</TT
174 >. Secondly I found using the <SPAN
175 CLASS="APPLICATION"
176 >FFMpeg</SPAN
177 > command line much easier than <SPAN
178 CLASS="APPLICATION"
179 >Mencoder</SPAN
180 > and felt that it would be better to write a GUI around <SPAN
181 CLASS="APPLICATION"
182 >Mencoder</SPAN
183 > instead.
184 </P
185 ></DIV
186 ><DIV
187 CLASS="SECT1"
188 ><HR><H2
189 CLASS="SECT1"
190 ><A
191 NAME="PHILOSOPHY"
192 >Philosophy</A
193 ></H2
194 ><P
195 > When I wrote <SPAN
196 CLASS="APPLICATION"
197 >BiaMovE</SPAN
198 > I wanted to mainly explore the codec-specific options of <SPAN
199 CLASS="APPLICATION"
200 >Mencoder</SPAN
201 >. I did so because video/audio codecs are extremely complex creatures. I cannot pretend that I understood everything I read in the <SPAN
202 CLASS="APPLICATION"
203 >Mencoder</SPAN
204 > manual pages. With <SPAN
205 CLASS="APPLICATION"
206 >BiaMovE</SPAN
207 > I've tried to hide a little bit of the complexity, but without restricting the advanced user.
208 </P
209 ><P
210 > <SPAN
211 CLASS="APPLICATION"
212 >BiaMovE</SPAN
213 > is not a tool for the newbie though. It is just a thin (albeit useful) GUI wrapper to <SPAN
214 CLASS="APPLICATION"
215 >Mencoder</SPAN
216 >. It does <SPAN
217 CLASS="emphasis"
218 ><I
219 CLASS="EMPHASIS"
220 >not</I
221 ></SPAN
222 >:
223 <P
224 ></P
225 ><UL
226 ><LI
227 ><P
228 >Check for the sanity of your <SPAN
229 CLASS="APPLICATION"
230 >Mencoder</SPAN
231 > configuration, nor does it check for codec availability on your setup.</P
232 ></LI
233 ><LI
234 ><P
235 >Does not verify the sanity of your options. It just passes on your choices to the underlying <SPAN
236 CLASS="APPLICATION"
237 >Mencoder</SPAN
238 > command line.</P
239 ></LI
240 ></UL
241 >
242 </P
243 ><P
244 > Along the way, I've been bumbling along, discovering by trial and error, by experimentation and research, the proper way to mix video and audio codecs and produce valid video streams. If you are a newbie to video encoding and want to learn more, I suggest your read the section on <A
245 HREF="#VIDEOBASICS"
246 >video encoding basics</A
247 > and also study the <SPAN
248 CLASS="APPLICATION"
249 >Mencoder</SPAN
250 > manual pages in depth.
251 </P
252 ></DIV
253 ></DIV
254 ><DIV
255 CLASS="CHAPTER"
256 ><HR><H1
257 ><A
258 NAME="VIDEOBASICS"
259 ></A
260 >Chapter 2. Video encoding basics</H1
261 ><P
262 > Before you jump into video encoding, it's useful to understand a few video (and audio) related concepts. This will help you exploit the full power of <SPAN
263 CLASS="APPLICATION"
264 >BiaMovE</SPAN
265 > and <SPAN
266 CLASS="APPLICATION"
267 >Mencoder</SPAN
268 >. While most of the information here is common knowledge, I've documented some of my thoughts and discoveries in an easily accessible manner. However, before you dive in, I suggest you read the <A
269 HREF="#CONCEPTS"
270 >concepts</A
271 > section for definitions to common terms specific to digital audio/video technologies.
272 </P
273 ><P
274 > If you are of the "just want to rip my DVDs to my iPod" type, feel free to skip this section.
275 </P
276 ><DIV
277 CLASS="SECT1"
278 ><HR><H2
279 CLASS="SECT1"
280 ><A
281 NAME="THEPROBLEMS"
282 >The problems</A
283 ></H2
284 ><P
285 > For most people simply using a command-line tool like <SPAN
286 CLASS="APPLICATION"
287 >Mencoder</SPAN
288 > can be a daunting task. The <SPAN
289 CLASS="APPLICATION"
290 >Mencoder</SPAN
291 > manual page alone is scary enough, because it documents both the player <SPAN
292 CLASS="APPLICATION"
293 >MPlayer</SPAN
294 > as well as the encoder.
295 </P
296 ><P
297 > Apart from the command-line itself, video and audio codecs are complex and tricky subjects in themselves. Apart from the variety of standards and formats adopted by different organizations (for instance, <ABBR
298 CLASS="ABBREV"
299 >MPEG-4</ABBR
300 >, <ABBR
301 CLASS="ABBREV"
302 >H.264</ABBR
303 >, <ACRONYM
304 CLASS="ACRONYM"
305 >DivX</ACRONYM
306 >, <ACRONYM
307 CLASS="ACRONYM"
308 >XViD</ACRONYM
309 > etc.), there exists hundreds of specifications within even these formats. Worse still, many of these standards are not compatible with each other and many video players, particularly hardware players, do not recognize open standards codecs (the <SPAN
310 CLASS="TRADEMARK"
311 >Apple iPod</SPAN
312 >&#8482; is a case in point).
313 </P
314 ><P
315 > Complicating it is the fact that not all muxers (container formats) work with all codecs and not all video and audio codecs are compatible with each other. Again, certain codecs provide very sane default parameters while other codecs require to be told exactly how to encode the underlying data. Last, but not least, some codecs are plain buggy and broken or don't work very well with <SPAN
316 CLASS="APPLICATION"
317 >Mencoder</SPAN
318 >.
319 </P
320 ><P
321 > <SPAN
322 CLASS="APPLICATION"
323 >BiaMovE</SPAN
324 > cannot overcome these problems for you for the reasons already mentioned earlier. However reading these notes should help you avoid some of the pitfalls.
325 </P
326 ></DIV
327 ><DIV
328 CLASS="SECT1"
329 ><HR><H2
330 CLASS="SECT1"
331 ><A
332 NAME="CONCEPTS"
333 >Concepts</A
334 ></H2
335 ><DIV
336 CLASS="SECT2"
337 ><H3
338 CLASS="SECT2"
339 ><A
340 NAME="BITRATE"
341 >Bitrate</A
342 ></H3
343 ><P
344 > Bitrate is the number of bits which encode the information per unit of time. It is usually measured in kilobits per second (kbit/s) or megabits per second (mbit/s). In practical terms, higher the bitrate, higher the quality of the information stored (whether video or audio).
345 </P
346 ><P
347 > The best bitrate depends on several factors including desired video/audio quality versus size trade-off, the resolution of the video as well as the number of frames per second.
348 </P
349 ></DIV
350 ><DIV
351 CLASS="SECT2"
352 ><HR><H3
353 CLASS="SECT2"
354 ><A
355 NAME="FRAMERATE"
356 >Framerate</A
357 ></H3
358 ><P
359 > Framerate is the number of frames per unit time. Frames may be audio or video frames. Think of a single frame as a still. Over the years, different video standards (<ACRONYM
360 CLASS="ACRONYM"
361 >PAL</ACRONYM
362 >, <ABBR
363 CLASS="ABBREV"
364 >NTSC</ABBR
365 > etc.) have evolved and use standard framerates (24.997 fps, 25 fps, 29.997 fps, 30 fps etc.) but theoritically any video can have any framerate or even variable framerates.
366 </P
367 ><P
368 > The higher the framerate, smoother the animation. Usually 25 to 30 fps is more than enough for the human eye.
369 </P
370 ></DIV
371 ></DIV
372 ></DIV
373 ></DIV
374 ></BODY
375 ></HTML
376 >