all non trivial functions, structurs and their member variables should be documented
[libav.git] / doc / ffmpeg-doc.texi
CommitLineData
9181577c
FB
1\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
13FFmpeg is a very fast video and audio converter. It can also grab from
14a live audio/video source.
15
16The command line interface is designed to be intuitive, in the sense
17that ffmpeg tries to figure out all the parameters, when
18possible. You have usually to give only the target bitrate you want.
19
20FFmpeg can also convert from any sample rate to any other, and resize
21video on the fly with a high quality polyphase filter.
22
23@chapter Quick Start
24
e99c4e10 25@c man begin EXAMPLES
9181577c
FB
26@section Video and Audio grabbing
27
e99c4e10
FB
28FFmpeg can use a video4linux compatible video source and any Open Sound
29System audio source:
30
9181577c 31@example
e99c4e10 32ffmpeg /tmp/out.mpg
9181577c
FB
33@end example
34
e99c4e10
FB
35Note that you must activate the right video source and channel before
36launching ffmpeg. You can use any TV viewer such as xawtv
37(@url{http://bytesex.org/xawtv/}) by Gerd Knorr which I find very
38good. You must also set correctly the audio recording levels with a
39standard mixer.
9181577c 40
6bf40f39 41@section Video and Audio file format conversion
9181577c
FB
42
43* ffmpeg can use any supported file format and protocol as input:
44
45Examples:
46
47* You can input from YUV files:
48
49@example
e99c4e10 50ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
9181577c
FB
51@end example
52
e99c4e10 53It will use the files:
9181577c 54@example
e99c4e10
FB
55/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
56/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
9181577c
FB
57@end example
58
e99c4e10
FB
59The Y files use twice the resolution of the U and V files. They are
60raw files, without header. They can be generated by all decent video
61decoders. You must specify the size of the image with the @option{-s} option
62if ffmpeg cannot guess it.
9181577c
FB
63
64* You can input from a RAW YUV420P file:
65
66@example
e99c4e10 67ffmpeg -i /tmp/test.yuv /tmp/out.avi
9181577c
FB
68@end example
69
e99c4e10
FB
70The RAW YUV420P is a file containing RAW YUV planar, for each frame first
71come the Y plane followed by U and V planes, which are half vertical and
72horizontal resolution.
9181577c
FB
73
74* You can output to a RAW YUV420P file:
75
76@example
e99c4e10 77ffmpeg -i mydivx.avi -o hugefile.yuv
9181577c
FB
78@end example
79
80* You can set several input files and output files:
81
82@example
e99c4e10 83ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
9181577c
FB
84@end example
85
e99c4e10
FB
86Convert the audio file a.wav and the raw yuv video file a.yuv
87to mpeg file a.mpg
9181577c 88
6bf40f39 89* You can also do audio and video conversions at the same time:
9181577c
FB
90
91@example
e99c4e10 92ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
9181577c
FB
93@end example
94
e99c4e10 95Convert the sample rate of a.wav to 22050 Hz and encode it to MPEG audio.
9181577c
FB
96
97* You can encode to several formats at the same time and define a
e99c4e10 98mapping from input stream to output streams:
9181577c
FB
99
100@example
e99c4e10 101ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
9181577c
FB
102@end example
103
e99c4e10
FB
104Convert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '-map
105file:index' specify which input stream is used for each output
106stream, in the order of the definition of output streams.
9181577c
FB
107
108* You can transcode decrypted VOBs
109
110@example
e99c4e10 111ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
9181577c
FB
112@end example
113
e99c4e10
FB
114This is a typical DVD ripper example, input from a VOB file, output
115to an AVI file with MPEG-4 video and MP3 audio, note that in this
116command we use B frames so the MPEG-4 stream is DivX5 compatible, GOP
117size is 300 that means an INTRA frame every 10 seconds for 29.97 fps
118input video. Also the audio stream is MP3 encoded so you need LAME
119support which is enabled using @code{--enable-mp3lame} when
120configuring. The mapping is particularly useful for DVD transcoding
121to get the desired audio language.
9181577c 122
e99c4e10
FB
123NOTE: to see the supported input formats, use @code{ffmpeg -formats}.
124@c man end
9181577c
FB
125
126@chapter Invocation
127
128@section Syntax
129
e99c4e10 130The generic syntax is:
9181577c
FB
131
132@example
e99c4e10 133@c man begin SYNOPSIS
28f88dc8 134ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
e99c4e10 135@c man end
9181577c 136@end example
e99c4e10
FB
137@c man begin DESCRIPTION
138If no input file is given, audio/video grabbing is done.
9181577c 139
e99c4e10
FB
140As a general rule, options are applied to the next specified
141file. For example, if you give the @option{-b 64} option, it sets the video
142bitrate of the next file. Format option may be needed for raw input
143files.
9181577c 144
e99c4e10
FB
145By default, ffmpeg tries to convert as losslessly as possible: it
146uses the same audio and video parameter for the outputs as the one
147specified for the inputs.
148@c man end
9181577c 149
e99c4e10 150@c man begin OPTIONS
9181577c
FB
151@section Main options
152
e99c4e10 153@table @option
9181577c
FB
154@item -L
155show license
18bff752 156
9181577c 157@item -h
e99c4e10 158show help
18bff752 159
e99c4e10 160@item -formats
9181577c 161show available formats, codecs, protocols, ...
18bff752 162
9181577c
FB
163@item -f fmt
164force format
18bff752 165
9181577c
FB
166@item -i filename
167input file name
168
169@item -y
170overwrite output files
171
172@item -t duration
173set the recording time in seconds. @code{hh:mm:ss[.xxx]} syntax is also
174supported.
175
e83a84ac
BL
176@item -ss position
177seek to given time position. @code{hh:mm:ss[.xxx]} syntax is also
178supported.
179
9181577c
FB
180@item -title string
181set the title
182
183@item -author string
184set the author
185
186@item -copyright string
187set the copyright
188
189@item -comment string
190set the comment
191
99db6420
FB
192@item -target type
193specify target file type ("vcd", "svcd" or "dvd"). All the format
194options (bitrate, codecs, buffer sizes) are automatically set by this
195option. You can just type:
196
197@example
198ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
199@end example
200
201@item -hq
18bff752
FB
202activate high quality settings
203
401fbdde
MN
204@item -itsoffset offset
205set the input time offset in seconds. @code{[-]hh:mm:ss[.xxx]} syntax
206is also supported. This option affects all the input files that
207follow it. The offset is added to the input files' timestamps;
208specifying a positive offset means that the corresponding streams are
209delayed by 'offset' seconds.
210
9181577c
FB
211@end table
212
213@section Video Options
214
e99c4e10 215@table @option
9181577c 216@item -b bitrate
18bff752
FB
217set the video bitrate in kbit/s (default = 200 kb/s)
218@item -r fps
219set frame rate (default = 25)
220@item -s size
5ee03c86
FB
221set frame size. The format is @samp{WxH} (default 160x128). The
222following abbreviations are recognized:
223@table @samp
18bff752
FB
224@item sqcif
225128x96
226@item qcif
227176x144
228@item cif
229352x288
230@item 4cif
231704x576
232@end table
233
234@item -aspect aspect
235set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
236@item -croptop size
237set top crop band size (in pixels)
238@item -cropbottom size
239set bottom crop band size (in pixels)
240@item -cropleft size
241set left crop band size (in pixels)
242@item -cropright size
243set right crop band size (in pixels)
1ff93ffc
TK
244@item -padtop size
245set top pad band size (in pixels)
246@item -padbottom size
247set bottom pad band size (in pixels)
248@item -padleft size
249set left pad band size (in pixels)
250@item -padright size
251set right pad band size (in pixels)
5b79a73e
TK
252@item -padcolor (hex color)
253set color of padded bands. The value for pad color is expressed
1ff93ffc
TK
254as a six digit hexidecimal number where the first two digits represent red,
255middle two digits green and last two digits blue. Defaults to 000000 (black)
9181577c 256@item -vn
18bff752 257disable video recording
9181577c
FB
258@item -bt tolerance
259set video bitrate tolerance (in kbit/s)
18bff752
FB
260@item -maxrate bitrate
261set max video bitrate tolerance (in kbit/s)
262@item -minrate bitrate
263set min video bitrate tolerance (in kbit/s)
264@item -bufsize size
265set ratecontrol buffere size (in kbit)
266@item -vcodec codec
5ee03c86
FB
267force video codec to @var{codec}. Use the @code{copy} special value to
268tell that the raw codec data must be copied as is.
18bff752 269@item -sameq
9181577c
FB
270use same video quality as source (implies VBR)
271
272@item -pass n
5ee03c86
FB
273select the pass number (1 or 2). It is useful to do two pass
274encoding. The statistics of the video are recorded in the first pass and
275the video at the exact requested bit rate is generated in the second
276pass.
9181577c
FB
277
278@item -passlogfile file
5ee03c86 279select two pass log file name to @var{file}.
9181577c
FB
280
281@end table
282
18bff752 283@section Advanced Video Options
9181577c 284
e99c4e10 285@table @option
9181577c
FB
286@item -g gop_size
287set the group of picture size
288@item -intra
289use only intra frames
290@item -qscale q
291use fixed video quantiser scale (VBR)
292@item -qmin q
293min video quantiser scale (VBR)
294@item -qmax q
295max video quantiser scale (VBR)
296@item -qdiff q
297max difference between the quantiser scale (VBR)
298@item -qblur blur
299video quantiser scale blur (VBR)
300@item -qcomp compression
301video quantiser scale compression (VBR)
18bff752
FB
302
303@item -rc_init_cplx complexity
304initial complexity for 1-pass encoding
305@item -b_qfactor factor
306qp factor between p and b frames
307@item -i_qfactor factor
308qp factor between p and i frames
309@item -b_qoffset offset
310qp offset between p and b frames
311@item -i_qoffset offset
312qp offset between p and i frames
313@item -rc_eq equation
5ee03c86
FB
314set rate control equation (@pxref{FFmpeg formula
315evaluator}). Default is @code{tex^qComp}.
316@item -rc_override override
317rate control override for specific intervals
18bff752 318@item -me method
5ee03c86
FB
319set motion estimation method to @var{method}. Available methods are
320(from lower to best quality):
18bff752
FB
321@table @samp
322@item zero
5ee03c86 323Try just the (0, 0) vector.
18bff752
FB
324@item phods
325@item log
326@item x1
327@item epzs
328(default method)
329@item full
330exhaustive search (slow and marginally better than epzs)
331@end table
332
333@item -dct_algo algo
5ee03c86 334set dct algorithm to @var{algo}. Available values are:
18bff752
FB
335@table @samp
336@item 0
337FF_DCT_AUTO (default)
338@item 1
339FF_DCT_FASTINT
340@item 2
341FF_DCT_INT
342@item 3
343FF_DCT_MMX
344@item 4
345FF_DCT_MLIB
346@item 5
347FF_DCT_ALTIVEC
348@end table
349
350@item -idct_algo algo
5ee03c86 351set idct algorithm to @var{algo}. Available values are:
18bff752
FB
352@table @samp
353@item 0
354FF_IDCT_AUTO (default)
355@item 1
356FF_IDCT_INT
357@item 2
358FF_IDCT_SIMPLE
359@item 3
360FF_IDCT_SIMPLEMMX
361@item 4
362FF_IDCT_LIBMPEG2MMX
363@item 5
364FF_IDCT_PS2
365@item 6
366FF_IDCT_MLIB
367@item 7
368FF_IDCT_ARM
369@item 8
370FF_IDCT_ALTIVEC
371@item 9
372FF_IDCT_SH4
373@item 10
374FF_IDCT_SIMPLEARM
375@end table
376
377@item -er n
5ee03c86 378set error resilience to @var{n}.
18bff752
FB
379@table @samp
380@item 1
5ee03c86 381FF_ER_CAREFULL (default)
18bff752 382@item 2
5ee03c86 383FF_ER_COMPLIANT
18bff752
FB
384@item 3
385FF_ER_AGGRESSIVE
386@item 4
387FF_ER_VERY_AGGRESSIVE
388@end table
389
5ee03c86
FB
390@item -ec bit_mask
391set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
392the following values:
18bff752
FB
393@table @samp
394@item 1
5ee03c86 395FF_EC_GUESS_MVS (default=enabled)
18bff752 396@item 2
5ee03c86 397FF_EC_DEBLOCK (default=enabled)
18bff752
FB
398@end table
399
400@item -bf frames
50f52fcd 401use 'frames' B frames (supported for MPEG-1, MPEG-2 and MPEG-4)
18bff752
FB
402@item -mbd mode
403macroblock decision
404@table @samp
405@item 0
406FF_MB_DECISION_SIMPLE: use mb_cmp (cannot change it yet in ffmpeg)
407@item 1
408FF_MB_DECISION_BITS: chooses the one which needs the fewest bits
409@item 2
410FF_MB_DECISION_RD: rate distoration
411@end table
412
413@item -4mv
9181577c 414use four motion vector by macroblock (only MPEG-4)
18bff752
FB
415@item -part
416use data partitioning (only MPEG-4)
417@item -bug param
418workaround not auto detected encoder bugs
419@item -strict strictness
420how strictly to follow the standarts
5ee03c86
FB
421@item -aic
422enable Advanced intra coding (h263+)
423@item -umv
424enable Unlimited Motion Vector (h263+)
18bff752
FB
425
426@item -deinterlace
427deinterlace pictures
99db6420
FB
428@item -interlace
429force interlacing support in encoder (only MPEG-2 and MPEG-4). Use this option
430if your input file is interlaced and if you want to keep the interlaced
431format for minimum losses. The alternative is to deinterlace the input
432stream with @option{-deinterlace}, but deinterlacing introduces more
433losses.
18bff752
FB
434@item -psnr
435calculate PSNR of compressed frames
436@item -vstats
5ee03c86 437dump video coding statistics to @file{vstats_HHMMSS.log}.
18bff752
FB
438@item -vhook module
439insert video processing @var{module}. @var{module} contains the module
440name and its parameters separated by spaces.
18bff752
FB
441@end table
442
443@section Audio Options
444
445@table @option
18bff752 446@item -ar freq
5ee03c86 447set the audio sampling freq (default = 44100 Hz)
18bff752 448@item -ab bitrate
5ee03c86 449set the audio bitrate in kbit/s (default = 64)
18bff752 450@item -ac channels
5ee03c86
FB
451set the number of audio channels (default = 1)
452@item -an
453disable audio recording
454@item -acodec codec
455force audio codec to @var{codec}. Use the @code{copy} special value to
456tell that the raw codec data must be copied as is.
18bff752
FB
457@end table
458
459@section Audio/Video grab options
460
461@table @option
462@item -vd device
463set video grab device (e.g. @file{/dev/video0})
464@item -vc channel
465set video grab channel (DV1394 only)
466@item -tvstd standard
467set television standard (NTSC, PAL (SECAM))
468@item -dv1394
469set DV1394 grab
470@item -ad device
471set audio device (e.g. @file{/dev/dsp})
472@end table
473
474@section Advanced options
475
476@table @option
477@item -map file:stream
478set input stream mapping
479@item -debug
480print specific debug info
9181577c
FB
481@item -benchmark
482add timings for benchmarking
483@item -hex
484dump each input packet
18bff752
FB
485@item -bitexact
486only use bit exact algorithms (for codec testing)
487@item -ps size
488set packet size in bits
5ee03c86
FB
489@item -re
490read input at native frame rate. Mainly used to simulate a grab device.
491@item -loop
492loop over the input stream. Currently it works only for image
493streams. This option is used for ffserver automatic testing.
9181577c 494@end table
18bff752
FB
495
496@node FFmpeg formula evaluator
497@section FFmpeg formula evaluator
498
499When evaluating a rate control string, FFmpeg uses an internal formula
500evaluator.
501
502The following binary operators are available: @code{+}, @code{-},
503@code{*}, @code{/}, @code{^}.
504
505The following unary operators are available: @code{+}, @code{-},
506@code{(...)}.
507
508The 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
530The 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
e99c4e10
FB
554@c man end
555
556@ignore
557
558@setfilename ffmpeg
559@settitle FFmpeg video converter
560
561@c man begin SEEALSO
562ffserver(1), ffplay(1) and the html documentation of @file{ffmpeg}.
563@c man end
564
565@c man begin AUTHOR
566Fabrice Bellard
567@c man end
568
569@end ignore
9181577c
FB
570
571@section Protocols
572
47d944d2
FB
573The filename can be @file{-} to read from the standard input or to write
574to the standard output.
9181577c
FB
575
576ffmpeg handles also many protocols specified with the URL syntax.
577
e99c4e10 578Use 'ffmpeg -formats' to have a list of the supported protocols.
9181577c 579
e99c4e10
FB
580The protocol @code{http:} is currently used only to communicate with
581ffserver (see the ffserver documentation). When ffmpeg will be a
582video player it will also be used for streaming :-)
9181577c
FB
583
584@chapter Tips
585
586@itemize
587@item For streaming at very low bit rate application, use a low frame rate
e99c4e10
FB
588and a small gop size. This is especially true for real video where
589the Linux player does not seem to be very fast, so it can miss
590frames. An example is:
9181577c
FB
591
592@example
e99c4e10 593ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
9181577c
FB
594@end example
595
596@item The parameter 'q' which is displayed while encoding is the current
e99c4e10
FB
597quantizer. The value of 1 indicates that a very good quality could
598be achieved. The value of 31 indicates the worst quality. If q=31
599too often, it means that the encoder cannot compress enough to meet
600your bit rate. You must either increase the bit rate, decrease the
601frame rate or decrease the frame size.
9181577c
FB
602
603@item If your computer is not fast enough, you can speed up the
e99c4e10
FB
604compression at the expense of the compression ratio. You can use
605'-me zero' to speed up motion estimation, and '-intra' to disable
606completely motion estimation (you have only I frames, which means it
607is about as good as JPEG compression).
9181577c
FB
608
609@item To have very low bitrates in audio, reduce the sampling frequency
e99c4e10 610(down to 22050 kHz for mpeg audio, 22050 or 11025 for ac3).
9181577c
FB
611
612@item To have a constant quality (but a variable bitrate), use the option
e99c4e10
FB
613'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
614quality).
9181577c
FB
615
616@item When converting video files, you can use the '-sameq' option which
e99c4e10
FB
617uses in the encoder the same quality factor than in the decoder. It
618allows to be almost lossless in encoding.
9181577c
FB
619
620@end itemize
621
622@chapter Supported File Formats and Codecs
623
624You can use the @code{-formats} option to have an exhaustive list.
625
626@section File Formats
627
6bf40f39 628FFmpeg supports the following file formats through the @code{libavformat}
0699d2fe 629library:
9181577c
FB
630
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
2eb5d024
FB
645@item FLV @tab X @tab X
646@tab Macromedia Flash video files
9181577c 647@item Real Audio and Video @tab X @tab X
9181577c
FB
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
42cad81a 652@item Raw CRI ADX audio @tab X @tab X
9181577c 653@item SUN AU format @tab X @tab X
7fe4c823 654@item NUT @tab X @tab X @tab NUT Open Container Format
8a5483e7
MM
655@item Quicktime @tab X @tab X
656@item MPEG4 @tab X @tab X
9181577c 657@tab MPEG4 is a variant of Quicktime
0699d2fe 658@item Raw MPEG4 video @tab X @tab X
4fa1c4fa 659@item DV @tab X @tab X
701b603d
MM
660@item 4xm @tab @tab X
661@tab 4X Technologies format, used in some games
4d3b1f8d
MM
662@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
b17e9c99
MM
667@item WC3 Movie @tab @tab X
668@tab multimedia format used in Origin's Wing Commander III computer game
2fdf638b
MM
669@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
4120a53a
MM
673@item Id Cinematic (.cin) @tab @tab X
674@tab Used in Quake II
42cad81a
MM
675@item FLIC format @tab @tab X
676@tab .fli/.flc files
da00f30e
MM
677@item Sierra VMD @tab @tab X
678@tab used in Sierra CD-ROM games
38088adf 679@item Matroska @tab @tab X
9181577c
FB
680@end multitable
681
682@code{X} means that the encoding (resp. decoding) is supported.
683
0699d2fe
FB
684@section Image Formats
685
686FFmpeg can read and write images for each frame of a video sequence. The
687following 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
2eb5d024
FB
692@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
0699d2fe
FB
694@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
2eb5d024
FB
696@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
6a91ec51 698@item SGI @tab X @tab X @tab SGI RGB image format
0699d2fe
FB
699@end multitable
700
701@code{X} means that the encoding (resp. decoding) is supported.
702
9181577c
FB
703@section Video Codecs
704
705@multitable @columnfractions .4 .1 .1 .7
706@item Supported Codec @tab Encoding @tab Decoding @tab Comments
4745b5bf 707@item MPEG1 video @tab X @tab X
50f52fcd 708@item MPEG2 video @tab X @tab X
9181577c
FB
709@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
701b603d 714@item WMV8 @tab X @tab X @tab Not completely working
9181577c
FB
715@item H263(+) @tab X @tab X @tab Also known as Real Video 1.0
716@item MJPEG @tab X @tab X
d6896c49
AB
717@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
4fa1c4fa 720@item DV @tab X @tab X
4745b5bf 721@item Huff YUV @tab X @tab X
d6896c49 722@item FFmpeg Video 1 @tab X @tab X @tab Lossless codec (fourcc: FFV1)
701b603d 723@item Asus v1 @tab X @tab X @tab fourcc: ASV1
4d3b1f8d 724@item Asus v2 @tab X @tab X @tab fourcc: ASV2
701b603d
MM
725@item Creative YUV @tab @tab X @tab fourcc: CYUV
726@item H.264 @tab @tab X
d2bfadc0 727@item Sorenson Video 1 @tab X @tab X @tab fourcc: SVQ1
701b603d
MM
728@item Sorenson Video 3 @tab @tab X @tab fourcc: SVQ3
729@item On2 VP3 @tab @tab X @tab still experimental
d6896c49 730@item Theora @tab @tab X @tab still experimental
701b603d 731@item Intel Indeo 3 @tab @tab X @tab only works on i386 right now
2eb5d024 732@item FLV @tab X @tab X @tab Flash H263 variant
4d3b1f8d 733@item ATI VCR1 @tab @tab X @tab fourcc: VCR1
7fe4c823 734@item ATI VCR2 @tab @tab X @tab fourcc: VCR2
4d3b1f8d
MM
735@item Cirrus Logic AccuPak @tab @tab X @tab fourcc: CLJR
736@item 4X Video @tab @tab X @tab used in certain computer games
737@item Sony Playstation MDEC @tab @tab X
738@item Id RoQ @tab @tab X @tab used in Quake III, Jedi Knight 2, other computer games
b17e9c99 739@item Xan/WC3 @tab @tab X @tab used in Wing Commander III .MVE files
186447f8 740@item Interplay Video @tab @tab X @tab used in Interplay .MVE files
070ed1bc 741@item Apple Animation @tab @tab X @tab fourcc: 'rle '
42cad81a 742@item Apple Graphics @tab @tab X @tab fourcc: 'smc '
2fdf638b
MM
743@item Apple Video @tab @tab X @tab fourcc: rpza
744@item Cinepak @tab @tab X
745@item Microsoft RLE @tab @tab X
746@item Microsoft Video-1 @tab @tab X
4120a53a
MM
747@item Westwood VQA @tab @tab X
748@item Id Cinematic Video @tab @tab X @tab used in Quake II
1dc1ed99 749@item Planar RGB @tab @tab X @tab fourcc: 8BPS
42cad81a 750@item FLIC video @tab @tab X
9a4117d5 751@item Duck TrueMotion v1 @tab @tab X @tab fourcc: DUCK
da00f30e 752@item VMD Video @tab @tab X @tab used in Sierra VMD files
a273bbfb
RT
753@item MSZH @tab @tab X @tab Part of LCL
754@item ZLIB @tab X @tab X @tab Part of LCL, encoder experimental
9181577c
FB
755@end multitable
756
757@code{X} means that the encoding (resp. decoding) is supported.
758
60837265
FB
759Check at @url{http://www.mplayerhq.hu/~michael/codec-features.html} to
760get a precise comparison of FFmpeg MPEG4 codec compared to the other
761solutions.
762
9181577c
FB
763@section Audio Codecs
764
765@multitable @columnfractions .4 .1 .1 .1 .7
766@item Supported Codec @tab Encoding @tab Decoding @tab Comments
767@item MPEG audio layer 2 @tab IX @tab IX
768@item MPEG audio layer 1/3 @tab IX @tab IX
6bf40f39 769@tab MP3 encoding is supported through the external library LAME
37776c3b 770@item AC3 @tab IX @tab IX
2eb5d024 771@tab liba52 is used internally for decoding
34d7008d 772@item Vorbis @tab X @tab X
2eb5d024 773@tab supported through the external library libvorbis
4745b5bf 774@item WMA V1/V2 @tab @tab X
f6fa7a6c
BL
775@item AAC @tab X @tab X
776@tab supported through the external library libfaac/libfaad
d4c3c5a6 777@item Microsoft ADPCM @tab X @tab X
4d3b1f8d
MM
778@item MS IMA ADPCM @tab X @tab X
779@item QT IMA ADPCM @tab @tab X
780@item 4X IMA ADPCM @tab @tab X
d4e437df 781@item G.726 ADPCM @tab X @tab X
b17e9c99
MM
782@item Duck DK3 IMA ADPCM @tab @tab X
783@tab used in some Sega Saturn console games
784@item Duck DK4 IMA ADPCM @tab @tab X
785@tab used in some Sega Saturn console games
2fdf638b 786@item Westwood Studios IMA ADPCM @tab @tab X
42cad81a 787@tab used in Westwood Studios games like Command and Conquer
7d8379f2
MM
788@item SMJPEG IMA ADPCM @tab @tab X
789@tab used in certain Loki game ports
42cad81a
MM
790@item CD-ROM XA ADPCM @tab @tab X
791@item CRI ADX ADPCM @tab X @tab X
792@tab used in Sega Dreamcast games
7d8379f2
MM
793@item Electronic Arts ADPCM @tab @tab X
794@tab used in various EA titles
2eb5d024
FB
795@item RA144 @tab @tab X
796@tab Real 14400 bit/s codec
797@item RA288 @tab @tab X
798@tab Real 28800 bit/s codec
37776c3b
BL
799@item RADnet @tab X @tab IX
800@tab Real lowbitrate AC3 codec, liba52 is used for decoding
2eb5d024
FB
801@item AMR-NB @tab X @tab X
802@tab supported through an external library
d663a1fd
MN
803@item AMR-WB @tab X @tab X
804@tab supported through an external library
2eb5d024 805@item DV audio @tab @tab X
4d3b1f8d
MM
806@item Id RoQ DPCM @tab @tab X
807@tab used in Quake III, Jedi Knight 2, other computer games
808@item Interplay MVE DPCM @tab @tab X
809@tab used in various Interplay computer games
b17e9c99
MM
810@item Xan DPCM @tab @tab X
811@tab used in Origin's Wing Commander IV AVI files
d6896c49
AB
812@item Apple MACE 3 @tab @tab X
813@item Apple MACE 6 @tab @tab X
f8d58f4d 814@item FLAC @tab @tab X
9181577c
FB
815@end multitable
816
817@code{X} means that the encoding (resp. decoding) is supported.
818
819@code{I} means that an integer only version is available too (ensures highest
820performances on systems without hardware floating point support).
821
47d944d2
FB
822@chapter Platform Specific information
823
824@section Linux
825
826ffmpeg should be compiled with at least GCC 2.95.3. GCC 3.2 is the
6bf40f39 827preferred compiler now for ffmpeg. All future optimizations will depend on
47d944d2
FB
828features only found in GCC 3.2.
829
830@section BSD
831
832@section Windows
833
b030b284
FB
834@subsection Native Windows compilation
835
836@itemize
837@item Install the current versions of MSYS and MinGW from
838@url{http://www.mingw.org/}. You can find detailed installation
839instructions in the download section and the FAQ.
840
50f52fcd
FB
841@item If you want to test the FFmpeg Simple Media Player, also download
842the MinGW development library of SDL 1.2.x
843(@file{SDL-devel-1.2.x-mingw32.tar.gz}) from
844@url{http://www.libsdl.org}. Unpack it in a temporary place, and
845unpack the archive @file{i386-mingw32msvc.tar.gz} in the MinGW tool
988a9f9e
FB
846directory. Edit the @file{sdl-config} script so that it gives the
847correct SDL directory when invoked.
50f52fcd
FB
848
849@item Extract the current version of FFmpeg (the latest release version or the current CVS snapshot whichever is recommended).
b030b284
FB
850
851@item Start the MSYS shell (file @file{msys.bat}).
852
50f52fcd
FB
853@item Change to the FFMPEG directory and follow
854 the instructions of how to compile ffmpeg (file
855@file{INSTALL}). Usually, launching @file{./configure} and @file{make}
856suffices. If you have problems using SDL, verify that
857@file{sdl-config} can be launched from the MSYS command line.
858
988a9f9e
FB
859@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
860@file{ffplay}.
50f52fcd 861
b030b284
FB
862@end itemize
863
988a9f9e
FB
864Notes:
865@itemize
50f52fcd 866
988a9f9e
FB
867@item The target @file{make wininstaller} can be used to create a
868Nullsoft based Windows installer for FFmpeg and FFplay. @file{SDL.dll}
869must be copied in the ffmpeg directory in order to build the
870installer.
871
872@item By using @code{./configure --enable-shared} when configuring ffmpeg,
873you can build @file{avcodec.dll} and @file{avformat.dll}. With
874@code{make install} you install the FFmpeg DLLs and the associated
875headers in @file{Program Files/FFmpeg}.
876
877@item Visual C++ compatibility: if you used @code{./configure --enable-shared}
878when configuring FFmpeg, then FFmpeg tries to use the Microsoft Visual
879C++ @code{lib} tool to build @code{avcodec.lib} and
880@code{avformat.lib}. With these libraries, you can link your Visual C++
881code directly with the FFmpeg DLLs.
882
883@end itemize
b030b284
FB
884
885@subsection Cross compilation for Windows with Linux
886
887You must use the MinGW cross compilation tools available at
888@url{http://www.mingw.org/}.
889
890Then configure ffmpeg with the following options:
891@example
892./configure --enable-mingw32 --cross-prefix=i386-mingw32msvc-
893@end example
894(you can change the cross-prefix according to the prefix choosen for the
895MinGW tools).
896
897Then you can easily test ffmpeg with wine
898(@url{http://www.winehq.com/}).
899
47d944d2
FB
900@section MacOS X
901
902@section BeOS
903
904The configure script should guess the configuration itself.
905Networking support is currently not finished.
906errno issues fixed by Andrew Bachmann.
907
908Old stuff:
909
910