r3 - 07 Feb 2008 - 23:59:43 - DanDennedyYou are here: MLT Wiki >  MLT Web  > BuildTips

BuildTips

avformat (FFmpeg) module

If you specify nothing and do not disable the module, then MLT attempts to build the avformat module against an installation in the system path. Typically, this means /usr or /usr/local, but actually MLT uses the parent directory of the directory containing the ffmpeg utility in your PATH. For example, if 'which ffmpeg' returns /home/me/bin/ffmpeg, then it assumes the prefix was /home/me and expects to locate headers in /home/me/include/ffmpeg and libraries in /home/me/lib. The following options override this behaviour:

TODO: the avformat module configure script should be updated to use pkg-config as well.

--avformat-shared=path
links the MLT module dynamically to a shared build of FFmpeg that was not installed to the system path. The path corresponds to the prefix used when configuring the FFmpeg build and install.

--avformat-svn
fetches the latest FFmpeg from the HEAD of the trunk of their subversion repository. Then, MLT builds the FFmpeg static link libraries and links the module statically with them.
If you update MLT from subversion, then it does not automatically update the private copy of MLT. If you want to update the private copy of FFmpeg, then you should:
$ cd src/modules/avformat
$ make distclean
$ cd ffmpeg
$ svn update
$ cd ../../../..
$ tail -n 1 config.log  (to see the last configuration; caution: some quotes might be missing!)
$ ./configure... 
$ make

--avformat-svn-extra=options
supplies additional ffmpeg configure options when using --avformat-svn. Since --avformat-svn builds static libraries you need to also supply --avformat-ldextra with the additional libs in linkage syntax. For example, to add MP3 and AAC support:
$ ./configure --avformat-svn --avformat-extra="--enable-libmp3lame --enable-libfaad" --avformat-svn-ldextra="-lmp3lame -lfaad"

--avformat-static=path
links the MLT module statically to a non-private (not using --avformat-svn), static build of the FFmpeg libraries. The path must refer to the top level source directory that contains libavformat, libavcodec, and libavutil subdirectories.

--avformat-ldextra=libs
lets you specify additional libraries with which to link against when doing a static build. Basically, you need a gcc '-l' option for each external library that you have configured the FFmpeg build.

--avformat-suffix=suff
lets you tell MLT about the --build-suffix option that you used when you configured the FFmpeg build. If you do not understand this, then it usually safe to not include it.

--avformat-swscale
tells MLT that your non-private FFmpeg build uses libswcaler. This is the case if you used the --enable-swscaler option when configuring the FFmpeg build. It also tells the MLT private FFmpeg build (--avformat-svn) to enable the libswscale because the img_convert functions are deprecated; however, this option also requires you to specify --enable-gpl because libswscale is currently GPL.

In order to see the options used when you built ffmpeg: $ head /path/to/ffmpeg-source/config.err

-- DanDennedy - 12 Jun 2007

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions

tip TWiki Tip of the Day
Custom rendered bullets
The RenderListPlugin can render bulleted lists in a variety of different ways. Use %RENDERLIST{ parameters ... Read on Read more

 
MLT Wiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding MLT Wiki? Send feedback