]> git.sesse.net Git - ffmpeg/blobdiff - doc/general.texi
lavfi: unify asink_buffer and vsink_buffer API
[ffmpeg] / doc / general.texi
index c950fcb131e5667af72ce1b67f32da3c614a7fa7..51af16dfa7874c91db56ed163d646cf29281e1f5 100644 (file)
 
 @chapter external libraries
 
-Libav can be hooked up with a number of external libraries to add support
+FFmpeg can be hooked up with a number of external libraries to add support
 for more formats. None of them are used by default, their use has to be
 explicitly requested by passing the appropriate flags to @file{./configure}.
 
 @section OpenCORE AMR
 
-Libav can make use of the OpenCORE libraries for AMR-NB
+FFmpeg can make use of the OpenCORE libraries for AMR-NB
 decoding/encoding and AMR-WB decoding.
 
 Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for
@@ -27,7 +27,7 @@ installing the libraries. Then pass @code{--enable-libopencore-amrnb} and/or
 Note that OpenCORE is under the Apache License 2.0 (see
 @url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
 incompatible with the LGPL version 2.1 and GPL version 2. You have to
-upgrade Libav's license to LGPL version 3 (or if you have enabled
+upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
 GPL components, GPL version 3) to use it.
 
 
@@ -37,7 +37,7 @@ You can use the @code{-formats} and @code{-codecs} options to have an exhaustive
 
 @section File Formats
 
-Libav supports the following file formats through the @code{libavformat}
+FFmpeg supports the following file formats through the @code{libavformat}
 library:
 
 @multitable @columnfractions .4 .1 .1 .4
@@ -66,13 +66,14 @@ library:
     @tab Used in Z and Z95 games.
 @item Brute Force & Ignorance   @tab   @tab X
     @tab Used in the game Flash Traffic: City of Angels.
+@item BWF                       @tab X @tab X
 @item Interplay C93             @tab   @tab X
     @tab Used in the game Cyberia from Interplay.
 @item Delphine Software International CIN @tab   @tab X
     @tab Multimedia format used by Delphine Software games.
 @item CD+G                      @tab   @tab X
     @tab Video format used by CD+G karaoke disks
-@item Core Audio Format         @tab   @tab X
+@item Core Audio Format         @tab X @tab X
     @tab Apple Core Audio Format
 @item CRC testing format        @tab X @tab
 @item Creative Voice            @tab X @tab X
@@ -119,6 +120,8 @@ library:
     @tab A format used by libvpx
 @item LMLM4                     @tab   @tab X
     @tab Used by Linux Media Labs MPEG-4 PCI boards
+@item LOAS                      @tab   @tab X
+    @tab contains LATM multiplexed AAC audio
 @item LXF                       @tab   @tab X
     @tab VR native stream format, used by Leitch/Harris' video servers.
 @item Matroska                  @tab X @tab X
@@ -162,6 +165,7 @@ library:
 @item NUT                       @tab X @tab X
     @tab NUT Open Container Format
 @item Ogg                       @tab X @tab X
+@item Playstation Portable PMP  @tab   @tab X
 @item TechnoTrend PVA           @tab   @tab X
     @tab Used by TechnoTrend DVB PCI boards.
 @item QCP                       @tab   @tab X
@@ -258,6 +262,8 @@ library:
     @tab Multimedia format used in Westwood Studios games.
 @item Westwood Studios VQA      @tab   @tab X
     @tab Multimedia format used in Westwood Studios games.
+@item XMV                       @tab   @tab X
+    @tab Microsoft video container used in Xbox games.
 @item xWMA                      @tab   @tab X
     @tab Microsoft audio container used by XAudio 2.
 @item YUV4MPEG pipe             @tab X @tab X
@@ -268,7 +274,7 @@ library:
 
 @section Image Formats
 
-Libav can read and write images for each frame of a video sequence. The
+FFmpeg can read and write images for each frame of a video sequence. The
 following image formats are supported:
 
 @multitable @columnfractions .4 .1 .1 .4
@@ -283,8 +289,7 @@ following image formats are supported:
     @tab Digital Picture Exchange
 @item JPEG         @tab X @tab X
     @tab Progressive JPEG is not supported.
-@item JPEG 2000    @tab   @tab E
-    @tab decoding supported through external library libopenjpeg
+@item JPEG 2000    @tab X @tab X
 @item JPEG-LS      @tab X @tab X
 @item LJPEG        @tab X @tab
     @tab Lossless JPEG
@@ -400,6 +405,7 @@ following image formats are supported:
     @tab experimental lossless codec (fourcc: FFV1)
 @item Flash Screen Video v1  @tab  X  @tab  X
     @tab fourcc: FSV1
+@item Flash Screen Video v2  @tab  X  @tab  X
 @item Flash Video (FLV)      @tab  X  @tab  X
     @tab Sorenson H.263 used in Flash
 @item Fraps                  @tab     @tab  X
@@ -514,6 +520,7 @@ following image formats are supported:
 @item VMware Screen Codec / VMware Video  @tab     @tab  X
     @tab Codec used in videos captured by VMware.
 @item Westwood Studios VQA (Vector Quantized Animation) video  @tab     @tab  X
+@item Windows Media Image    @tab     @tab  X
 @item Windows Media Video 7  @tab  X  @tab  X
 @item Windows Media Video 8  @tab  X  @tab  X
 @item Windows Media Video 9  @tab     @tab  X
@@ -598,11 +605,13 @@ following image formats are supported:
 @item Atrac 3                @tab     @tab  X
 @item Bink Audio             @tab     @tab  X
     @tab Used in Bink and Smacker files in many games.
+@item CELT (Opus)            @tab     @tab  E
+    @tab decoding supported through external library libcelt
 @item Delphine Software International CIN audio  @tab     @tab  X
     @tab Codec used in Delphine Software International games.
 @item COOK                   @tab     @tab  X
     @tab All versions except 5.1 are supported.
-@item DCA (DTS Coherent Acoustics)  @tab     @tab  X
+@item DCA (DTS Coherent Acoustics)  @tab  X  @tab  X
 @item DPCM id RoQ            @tab  X  @tab  X
     @tab Used in Quake III, Jedi Knight 2, other computer games.
 @item DPCM Interplay         @tab     @tab  X
@@ -674,6 +683,10 @@ following image formats are supported:
     @tab Used in Sierra VMD files.
 @item Smacker audio          @tab     @tab  X
 @item SMPTE 302M AES3 audio  @tab     @tab  X
+@item Sonic                  @tab  X  @tab  X
+    @tab experimental codec
+@item Sonic lossless         @tab  X  @tab  X
+    @tab experimental codec
 @item Speex                  @tab     @tab  E
     @tab supported through external library libspeex
 @item True Audio (TTA)       @tab     @tab  X
@@ -704,8 +717,9 @@ performance on systems without hardware floating point support).
 @item SSA/ASS      @tab X @tab X @tab X @tab X
 @item DVB          @tab X @tab X @tab X @tab X
 @item DVD          @tab X @tab X @tab X @tab X
+@item MicroDVD     @tab X @tab X @tab   @tab
 @item PGS          @tab   @tab   @tab   @tab X
-@item SubRip (SRT) @tab X @tab X @tab   @tab X
+@item SubRip (SRT) @tab X @tab X @tab X @tab X
 @item XSUB         @tab   @tab   @tab X @tab X
 @end multitable
 
@@ -756,12 +770,12 @@ Using a cross-compiler is preferred for various reasons.
 
 @section OS/2
 
-For information about compiling Libav on OS/2 see
+For information about compiling FFmpeg on OS/2 see
 @url{http://www.edm2.com/index.php/FFmpeg}.
 
 @section Unix-like
 
-Some parts of Libav cannot be built with version 2.15 of the GNU
+Some parts of FFmpeg cannot be built with version 2.15 of the GNU
 assembler which is still provided by a few AMD64 distributions. To
 make sure your compiler really uses the required version of gas
 after a binutils upgrade, run:
@@ -776,12 +790,12 @@ to configure.
 
 @subsection BSD
 
-BSD make will not build Libav, you need to install and use GNU Make
+BSD make will not build FFmpeg, you need to install and use GNU Make
 (@file{gmake}).
 
 @subsection (Open)Solaris
 
-GNU Make is required to build Libav, so you have to invoke (@file{gmake}),
+GNU Make is required to build FFmpeg, so you have to invoke (@file{gmake}),
 standard Solaris Make will not work. When building with a non-c99 front-end
 (gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
 or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
@@ -799,18 +813,22 @@ bash ./configure
 MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
 @url{http://github.com/yuvi/gas-preprocessor} to build the optimized
 assembler functions. Just download the Perl script and put it somewhere
-in your PATH, Libav's configure will pick it up automatically.
+in your PATH, FFmpeg's configure will pick it up automatically.
 
 @section Windows
 
+To get help and instructions for building FFmpeg under Windows, check out
+the FFmpeg Windows Help Forum at
+@url{http://ffmpeg.arrozcru.org/}.
+
 @subsection Native Windows compilation
 
-Libav can be built to run natively on Windows using the MinGW tools. Install
+FFmpeg can be built to run natively on Windows using the MinGW tools. Install
 the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
-You can find detailed installation
-instructions in the download section and the FAQ.
+You can find detailed installation instructions in the download
+section and the FAQ.
 
-Libav does not build out-of-the-box with the packages the automated MinGW
+FFmpeg does not build out-of-the-box with the packages the automated MinGW
 installer provides. It also requires coreutils to be installed and many other
 packages updated to the latest version. The minimum version for some packages
 are listed below:
@@ -822,7 +840,7 @@ are listed below:
 @item mingw-runtime 3.15
 @end itemize
 
-Libav automatically passes @code{-fno-common} to the compiler to work around
+FFmpeg automatically passes @code{-fno-common} to the compiler to work around
 a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
 
 Notes:
@@ -836,19 +854,20 @@ noticeable when running make for a second time (for example in
 @code{make install}).
 
 @item In order to compile FFplay, you must have the MinGW development library
-of SDL. Get it from @url{http://www.libsdl.org}.
+of @uref{http://www.libsdl.org/, SDL}.
 Edit the @file{bin/sdl-config} script so that it points to the correct prefix
 where SDL was installed. Verify that @file{sdl-config} can be launched from
 the MSYS command line.
 
-@item By using @code{./configure --enable-shared} when configuring Libav,
-you can build libavutil, libavcodec and libavformat as DLLs.
+@item By using @code{./configure --enable-shared} when configuring FFmpeg,
+you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
+libavformat) as DLLs.
 
 @end itemize
 
 @subsection Microsoft Visual C++ compatibility
 
-As stated in the FAQ, Libav will not compile under MSVC++. However, if you
+As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
 want to use the libav* libraries in your own applications, you can still
 compile those applications using MSVC++. But the libav* libraries you link
 to @emph{must} be built with MinGW. However, you will not be able to debug
@@ -856,13 +875,13 @@ inside the libav* libraries, since MSVC++ does not recognize the debug
 symbols generated by GCC.
 We strongly recommend you to move over from MSVC++ to MinGW tools.
 
-This description of how to use the Libav libraries with MSVC++ is based on
+This description of how to use the FFmpeg libraries with MSVC++ is based on
 Microsoft Visual C++ 2005 Express Edition. If you have a different version,
 you might have to modify the procedures slightly.
 
 @subsubsection Using static libraries
 
-Assuming you have just built and installed Libav in @file{/usr/local}.
+Assuming you have just built and installed FFmpeg in @file{/usr/local}.
 
 @enumerate
 
@@ -873,13 +892,13 @@ Application Wizard, uncheck the "Precompiled headers" option.
 @item Write the source code for your application, or, for testing, just
 copy the code from an existing sample application into the source file
 that MSVC++ has already created for you. For example, you can copy
-@file{libavformat/output-example.c} from the Libav distribution.
+@file{libavformat/output-example.c} from the FFmpeg distribution.
 
 @item Open the "Project / Properties" dialog box. In the "Configuration"
 combo box, select "All Configurations" so that the changes you make will
 affect both debug and release builds. In the tree view on the left hand
 side, select "C/C++ / General", then edit the "Additional Include
-Directories" setting to contain the path where the Libav includes were
+Directories" setting to contain the path where the FFmpeg includes were
 installed (i.e. @file{c:\msys\1.0\local\include}).
 Do not add MinGW's include directory here, or the include files will
 conflict with MSVC's.
@@ -887,7 +906,7 @@ conflict with MSVC's.
 @item Still in the "Project / Properties" dialog box, select
 "Linker / General" from the tree view and edit the
 "Additional Library Directories" setting to contain the @file{lib}
-directory where Libav was installed (i.e. @file{c:\msys\1.0\local\lib}),
+directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
 the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
 and the directory where MinGW's GCC libs are installed
 (i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
@@ -904,13 +923,13 @@ set to "Multi-threaded DLL".
 
 @item Click "OK" to close the "Project / Properties" dialog box.
 
-@item MSVC++ lacks some C99 header files that are fundamental for Libav.
+@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
 Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
 and install it in MSVC++'s include directory
 (i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
 
 @item MSVC++ also does not understand the @code{inline} keyword used by
-Libav, so you must add this line before @code{#include}ing libav*:
+FFmpeg, so you must add this line before @code{#include}ing libav*:
 @example
 #define inline _inline
 @end example
@@ -923,7 +942,30 @@ Libav, so you must add this line before @code{#include}ing libav*:
 
 This is how to create DLL and LIB files that are compatible with MSVC++:
 
-Within the MSYS shell, build Libav with
+@enumerate
+
+@item Add a call to @file{vcvars32.bat} (which sets up the environment
+variables for the Visual C++ tools) as the first line of @file{msys.bat}.
+The standard location for @file{vcvars32.bat} is
+@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
+and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
+If this corresponds to your setup, add the following line as the first line
+of @file{msys.bat}:
+
+@example
+call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
+@end example
+
+Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
+and run @file{c:\msys\1.0\msys.bat} from there.
+
+@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
+from @file{Microsoft (R) Library Manager}, this means your environment
+variables are set up correctly, the @file{Microsoft (R) Library Manager}
+is on the path and will be used by FFmpeg to create
+MSVC++-compatible import libraries.
+
+@item Build FFmpeg with
 
 @example
 ./configure --enable-shared
@@ -948,12 +990,9 @@ libraries (@file{libxxx.a} files) you should add the MSVC import libraries
 libraries (@file{libxxx.dll.a} files), as these will give you undefined
 reference errors. There should be no need for @file{libmingwex.a},
 @file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
-statically linked into the DLLs. The @file{bin} directory contains a bunch
-of DLL files, but the ones that are actually used to run your application
-are the ones with a major version number in their filenames
-(i.e. @file{avcodec-51.dll}).
+statically linked into the DLLs.
 
-Libav headers do not declare global data for Windows DLLs through the usual
+FFmpeg headers do not declare global data for Windows DLLs through the usual
 dllexport/dllimport interface. Such data will be exported properly while
 building, but to use them in your MSVC++ code you will have to edit the
 appropriate headers and mark the data as dllimport. For example, in
@@ -964,27 +1003,54 @@ extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
 
 Note that using import libraries created by dlltool requires
 the linker optimization option to be set to
-"References: Keep Unreferenced Data (/OPT:NOREF)", otherwise
+"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
 the resulting binaries will fail during runtime. This isn't
 required when using import libraries generated by lib.exe.
 This issue is reported upstream at
 @url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
 
+To create import libraries that work with the @code{/OPT:REF} option
+(which is enabled by default in Release mode), follow these steps:
+
+@enumerate
+
+@item Open @file{Visual Studio 2005 Command Prompt}.
+
+Alternatively, in a normal command line prompt, call @file{vcvars32.bat}
+which sets up the environment variables for the Visual C++ tools
+(the standard location for this file is
+@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat}).
+
+@item Enter the @file{bin} directory where the created LIB and DLL files
+are stored.
+
+@item Generate new import libraries with @file{lib.exe}:
+
+@example
+lib /machine:i386 /def:..\lib\avcodec-53.def  /out:avcodec.lib
+lib /machine:i386 /def:..\lib\avdevice-53.def /out:avdevice.lib
+lib /machine:i386 /def:..\lib\avfilter-2.def  /out:avfilter.lib
+lib /machine:i386 /def:..\lib\avformat-53.def /out:avformat.lib
+lib /machine:i386 /def:..\lib\avutil-51.def   /out:avutil.lib
+lib /machine:i386 /def:..\lib\swscale-2.def   /out:swscale.lib
+@end example
+
+@end enumerate
+
 @anchor{Cross compilation for Windows with Linux}
 @subsection Cross compilation for Windows with Linux
 
 You must use the MinGW cross compilation tools available at
 @url{http://www.mingw.org/}.
 
-Then configure Libav with the following options:
+Then configure FFmpeg with the following options:
 @example
 ./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
 @end example
 (you can change the cross-prefix according to the prefix chosen for the
 MinGW tools).
 
-Then you can easily test Libav with Wine
-(@url{http://www.winehq.com/}).
+Then you can easily test FFmpeg with @uref{http://www.winehq.com/, Wine}.
 
 @subsection Compilation under Cygwin
 
@@ -1017,14 +1083,14 @@ shared libraries:
 ./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
 @end example
 
-If you want to build Libav with additional libraries, download Cygwin
+If you want to build FFmpeg with additional libraries, download Cygwin
 "Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
 @example
 libogg-devel, libvorbis-devel
 @end example
 
-These library packages are only available from Cygwin Ports
-(@url{http://sourceware.org/cygwinports/}) :
+These library packages are only available from
+@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
 
 @example
 yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,