天天看點

ffmpeg build with xvid

How to build ffmpeg with xvid?

1. Build and install xvid.  Down load source code from http://www.xvid.org

2. If linux, tar zxvf xvid.tar.gz....  go to /xvidcore/build/generic. Then user  "./configure" and "make". Then use root user to install .

3. go to ffmpeg , mkdir build; cd build; configure --enable-gpl --enable-libxvid --extra-cflags=-I/usr/local/include --extra-libs=-L/usr/local/lib

And then It might be works. ( The /usr/local/include is xvid.h paht. /usr/local/lib is libxvidcore.a path. If you don't install the xvid in this path, you can modify it.)

4. If the configure above can't works. For example: ERROR: libxvid not found

     You can modify ffmpeg/configure.   at the line:  enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore

     Change it to "enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore -lpthread"

Then it can works.

5. If you build ffmpeg configure with --extra-ldflags=-static, you may be get error. So you shoud change the ffmpeg/configure from "enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore" to "enabled libxvid   && require  libxvid xvid.h xvid_global -lxvidcore -lpthread -lm"

Then it can works.

繼續閱讀