Statistics
| Branch: | Revision:

ffmpeg / doc / ffmpeg-doc.texi @ da9c9637

History | View | Annotate | Download (32.6 KB)

1 9181577c Fabrice Bellard
\input texinfo @c -*- texinfo -*-
2
3
@settitle FFmpeg Documentation
4
@titlepage
5
@sp 7
6
@center @titlefont{FFmpeg Documentation}
7
@sp 3
8
@end titlepage
9
10
11
@chapter Introduction
12
13
FFmpeg is a very fast video and audio converter. It can also grab from
14
a live audio/video source.
15
  
16
The command line interface is designed to be intuitive, in the sense
17
that ffmpeg tries to figure out all the parameters, when
18
possible. You have usually to give only the target bitrate you want.
19
20
FFmpeg can also convert from any sample rate to any other, and resize
21
video on the fly with a high quality polyphase filter.
22
23
@chapter Quick Start
24
25 e99c4e10 Fabrice Bellard
@c man begin EXAMPLES
26 9181577c Fabrice Bellard
@section Video and Audio grabbing
27
28 e99c4e10 Fabrice Bellard
FFmpeg can use a video4linux compatible video source and any Open Sound
29
System audio source:
30
31 9181577c Fabrice Bellard
@example
32 e99c4e10 Fabrice Bellard
ffmpeg /tmp/out.mpg 
33 9181577c Fabrice Bellard
@end example
34
35 e99c4e10 Fabrice Bellard
Note that you must activate the right video source and channel before
36
launching ffmpeg. You can use any TV viewer such as xawtv
37
(@url{http://bytesex.org/xawtv/}) by Gerd Knorr which I find very
38
good. You must also set correctly the audio recording levels with a
39
standard mixer.
40 9181577c Fabrice Bellard
41 6bf40f39 Philip Gladstone
@section Video and Audio file format conversion
42 9181577c Fabrice Bellard
43
* ffmpeg can use any supported file format and protocol as input: 
44
45
Examples:
46
47
* You can input from YUV files:
48
49
@example
50 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/test%d.Y /tmp/out.mpg 
51 9181577c Fabrice Bellard
@end example
52
53 e99c4e10 Fabrice Bellard
It will use the files: 
54 9181577c Fabrice Bellard
@example
55 e99c4e10 Fabrice Bellard
/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
56
/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
57 9181577c Fabrice Bellard
@end example
58
59 e99c4e10 Fabrice Bellard
The Y files use twice the resolution of the U and V files. They are
60
raw files, without header. They can be generated by all decent video
61
decoders. You must specify the size of the image with the @option{-s} option
62
if ffmpeg cannot guess it.
63 9181577c Fabrice Bellard
64
* You can input from a RAW YUV420P file:
65
66
@example
67 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/test.yuv /tmp/out.avi
68 9181577c Fabrice Bellard
@end example
69
70 e99c4e10 Fabrice Bellard
The RAW YUV420P is a file containing RAW YUV planar, for each frame first
71
come the Y plane followed by U and V planes, which are half vertical and
72
horizontal resolution.
73 9181577c Fabrice Bellard
74
* You can output to a RAW YUV420P file:
75
76
@example
77 e99c4e10 Fabrice Bellard
ffmpeg -i mydivx.avi -o hugefile.yuv
78 9181577c Fabrice Bellard
@end example
79
80
* You can set several input files and output files:
81
82
@example
83 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
84 9181577c Fabrice Bellard
@end example
85
86 e99c4e10 Fabrice Bellard
Convert the audio file a.wav and the raw yuv video file a.yuv
87
to mpeg file a.mpg
88 9181577c Fabrice Bellard
89 6bf40f39 Philip Gladstone
* You can also do audio and video conversions at the same time:
90 9181577c Fabrice Bellard
91
@example
92 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
93 9181577c Fabrice Bellard
@end example
94
95 e99c4e10 Fabrice Bellard
Convert the sample rate of a.wav to 22050 Hz and encode it to MPEG audio.
96 9181577c Fabrice Bellard
97
* You can encode to several formats at the same time and define a
98 e99c4e10 Fabrice Bellard
mapping from input stream to output streams:
99 9181577c Fabrice Bellard
100
@example
101 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
102 9181577c Fabrice Bellard
@end example
103
104 e99c4e10 Fabrice Bellard
Convert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '-map
105
file:index' specify which input stream is used for each output
106
stream, in the order of the definition of output streams.
107 9181577c Fabrice Bellard
108
* You can transcode decrypted VOBs
109
110
@example
111 e99c4e10 Fabrice Bellard
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
112 9181577c Fabrice Bellard
@end example
113
114 e99c4e10 Fabrice Bellard
This is a typical DVD ripper example, input from a VOB file, output
115
to an AVI file with MPEG-4 video and MP3 audio, note that in this
116
command we use B frames so the MPEG-4 stream is DivX5 compatible, GOP
117
size is 300 that means an INTRA frame every 10 seconds for 29.97 fps
118
input video.  Also the audio stream is MP3 encoded so you need LAME
119
support which is enabled using @code{--enable-mp3lame} when
120
configuring.  The mapping is particularly useful for DVD transcoding
121
to get the desired audio language.
122 9181577c Fabrice Bellard
123 e99c4e10 Fabrice Bellard
NOTE: to see the supported input formats, use @code{ffmpeg -formats}.
124
@c man end
125 9181577c Fabrice Bellard
126
@chapter Invocation
127
128
@section Syntax
129
130 e99c4e10 Fabrice Bellard
The generic syntax is:
131 9181577c Fabrice Bellard
132
@example 
133 e99c4e10 Fabrice Bellard
@c man begin SYNOPSIS
134 28f88dc8 Michael Niedermayer
ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
135 e99c4e10 Fabrice Bellard
@c man end
136 9181577c Fabrice Bellard
@end example
137 e99c4e10 Fabrice Bellard
@c man begin DESCRIPTION
138
If no input file is given, audio/video grabbing is done.
139 9181577c Fabrice Bellard
140 e99c4e10 Fabrice Bellard
As a general rule, options are applied to the next specified
141
file. For example, if you give the @option{-b 64} option, it sets the video
142
bitrate of the next file. Format option may be needed for raw input
143
files.
144 9181577c Fabrice Bellard
145 e99c4e10 Fabrice Bellard
By default, ffmpeg tries to convert as losslessly as possible: it
146
uses the same audio and video parameter for the outputs as the one
147
specified for the inputs.
148
@c man end
149 9181577c Fabrice Bellard
150 e99c4e10 Fabrice Bellard
@c man begin OPTIONS
151 9181577c Fabrice Bellard
@section Main options
152
153 e99c4e10 Fabrice Bellard
@table @option
154 9181577c Fabrice Bellard
@item -L
155
show license
156 18bff752 Fabrice Bellard
157 9181577c Fabrice Bellard
@item -h
158 e99c4e10 Fabrice Bellard
show help
159 18bff752 Fabrice Bellard
160 e99c4e10 Fabrice Bellard
@item -formats
161 9181577c Fabrice Bellard
show available formats, codecs, protocols, ...
162 18bff752 Fabrice Bellard
163 9181577c Fabrice Bellard
@item -f fmt              
164
force format
165 18bff752 Fabrice Bellard
166 9181577c Fabrice Bellard
@item -i filename         
167
input file name
168
169
@item -y                  
170
overwrite output files
171
172
@item -t duration         
173
set the recording time in seconds. @code{hh:mm:ss[.xxx]} syntax is also
174
supported.
175
176 e83a84ac Benjamin Larsson
@item -ss position
177
seek to given time position. @code{hh:mm:ss[.xxx]} syntax is also
178
supported.
179
180 9181577c Fabrice Bellard
@item -title string       
181
set the title
182
183
@item -author string      
184
set the author
185
186
@item -copyright string   
187
set the copyright
188
189
@item -comment string     
190
set the comment
191
192 99db6420 Fabrice Bellard
@item -target type
193
specify target file type ("vcd", "svcd" or "dvd"). All the format
194
options (bitrate, codecs, buffer sizes) are automatically set by this
195
option. You can just type:
196
197
@example
198
ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
199
@end example
200
201
@item -hq
202 18bff752 Fabrice Bellard
activate high quality settings
203
204 401fbdde Michael Niedermayer
@item -itsoffset offset
205
set the input time offset in seconds. @code{[-]hh:mm:ss[.xxx]} syntax
206
is also supported.  This option affects all the input files that
207
follow it.  The offset is added to the input files' timestamps;
208
specifying a positive offset means that the corresponding streams are
209
delayed by 'offset' seconds.
210
211 9181577c Fabrice Bellard
@end table
212
213
@section Video Options
214
215 e99c4e10 Fabrice Bellard
@table @option
216 9181577c Fabrice Bellard
@item -b bitrate
217 18bff752 Fabrice Bellard
set the video bitrate in kbit/s (default = 200 kb/s)
218
@item -r fps           
219
set frame rate (default = 25)
220
@item -s size             
221 5ee03c86 Fabrice Bellard
set frame size. The format is @samp{WxH} (default 160x128).  The
222
following abbreviations are recognized:
223
@table @samp
224 18bff752 Fabrice Bellard
@item sqcif
225
128x96
226
@item qcif
227
176x144
228
@item cif
229
352x288
230
@item 4cif
231
704x576
232
@end table
233
234
@item -aspect aspect
235
set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
236
@item -croptop size
237
set top crop band size (in pixels)
238
@item -cropbottom size
239
set bottom crop band size (in pixels)
240
@item -cropleft size
241
set left crop band size (in pixels)
242
@item -cropright size
243
set right crop band size (in pixels)
244 1ff93ffc Todd Kirby
@item -padtop size
245
set top pad band size (in pixels)
246
@item -padbottom size
247
set bottom pad band size (in pixels)
248
@item -padleft size
249
set left pad band size (in pixels)
250
@item -padright size
251
set right pad band size (in pixels)
252 5b79a73e Todd Kirby
@item -padcolor (hex color)
253
set color of padded bands. The value for pad color is expressed 
254 1ff93ffc Todd Kirby
as a six digit hexidecimal number where the first two digits represent red, 
255
middle two digits green and last two digits blue. Defaults to 000000 (black)
256 9181577c Fabrice Bellard
@item -vn
257 18bff752 Fabrice Bellard
disable video recording
258 9181577c Fabrice Bellard
@item -bt tolerance       
259
set video bitrate tolerance (in kbit/s)
260 18bff752 Fabrice Bellard
@item -maxrate bitrate
261
set max video bitrate tolerance (in kbit/s)
262
@item -minrate bitrate
263
set min video bitrate tolerance (in kbit/s)
264
@item -bufsize size
265
set ratecontrol buffere size (in kbit)
266
@item -vcodec codec       
267 5ee03c86 Fabrice Bellard
force video codec to @var{codec}. Use the @code{copy} special value to
268
tell that the raw codec data must be copied as is.
269 18bff752 Fabrice Bellard
@item -sameq
270 9181577c Fabrice Bellard
use same video quality as source (implies VBR)
271
272
@item -pass n  
273 5ee03c86 Fabrice Bellard
select the pass number (1 or 2). It is useful to do two pass
274
encoding. The statistics of the video are recorded in the first pass and
275
the video at the exact requested bit rate is generated in the second
276
pass.
277 9181577c Fabrice Bellard
278
@item -passlogfile file   
279 5ee03c86 Fabrice Bellard
select two pass log file name to @var{file}.
280 9181577c Fabrice Bellard
281
@end table
282
283 18bff752 Fabrice Bellard
@section Advanced Video Options
284 9181577c Fabrice Bellard
285 e99c4e10 Fabrice Bellard
@table @option
286 9181577c Fabrice Bellard
@item -g gop_size         
287
set the group of picture size
288
@item -intra              
289
use only intra frames
290
@item -qscale q           
291
use fixed video quantiser scale (VBR)
292
@item -qmin q             
293
min video quantiser scale (VBR)
294
@item -qmax q             
295
max video quantiser scale (VBR)
296
@item -qdiff q            
297
max difference between the quantiser scale (VBR)
298
@item -qblur blur         
299
video quantiser scale blur (VBR)
300
@item -qcomp compression  
301
video quantiser scale compression (VBR)
302 18bff752 Fabrice Bellard
303
@item -rc_init_cplx complexity
304
initial complexity for 1-pass encoding
305
@item -b_qfactor factor
306
qp factor between p and b frames
307
@item -i_qfactor factor
308
qp factor between p and i frames
309
@item -b_qoffset offset
310
qp offset between p and b frames
311
@item -i_qoffset offset
312
qp offset between p and i frames
313
@item -rc_eq equation
314 5ee03c86 Fabrice Bellard
set rate control equation (@pxref{FFmpeg formula
315
evaluator}). Default is @code{tex^qComp}.
316
@item -rc_override override
317
rate control override for specific intervals
318 18bff752 Fabrice Bellard
@item -me method
319 5ee03c86 Fabrice Bellard
set motion estimation method to @var{method}. Available methods are
320
(from lower to best quality):
321 18bff752 Fabrice Bellard
@table @samp
322
@item zero
323 5ee03c86 Fabrice Bellard
Try just the (0, 0) vector.
324 18bff752 Fabrice Bellard
@item phods
325
@item log
326
@item x1
327
@item epzs
328
(default method)
329
@item full
330
exhaustive search (slow and marginally better than epzs)
331
@end table
332
333
@item -dct_algo algo
334 5ee03c86 Fabrice Bellard
set dct algorithm to @var{algo}. Available values are:
335 18bff752 Fabrice Bellard
@table @samp
336
@item 0
337
FF_DCT_AUTO (default)
338
@item 1
339
FF_DCT_FASTINT
340
@item 2
341
FF_DCT_INT
342
@item 3
343
FF_DCT_MMX
344
@item 4
345
FF_DCT_MLIB
346
@item 5
347
FF_DCT_ALTIVEC
348
@end table
349
350
@item -idct_algo algo
351 5ee03c86 Fabrice Bellard
set idct algorithm to @var{algo}. Available values are:
352 18bff752 Fabrice Bellard
@table @samp
353
@item 0
354
FF_IDCT_AUTO (default)
355
@item 1
356
FF_IDCT_INT          
357
@item 2
358
FF_IDCT_SIMPLE       
359
@item 3
360
FF_IDCT_SIMPLEMMX    
361
@item 4
362
FF_IDCT_LIBMPEG2MMX  
363
@item 5
364
FF_IDCT_PS2          
365
@item 6
366
FF_IDCT_MLIB         
367
@item 7
368
FF_IDCT_ARM          
369
@item 8
370
FF_IDCT_ALTIVEC      
371
@item 9
372
FF_IDCT_SH4          
373
@item 10
374
FF_IDCT_SIMPLEARM    
375
@end table
376
377
@item -er n
378 5ee03c86 Fabrice Bellard
set error resilience to @var{n}.
379 18bff752 Fabrice Bellard
@table @samp
380
@item 1 
381 5ee03c86 Fabrice Bellard
FF_ER_CAREFULL (default)
382 18bff752 Fabrice Bellard
@item 2
383 5ee03c86 Fabrice Bellard
FF_ER_COMPLIANT
384 18bff752 Fabrice Bellard
@item 3
385
FF_ER_AGGRESSIVE
386
@item 4
387
FF_ER_VERY_AGGRESSIVE
388
@end table
389
390 5ee03c86 Fabrice Bellard
@item -ec bit_mask
391
set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
392
the following values:
393 18bff752 Fabrice Bellard
@table @samp
394
@item 1
395 5ee03c86 Fabrice Bellard
FF_EC_GUESS_MVS (default=enabled)
396 18bff752 Fabrice Bellard
@item 2
397 5ee03c86 Fabrice Bellard
FF_EC_DEBLOCK (default=enabled)
398 18bff752 Fabrice Bellard
@end table
399
400
@item -bf frames
401 50f52fcd Fabrice Bellard
use 'frames' B frames (supported for MPEG-1, MPEG-2 and MPEG-4)
402 18bff752 Fabrice Bellard
@item -mbd mode
403
macroblock decision
404
@table @samp
405
@item 0
406
FF_MB_DECISION_SIMPLE: use mb_cmp (cannot change it yet in ffmpeg)
407
@item 1
408
FF_MB_DECISION_BITS: chooses the one which needs the fewest bits
409
@item 2
410
FF_MB_DECISION_RD: rate distoration
411
@end table
412
413
@item -4mv
414 9181577c Fabrice Bellard
use four motion vector by macroblock (only MPEG-4)
415 18bff752 Fabrice Bellard
@item -part
416
use data partitioning (only MPEG-4)
417
@item -bug param
418
workaround not auto detected encoder bugs
419
@item -strict strictness
420
how strictly to follow the standarts
421 5ee03c86 Fabrice Bellard
@item -aic
422
enable Advanced intra coding (h263+)
423
@item -umv
424
enable Unlimited Motion Vector (h263+)
425 18bff752 Fabrice Bellard
426
@item -deinterlace
427
deinterlace pictures
428 99db6420 Fabrice Bellard
@item -interlace
429
force interlacing support in encoder (only MPEG-2 and MPEG-4). Use this option
430
if your input file is interlaced and if you want to keep the interlaced
431
format for minimum losses. The alternative is to deinterlace the input
432
stream with @option{-deinterlace}, but deinterlacing introduces more
433
losses.
434 18bff752 Fabrice Bellard
@item -psnr
435
calculate PSNR of compressed frames
436
@item -vstats
437 5ee03c86 Fabrice Bellard
dump video coding statistics to @file{vstats_HHMMSS.log}.
438 18bff752 Fabrice Bellard
@item -vhook module
439
insert video processing @var{module}. @var{module} contains the module
440
name and its parameters separated by spaces.
441
@end table
442
443
@section Audio Options
444
445
@table @option
446
@item -ar freq    
447 5ee03c86 Fabrice Bellard
set the audio sampling freq (default = 44100 Hz)
448 18bff752 Fabrice Bellard
@item -ab bitrate 
449 5ee03c86 Fabrice Bellard
set the audio bitrate in kbit/s (default = 64)
450 18bff752 Fabrice Bellard
@item -ac channels
451 5ee03c86 Fabrice Bellard
set the number of audio channels (default = 1)
452
@item -an
453
disable audio recording
454
@item -acodec codec
455
force audio codec to @var{codec}. Use the @code{copy} special value to
456
tell that the raw codec data must be copied as is.
457 18bff752 Fabrice Bellard
@end table
458
459
@section Audio/Video grab options
460
461
@table @option
462
@item -vd device
463
set video grab device (e.g. @file{/dev/video0})
464
@item -vc channel
465
set video grab channel (DV1394 only)
466
@item -tvstd standard
467
set television standard (NTSC, PAL (SECAM))
468
@item -dv1394
469
set DV1394 grab
470
@item -ad device
471
set audio device (e.g. @file{/dev/dsp})
472
@end table
473
474
@section Advanced options
475
476
@table @option
477
@item -map file:stream    
478
set input stream mapping
479
@item -debug
480
print specific debug info
481 9181577c Fabrice Bellard
@item -benchmark          
482
add timings for benchmarking
483
@item -hex                
484
dump each input packet
485 18bff752 Fabrice Bellard
@item -bitexact
486
only use bit exact algorithms (for codec testing)
487
@item -ps size
488
set packet size in bits
489 5ee03c86 Fabrice Bellard
@item -re
490
read input at native frame rate. Mainly used to simulate a grab device.
491
@item -loop
492
loop over the input stream. Currently it works only for image
493
streams. This option is used for ffserver automatic testing.
494 9181577c Fabrice Bellard
@end table
495 18bff752 Fabrice Bellard
496
@node FFmpeg formula evaluator
497
@section FFmpeg formula evaluator
498
499
When evaluating a rate control string, FFmpeg uses an internal formula
500
evaluator. 
501
502
The following binary operators are available: @code{+}, @code{-},
503
@code{*}, @code{/}, @code{^}.
504
505
The following unary operators are available: @code{+}, @code{-},
506
@code{(...)}.
507
508
The following functions are available:
509
@table @var
510
@item sinh(x)
511
@item cosh(x)
512
@item tanh(x)
513
@item sin(x)
514
@item cos(x)
515
@item tan(x)
516
@item exp(x)
517
@item log(x)
518
@item squish(x)
519
@item gauss(x)
520
@item abs(x)
521
@item max(x, y)
522
@item min(x, y)
523
@item gt(x, y)
524
@item lt(x, y)
525
@item eq(x, y)
526
@item bits2qp(bits)
527
@item qp2bits(qp)
528
@end table
529
530
The following constants are available:
531
@table @var
532
@item PI
533
@item E
534
@item iTex
535
@item pTex
536
@item tex
537
@item mv
538
@item fCode
539
@item iCount
540
@item mcVar
541
@item var
542
@item isI
543
@item isP
544
@item isB
545
@item avgQP
546
@item qComp
547
@item avgIITex
548
@item avgPITex
549
@item avgPPTex
550
@item avgBPTex
551
@item avgTex
552
@end table
553
554 e99c4e10 Fabrice Bellard
@c man end
555
556
@ignore
557
558
@setfilename ffmpeg
559
@settitle FFmpeg video converter
560
561
@c man begin SEEALSO
562
ffserver(1), ffplay(1) and the html documentation of @file{ffmpeg}.
563
@c man end
564
565
@c man begin AUTHOR
566
Fabrice Bellard
567
@c man end
568
569
@end ignore
570 9181577c Fabrice Bellard
571
@section Protocols
572
573 47d944d2 Fabrice Bellard
The filename can be @file{-} to read from the standard input or to write
574
to the standard output.
575 9181577c Fabrice Bellard
576
ffmpeg handles also many protocols specified with the URL syntax.
577
578 e99c4e10 Fabrice Bellard
Use 'ffmpeg -formats' to have a list of the supported protocols.
579 9181577c Fabrice Bellard
580 e99c4e10 Fabrice Bellard
The protocol @code{http:} is currently used only to communicate with
581
ffserver (see the ffserver documentation). When ffmpeg will be a
582
video player it will also be used for streaming :-)
583 9181577c Fabrice Bellard
584
@chapter Tips
585
586
@itemize
587
@item For streaming at very low bit rate application, use a low frame rate
588 e99c4e10 Fabrice Bellard
and a small gop size. This is especially true for real video where
589
the Linux player does not seem to be very fast, so it can miss
590
frames. An example is:
591 9181577c Fabrice Bellard
592
@example
593 e99c4e10 Fabrice Bellard
ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
594 9181577c Fabrice Bellard
@end example
595
596
@item  The parameter 'q' which is displayed while encoding is the current
597 e99c4e10 Fabrice Bellard
quantizer. The value of 1 indicates that a very good quality could
598
be achieved. The value of 31 indicates the worst quality. If q=31
599
too often, it means that the encoder cannot compress enough to meet
600
your bit rate. You must either increase the bit rate, decrease the
601
frame rate or decrease the frame size.
602 9181577c Fabrice Bellard
603
@item If your computer is not fast enough, you can speed up the
604 e99c4e10 Fabrice Bellard
compression at the expense of the compression ratio. You can use
605
'-me zero' to speed up motion estimation, and '-intra' to disable
606
completely motion estimation (you have only I frames, which means it
607
is about as good as JPEG compression).
608 9181577c Fabrice Bellard
609
@item To have very low bitrates in audio, reduce the sampling frequency
610 e99c4e10 Fabrice Bellard
(down to 22050 kHz for mpeg audio, 22050 or 11025 for ac3).
611 9181577c Fabrice Bellard
612
@item To have a constant quality (but a variable bitrate), use the option
613 e99c4e10 Fabrice Bellard
'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
614
quality).
615 9181577c Fabrice Bellard
616
@item When converting video files, you can use the '-sameq' option which
617 e99c4e10 Fabrice Bellard
uses in the encoder the same quality factor than in the decoder. It
618
allows to be almost lossless in encoding.
619 9181577c Fabrice Bellard
620
@end itemize
621
622
@chapter Supported File Formats and Codecs
623
624
You can use the @code{-formats} option to have an exhaustive list.
625
626
@section File Formats
627
628 6bf40f39 Philip Gladstone
FFmpeg supports the following file formats through the @code{libavformat}
629 0699d2fe Fabrice Bellard
library:
630 9181577c Fabrice Bellard
631
@multitable @columnfractions .4 .1 .1
632
@item Supported File Format @tab Encoding @tab Decoding @tab Comments
633
@item MPEG audio @tab X @tab X
634
@item MPEG1 systems @tab X  @tab  X 
635
@tab muxed audio and video
636
@item MPEG2 PS @tab X  @tab  X 
637
@tab also known as @code{VOB} file
638
@item MPEG2 TS @tab    @tab  X 
639
@tab also known as DVB Transport Stream
640
@item ASF@tab X @tab X 
641
@item AVI@tab X @tab X 
642
@item WAV@tab X @tab X 
643
@item Macromedia Flash@tab X @tab X
644
@tab Only embedded audio is decoded
645 2eb5d024 Fabrice Bellard
@item FLV              @tab  X @tab X
646
@tab Macromedia Flash video files
647 9181577c Fabrice Bellard
@item Real Audio and Video @tab X @tab X 
648
@item Raw AC3 @tab X  @tab  X 
649
@item Raw MJPEG @tab X  @tab  X 
650
@item Raw MPEG video @tab X  @tab  X 
651
@item Raw PCM8/16 bits, mulaw/Alaw@tab X  @tab  X 
652 42cad81a Mike Melanson
@item Raw CRI ADX audio @tab X  @tab  X 
653 9181577c Fabrice Bellard
@item SUN AU format @tab X  @tab  X 
654 7fe4c823 Alex Beregszaszi
@item NUT @tab X @tab X @tab NUT Open Container Format
655 8a5483e7 Mike Melanson
@item Quicktime        @tab X @tab  X 
656
@item MPEG4            @tab X @tab  X 
657 9181577c Fabrice Bellard
@tab MPEG4 is a variant of Quicktime
658 0699d2fe Fabrice Bellard
@item Raw MPEG4 video  @tab  X @tab  X 
659 4fa1c4fa Roman Shaposhnik
@item DV               @tab  X @tab  X
660 701b603d Mike Melanson
@item 4xm              @tab    @tab X
661
@tab 4X Technologies format, used in some games
662 4d3b1f8d Mike Melanson
@item Playstation STR  @tab    @tab X
663
@item Id RoQ           @tab    @tab X
664
@tab used in Quake III, Jedi Knight 2, other computer games
665
@item Interplay MVE    @tab    @tab X
666
@tab format used in various Interplay computer games
667 b17e9c99 Mike Melanson
@item WC3 Movie        @tab    @tab X
668
@tab multimedia format used in Origin's Wing Commander III computer game
669 2fdf638b Mike Melanson
@item Sega FILM/CPK    @tab    @tab X
670
@tab used in many Sega Saturn console games
671
@item Westwood Studios VQA/AUD  @tab    @tab X
672
@tab Multimedia formats used in Westwood Studios games
673 4120a53a Mike Melanson
@item Id Cinematic (.cin) @tab    @tab X
674
@tab Used in Quake II
675 42cad81a Mike Melanson
@item FLIC format      @tab    @tab X
676
@tab .fli/.flc files
677 da00f30e Mike Melanson
@item Sierra VMD       @tab    @tab X
678
@tab used in Sierra CD-ROM games
679 38088adf Mike Melanson
@item Matroska         @tab    @tab X
680 9181577c Fabrice Bellard
@end multitable
681
682
@code{X} means that the encoding (resp. decoding) is supported.
683
684 0699d2fe Fabrice Bellard
@section Image Formats
685
686
FFmpeg can read and write images for each frame of a video sequence. The
687
following image formats are supported:
688
689
@multitable @columnfractions .4 .1 .1
690
@item Supported Image Format @tab Encoding @tab Decoding @tab Comments
691
@item PGM, PPM     @tab X @tab X 
692 2eb5d024 Fabrice Bellard
@item PAM          @tab X @tab X @tab PAM is a PNM extension with alpha support
693
@item PGMYUV       @tab X @tab X @tab PGM with U and V components in YUV 4:2:0
694 0699d2fe Fabrice Bellard
@item JPEG         @tab X @tab X @tab Progressive JPEG is not supported
695
@item .Y.U.V       @tab X @tab X @tab One raw file per component
696 2eb5d024 Fabrice Bellard
@item Animated GIF @tab X @tab X @tab Only uncompressed GIFs are generated
697
@item PNG          @tab X @tab X @tab 2 bit and 4 bit/pixel not supported yet
698 6a91ec51 Mike Melanson
@item SGI          @tab X @tab X @tab SGI RGB image format
699 0699d2fe Fabrice Bellard
@end multitable
700
701
@code{X} means that the encoding (resp. decoding) is supported.
702
703 9181577c Fabrice Bellard
@section Video Codecs
704
705
@multitable @columnfractions .4 .1 .1 .7
706
@item Supported Codec @tab Encoding @tab Decoding @tab Comments
707 4745b5bf Fabrice Bellard
@item MPEG1 video            @tab  X  @tab  X
708 50f52fcd Fabrice Bellard
@item MPEG2 video            @tab  X  @tab  X 
709 9181577c Fabrice Bellard
@item MPEG4                  @tab  X  @tab  X @tab Also known as DIVX4/5
710
@item MSMPEG4 V1             @tab  X  @tab  X
711
@item MSMPEG4 V2             @tab  X  @tab  X
712
@item MSMPEG4 V3             @tab  X  @tab  X @tab Also known as DIVX3
713
@item WMV7                   @tab  X  @tab  X
714 701b603d Mike Melanson
@item WMV8                   @tab  X  @tab  X @tab Not completely working
715 9181577c Fabrice Bellard
@item H263(+)                @tab  X  @tab  X @tab Also known as Real Video 1.0
716
@item MJPEG                  @tab  X  @tab  X 
717 d6896c49 Alex Beregszaszi
@item Lossless MJPEG         @tab  X  @tab  X
718
@item Apple MJPEG-B          @tab     @tab  X
719
@item Sunplus MJPEG          @tab     @tab  X @tab fourcc: SP5X
720 4fa1c4fa Roman Shaposhnik
@item DV                     @tab  X  @tab  X 
721 4745b5bf Fabrice Bellard
@item Huff YUV               @tab  X  @tab  X
722 33a4d8b1 Alex Beregszaszi
@item FFmpeg Video 1         @tab  X  @tab  X @tab Experimental lossless codec (fourcc: FFV1)
723
@item FFmpeg Snow            @tab  X  @tab  X @tab Experimental wavelet codec (fourcc: SNOW)
724 701b603d Mike Melanson
@item Asus v1                @tab  X  @tab  X @tab fourcc: ASV1
725 4d3b1f8d Mike Melanson
@item Asus v2                @tab  X  @tab  X @tab fourcc: ASV2
726 701b603d Mike Melanson
@item Creative YUV           @tab     @tab  X @tab fourcc: CYUV
727
@item H.264                  @tab     @tab  X
728 d2bfadc0 Mike Melanson
@item Sorenson Video 1       @tab  X  @tab  X @tab fourcc: SVQ1
729 701b603d Mike Melanson
@item Sorenson Video 3       @tab     @tab  X @tab fourcc: SVQ3
730
@item On2 VP3                @tab     @tab  X @tab still experimental
731 d6896c49 Alex Beregszaszi
@item Theora                 @tab     @tab  X @tab still experimental
732 701b603d Mike Melanson
@item Intel Indeo 3          @tab     @tab  X @tab only works on i386 right now
733 2eb5d024 Fabrice Bellard
@item FLV                    @tab  X  @tab  X @tab Flash H263 variant
734 4d3b1f8d Mike Melanson
@item ATI VCR1               @tab     @tab  X @tab fourcc: VCR1
735 7fe4c823 Alex Beregszaszi
@item ATI VCR2               @tab     @tab  X @tab fourcc: VCR2
736 4d3b1f8d Mike Melanson
@item Cirrus Logic AccuPak   @tab     @tab  X @tab fourcc: CLJR
737
@item 4X Video               @tab     @tab  X @tab used in certain computer games
738
@item Sony Playstation MDEC  @tab     @tab  X 
739
@item Id RoQ                 @tab     @tab  X @tab used in Quake III, Jedi Knight 2, other computer games
740 b17e9c99 Mike Melanson
@item Xan/WC3                @tab     @tab  X @tab used in Wing Commander III .MVE files
741 186447f8 Mike Melanson
@item Interplay Video        @tab     @tab  X @tab used in Interplay .MVE files
742 070ed1bc Mike Melanson
@item Apple Animation        @tab     @tab  X @tab fourcc: 'rle '
743 42cad81a Mike Melanson
@item Apple Graphics         @tab     @tab  X @tab fourcc: 'smc '
744 2fdf638b Mike Melanson
@item Apple Video            @tab     @tab  X @tab fourcc: rpza
745
@item Cinepak                @tab     @tab  X
746
@item Microsoft RLE          @tab     @tab  X
747
@item Microsoft Video-1      @tab     @tab  X
748 4120a53a Mike Melanson
@item Westwood VQA           @tab     @tab  X
749
@item Id Cinematic Video     @tab     @tab  X @tab used in Quake II
750 1dc1ed99 Roberto Togni
@item Planar RGB             @tab     @tab  X @tab fourcc: 8BPS
751 42cad81a Mike Melanson
@item FLIC video             @tab     @tab  X
752 9a4117d5 Mike Melanson
@item Duck TrueMotion v1     @tab     @tab  X @tab fourcc: DUCK
753 da00f30e Mike Melanson
@item VMD Video              @tab     @tab  X @tab used in Sierra VMD files
754 a273bbfb Roberto Togni
@item MSZH                   @tab     @tab  X @tab Part of LCL
755
@item ZLIB                   @tab  X  @tab  X @tab Part of LCL, encoder experimental
756 9d53d58e Mike Melanson
@item TechSmith Camtasia     @tab     @tab  X @tab fourcc: TSCC
757 d0a0bbd2 Mike Melanson
@item IBM Ultimotion         @tab     @tab  X @tab fourcc: ULTI
758 9181577c Fabrice Bellard
@end multitable
759
760
@code{X} means that the encoding (resp. decoding) is supported.
761
762 60837265 Fabrice Bellard
Check at @url{http://www.mplayerhq.hu/~michael/codec-features.html} to
763
get a precise comparison of FFmpeg MPEG4 codec compared to the other
764
solutions.
765
766 9181577c Fabrice Bellard
@section Audio Codecs
767
768
@multitable @columnfractions .4 .1 .1 .1 .7
769
@item Supported Codec @tab Encoding @tab Decoding @tab Comments
770
@item MPEG audio layer 2     @tab  IX  @tab  IX 
771
@item MPEG audio layer 1/3   @tab IX   @tab  IX
772 6bf40f39 Philip Gladstone
@tab MP3 encoding is supported through the external library LAME
773 37776c3b Benjamin Larsson
@item AC3                    @tab  IX  @tab  IX
774 2eb5d024 Fabrice Bellard
@tab liba52 is used internally for decoding
775 34d7008d Philip Gladstone
@item Vorbis                 @tab  X   @tab  X
776 2eb5d024 Fabrice Bellard
@tab supported through the external library libvorbis
777 4745b5bf Fabrice Bellard
@item WMA V1/V2              @tab      @tab X
778 f6fa7a6c Benjamin Larsson
@item AAC                    @tab X    @tab X
779
@tab supported through the external library libfaac/libfaad
780 d4c3c5a6 Michael Niedermayer
@item Microsoft ADPCM        @tab X    @tab X
781 4d3b1f8d Mike Melanson
@item MS IMA ADPCM           @tab X    @tab X
782
@item QT IMA ADPCM           @tab      @tab X
783
@item 4X IMA ADPCM           @tab      @tab X
784 d4e437df Roman Shaposhnik
@item G.726  ADPCM           @tab X    @tab X
785 b17e9c99 Mike Melanson
@item Duck DK3 IMA ADPCM     @tab      @tab X
786
@tab used in some Sega Saturn console games
787
@item Duck DK4 IMA ADPCM     @tab      @tab X
788
@tab used in some Sega Saturn console games
789 2fdf638b Mike Melanson
@item Westwood Studios IMA ADPCM @tab      @tab X
790 42cad81a Mike Melanson
@tab used in Westwood Studios games like Command and Conquer
791 7d8379f2 Mike Melanson
@item SMJPEG IMA ADPCM       @tab      @tab X
792
@tab used in certain Loki game ports
793 42cad81a Mike Melanson
@item CD-ROM XA ADPCM        @tab      @tab X
794
@item CRI ADX ADPCM          @tab X    @tab X
795
@tab used in Sega Dreamcast games
796 7d8379f2 Mike Melanson
@item Electronic Arts ADPCM  @tab      @tab X
797
@tab used in various EA titles
798 2eb5d024 Fabrice Bellard
@item RA144                  @tab      @tab X
799
@tab Real 14400 bit/s codec
800
@item RA288                  @tab      @tab X
801
@tab Real 28800 bit/s codec
802 37776c3b Benjamin Larsson
@item RADnet                 @tab X    @tab IX
803
@tab Real lowbitrate AC3 codec, liba52 is used for decoding
804 2eb5d024 Fabrice Bellard
@item AMR-NB                 @tab X    @tab X
805
@tab supported through an external library
806 d663a1fd Michael Niedermayer
@item AMR-WB                 @tab X    @tab X
807
@tab supported through an external library
808 2eb5d024 Fabrice Bellard
@item DV audio               @tab      @tab X
809 4d3b1f8d Mike Melanson
@item Id RoQ DPCM            @tab      @tab X
810
@tab used in Quake III, Jedi Knight 2, other computer games
811
@item Interplay MVE DPCM     @tab      @tab X
812
@tab used in various Interplay computer games
813 b17e9c99 Mike Melanson
@item Xan DPCM               @tab      @tab X
814
@tab used in Origin's Wing Commander IV AVI files
815 d6896c49 Alex Beregszaszi
@item Apple MACE 3           @tab      @tab X
816
@item Apple MACE 6           @tab      @tab X
817 f8d58f4d Alex Beregszaszi
@item FLAC                   @tab      @tab X
818 33a4d8b1 Alex Beregszaszi
@item FFmpeg Sonic           @tab X    @tab X
819
@tab Experimental lossy/lossless codec
820 9181577c Fabrice Bellard
@end multitable
821
822
@code{X} means that the encoding (resp. decoding) is supported.
823
824
@code{I} means that an integer only version is available too (ensures highest
825
performances on systems without hardware floating point support).
826
827 47d944d2 Fabrice Bellard
@chapter Platform Specific information
828
829
@section Linux
830
831
ffmpeg should be compiled with at least GCC 2.95.3. GCC 3.2 is the
832 6bf40f39 Philip Gladstone
preferred compiler now for ffmpeg. All future optimizations will depend on
833 47d944d2 Fabrice Bellard
features only found in GCC 3.2.
834
835
@section BSD
836
837
@section Windows
838
839 b030b284 Fabrice Bellard
@subsection Native Windows compilation
840
841
@itemize
842
@item Install the current versions of MSYS and MinGW from
843
@url{http://www.mingw.org/}. You can find detailed installation
844
instructions in the download section and the FAQ.
845
846 50f52fcd Fabrice Bellard
@item If you want to test the FFmpeg Simple Media Player, also download 
847
the MinGW development library of SDL 1.2.x
848
(@file{SDL-devel-1.2.x-mingw32.tar.gz}) from
849
@url{http://www.libsdl.org}. Unpack it in a temporary place, and
850
unpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tool
851 988a9f9e Fabrice Bellard
directory. Edit the @file{sdl-config} script so that it gives the
852
correct SDL directory when invoked.
853 50f52fcd Fabrice Bellard
854
@item Extract the current version of FFmpeg (the latest release version or the current CVS snapshot whichever is recommended).
855 b030b284 Fabrice Bellard
 
856
@item Start the MSYS shell (file @file{msys.bat}).
857
858 50f52fcd Fabrice Bellard
@item Change to the FFMPEG directory and follow
859
 the instructions of how to compile ffmpeg (file
860
@file{INSTALL}). Usually, launching @file{./configure} and @file{make}
861
suffices. If you have problems using SDL, verify that
862
@file{sdl-config} can be launched from the MSYS command line.
863
864 988a9f9e Fabrice Bellard
@item You can install FFmpeg in @file{Program Files/FFmpeg} by typing @file{make install}. Don't forget to copy @file{SDL.dll} at the place you launch 
865
@file{ffplay}.
866 50f52fcd Fabrice Bellard
867 b030b284 Fabrice Bellard
@end itemize
868
869 988a9f9e Fabrice Bellard
Notes: 
870
@itemize
871 50f52fcd Fabrice Bellard
872 988a9f9e Fabrice Bellard
@item The target @file{make wininstaller} can be used to create a
873
Nullsoft based Windows installer for FFmpeg and FFplay. @file{SDL.dll}
874
must be copied in the ffmpeg directory in order to build the
875
installer.
876
877
@item By using @code{./configure --enable-shared} when configuring ffmpeg, 
878
you can build @file{avcodec.dll} and @file{avformat.dll}. With
879
@code{make install} you install the FFmpeg DLLs and the associated
880
headers in @file{Program Files/FFmpeg}. 
881
882
@item Visual C++ compatibility: if you used @code{./configure --enable-shared} 
883
when configuring FFmpeg, then FFmpeg tries to use the Microsoft Visual
884
C++ @code{lib} tool to build @code{avcodec.lib} and
885
@code{avformat.lib}. With these libraries, you can link your Visual C++
886
code directly with the FFmpeg DLLs.
887
888
@end itemize
889 b030b284 Fabrice Bellard
890
@subsection Cross compilation for Windows with Linux
891
892
You must use the MinGW cross compilation tools available at
893
@url{http://www.mingw.org/}.
894
895
Then configure ffmpeg with the following options:
896
@example
897
./configure --enable-mingw32 --cross-prefix=i386-mingw32msvc-
898
@end example
899
(you can change the cross-prefix according to the prefix choosen for the
900
MinGW tools).
901
902
Then you can easily test ffmpeg with wine
903
(@url{http://www.winehq.com/}).
904
905 47d944d2 Fabrice Bellard
@section MacOS X
906
907
@section BeOS
908
909
The configure script should guess the configuration itself.
910
Networking support is currently not finished.
911
errno issues fixed by Andrew Bachmann.
912
913
Old stuff:
914
915
Fran?ois Revol - revol at free dot fr - April 2002
916
917
The configure script should guess the configuration itself, 
918
however I still didn't tested building on net_server version of BeOS.
919
920
ffserver is broken (needs poll() implementation).
921
922
There is still issues with errno codes, which are negative in BeOs, and
923
that ffmpeg negates when returning. This ends up turning errors into 
924
valid results, then crashes.
925
(To be fixed)
926
927 34d7008d Philip Gladstone
@chapter Developers Guide
928 9181577c Fabrice Bellard
929
@section API
930
@itemize
931
@item libavcodec is the library containing the codecs (both encoding and
932
  decoding). See @file{libavcodec/apiexample.c} to see how to use it.
933
934
@item libavformat is the library containing the file formats handling (mux and
935 a93b9dba Fabrice Bellard
  demux code for several formats). See @file{ffplay.c} to use it in a
936
player. See @file{output_example.c} to use it to generate audio or video
937
streams.
938
939 9181577c Fabrice Bellard
@end itemize
940
941
@section Integrating libavcodec or libavformat in your program
942
943
You can integrate all the source code of the libraries to link them
944
statically to avoid any version problem. All you need is to provide a
945
'config.mak' and a 'config.h' in the parent directory. See the defines
946
generated by ./configure to understand what is needed.
947
948
You can use libavcodec or libavformat in your commercial program, but
949
@emph{any patch you make must be published}. The best way to proceed is
950
to send your patches to the ffmpeg mailing list.
951
952 80d1c272 Michael Niedermayer
@node Coding Rules
953 9181577c Fabrice Bellard
@section Coding Rules
954
955 cb6e87c1 Falk Hüffner
ffmpeg is programmed in the ISO C90 language with a few additional
956
features from ISO C99, namely:
957
@itemize @bullet
958
@item
959
the @samp{inline} keyword;
960
@item
961
@samp{//} comments;
962
@item
963
designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
964
@item
965
compound literals (@samp{x = (struct s) { 17, 23 @};})
966
@end itemize
967
968
These features are supported by all compilers we care about, so we won't
969
accept patches to remove their use unless they absolutely don't impair
970
clarity and performance.
971
972
All code must compile with gcc 2.95 and gcc 3.3. Currently, ffmpeg also
973
compiles with several other compilers, such as the Compaq ccc compiler
974
or Sun Studio 9, and we would like to keep it that way unless it would
975
be exceedingly involved. To ensure compatibility, please don't use any
976
additional C99 features or gcc extensions. Watch out especially for:
977
@itemize @bullet
978
@item
979
mixing statements and declarations;
980
@item
981
@samp{long long} (use @samp{int64_t} instead);
982
@item
983
@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
984
@item
985
gcc statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
986
@end itemize
987 9181577c Fabrice Bellard
988 cb6e87c1 Falk Hüffner
Indent size is 4. The TAB character should not be used.
989 9181577c Fabrice Bellard
The presentation is the one specified by 'indent -i4 -kr'.
990
991
Main priority in ffmpeg is simplicity and small code size (=less
992
bugs).
993
994 80d1c272 Michael Niedermayer
Comments: use the JavaDoc/Doxygen 
995 f4888b83 Michael Niedermayer
format (see examples below) so that a documentation
996 80d1c272 Michael Niedermayer
can be generated automatically. All non trivial functions should have a comment
997
above it explaining what the function does, even if its just one sentance.
998
All Structures and their member variables should be documented too.
999 f4888b83 Michael Niedermayer
@example
1000
/**
1001
?* @file mpeg.c
1002
?* mpeg codec.
1003
?* @author ...
1004
?*/
1005
1006
/**
1007
?* Summary sentance.
1008
?* more text ...
1009
?* ...
1010
?*/
1011
typedef struct Foobar{
1012
? ? int var1; /**< var1 description */
1013
? ? int var2; ///< var2 description
1014
? ? /** var3 description */
1015
? ? int var3;
1016
} Foobar;
1017
1018
/**
1019
?* Summary sentance.
1020
?* more text ...
1021
?* ...
1022
?* @param my_parameter description of my_parameter
1023
?* @return return value description
1024
?*/
1025
int myfunc(int my_parameter)
1026
...
1027
@end example
1028 9181577c Fabrice Bellard
1029 36d9b4e8 Michael Niedermayer
fprintf and printf are forbidden in libavformat and libavcodec, 
1030
please use av_log() instead.
1031
1032 9181577c Fabrice Bellard
@section Submitting patches
1033
1034 80d1c272 Michael Niedermayer
First, (@pxref{Coding Rules}) above if you didn't yet.
1035
1036 6a6810b1 Michael Niedermayer
When you submit your patch, try to send a unified diff (diff '-up'
1037 9181577c Fabrice Bellard
option). I cannot read other diffs :-)
1038
1039
Run the regression tests before submitting a patch so that you can
1040 6bf40f39 Philip Gladstone
verify that there are no big problems.
1041 9181577c Fabrice Bellard
1042
Patches should be posted as base64 encoded attachments (or any other
1043
encoding which ensures that the patch wont be trashed during 
1044
transmission) to the ffmpeg-devel mailinglist, see 
1045
@url{http://lists.sourceforge.net/lists/listinfo/ffmpeg-devel}
1046
1047 54fcf429 Michael Niedermayer
It also helps quite a bit if you tell us what the patch does (for example
1048
'replaces lrint by lrintf') , and why (for example '*bsd isnt c99 compliant
1049
and has no lrint()')
1050
1051 cf7f2b16 Michael Niedermayer
We reply to all patches submitted and either apply or reject with some
1052
explanation why, but sometimes we are quite busy so it can take a week or 2
1053
1054 9181577c Fabrice Bellard
@section Regression tests
1055
1056 6bf40f39 Philip Gladstone
Before submitting a patch (or committing with CVS), you should at least
1057 9181577c Fabrice Bellard
test that you did not break anything.
1058
1059
The regression test build a synthetic video stream and a synthetic
1060 6bf40f39 Philip Gladstone
audio stream. Then these are encoded then decoded with all codecs or
1061 9181577c Fabrice Bellard
formats. The CRC (or MD5) of each generated file is recorded in a
1062
result file. Then a 'diff' is launched with the reference results and
1063
the result file.
1064
1065 6bf40f39 Philip Gladstone
The regression test then goes on to test the ffserver code with a 
1066
limited set of streams. It is important that this step runs correctly
1067
as well.
1068
1069 36d9b4e8 Michael Niedermayer
Run 'make test' to test all the codecs and formats.
1070 9181577c Fabrice Bellard
1071 5ee03c86 Fabrice Bellard
Run 'make fulltest' to test all the codecs, formats and ffserver.
1072 9181577c Fabrice Bellard
1073
[Of course, some patches may change the regression tests results. In
1074
this case, the regression tests reference results shall be modified
1075
accordingly].
1076
1077
@bye