Building FFmpeg with shared libs is almost the same as building statically, except for the fact that you will have to inform the configure script that you want it to be built shared.
Note: If you do not know exactly how to build statically, read Building FFmpeg SVN statically.
Open up MSys again if it's not already open. For that, go
Start->Programs->MinGW->MSys->msys
Change folder to the FFmpeg SVN source code folder.
It is a good idea to clean the previous statically linked compilation. If you just made little changes to the source code, it's normally not necessary.
But if you're following this guide sequentially, and thus need to clean the previous compilation, run:
make distclean
The configure call will need to include --enable-shared and --disable-static, such as:
./configure --enable-shared --disable-static --enable-memalign-hack
Then, just like in Step 3:
make
and
make install
Since FFmpeg no longer installs its libraries and executables to the same folder, you will need to make your libs ( libav*.dll) accessible by $PATH from the executable ( ffmpeg.exe).
You can do that by copying the dlls that were installed to <prefix>/lib ( <prefix> is /usr/local by default) to wherever ffmpeg.exe is.
Or else, you can add <prefix> to your PATH, by issuing the following command:
PATH=$PATH:/usr/local/lib
$ make install
install -d "/usr/local/bin"
install -m 755 libavdevice/avdevice.dll "/usr/local/bin/avdevice-52.0.0.dll"
strip "/usr/local/bin/avdevice-52.0.0.dll"
cd "/usr/local/bin" && ln -sf avdevice-52.0.0.dll avdevice-52.dll
cd "/usr/local/bin" && ln -sf avdevice-52.0.0.dll avdevice.dll
install -m 644 libavdevice/avdevice-52.lib "/usr/local/bin/avdevice.lib"
install: cannot stat `libavdevice/avdevice-52.lib': No such file or directory
make: [install-libavdevice-shared] Error 1 (ignored)
install -d "/usr/local/bin"
install -m 755 libavformat/avformat.dll "/usr/local/bin/avformat-52.13.0.dll"
strip "/usr/local/bin/avformat-52.13.0.dll"
cd "/usr/local/bin" && ln -sf avformat-52.13.0.dll avformat-52.dll
cd "/usr/local/bin" && ln -sf avformat-52.13.0.dll avformat.dll
install -m 644 libavformat/avformat-52.lib "/usr/local/bin/avformat.lib"
install: cannot stat `libavformat/avformat-52.lib': No such file or directory
make: [install-libavformat-shared] Error 1 (ignored)
install -d "/usr/local/bin"
install -m 755 libavcodec/avcodec.dll "/usr/local/bin/avcodec-51.56.0.dll"
strip "/usr/local/bin/avcodec-51.56.0.dll"
cd "/usr/local/bin" && ln -sf avcodec-51.56.0.dll avcodec-51.dll
cd "/usr/local/bin" && ln -sf avcodec-51.56.0.dll avcodec.dll
install -m 644 libavcodec/avcodec-51.lib "/usr/local/bin/avcodec.lib"
install: cannot stat `libavcodec/avcodec-51.lib': No such file or directory
make: [install-libavcodec-shared] Error 1 (ignored)
install -d "/usr/local/bin"
install -m 755 libavutil/avutil.dll "/usr/local/bin/avutil-49.6.0.dll"
strip "/usr/local/bin/avutil-49.6.0.dll"
cd "/usr/local/bin" && ln -sf avutil-49.6.0.dll avutil-49.dll
cd "/usr/local/bin" && ln -sf avutil-49.6.0.dll avutil.dll
install -m 644 libavutil/avutil-49.lib "/usr/local/bin/avutil.lib"
install: cannot stat `libavutil/avutil-49.lib': No such file or directory
make: [install-libavutil-shared] Error 1 (ignored)
install -d "/usr/local/include/libavdevice"
install -d "/usr/local/lib/pkgconfig"
install -m 644 "/d/ffmpeg/libavdevice"/avdevice.h "/usr/local/include/libavdevic e"
install -m 644 "/d/ffmpeg"/libavdevice.pc "/usr/local/lib/pkgconfig"
install -d "/usr/local/include/libavformat"
install -d "/usr/local/lib/pkgconfig"
install -m 644 "/d/ffmpeg/libavformat"/avformat.h "/d/ffmpeg/libavformat"/avio.h "/d/ffmpeg/libavformat"/rtsp.h "/d/ffmpeg/libavformat"/rtspcodes.h "/usr/local/ include/libavformat"
install -m 644 "/d/ffmpeg"/libavformat.pc "/usr/local/lib/pkgconfig"
install -d "/usr/local/include/libavcodec"
install -d "/usr/local/lib/pkgconfig"
install -m 644 "/d/ffmpeg/libavcodec"/avcodec.h "/d/ffmpeg/libavcodec"/opt.h "/u sr/local/include/libavcodec"
install -m 644 "/d/ffmpeg"/libavcodec.pc "/usr/local/lib/pkgconfig"
install -d "/usr/local/include/libavutil"
install -d "/usr/local/lib/pkgconfig"
install -m 644 "/d/ffmpeg/libavutil"/adler32.h "/d/ffmpeg/libavutil"/avstring.h "/d/ffmpeg/libavutil"/avutil.h "/d/ffmpeg/libavutil"/base64.h "/d/ffmpeg/libavut il"/common.h "/d/ffmpeg/libavutil"/crc.h "/d/ffmpeg/libavutil"/fifo.h "/d/ffmpeg /libavutil"/intfloat_readwrite.h "/d/ffmpeg/libavutil"/log.h "/d/ffmpeg/libavuti l"/lzo.h "/d/ffmpeg/libavutil"/mathematics.h "/d/ffmpeg/libavutil"/md5.h "/d/ffm peg/libavutil"/mem.h "/d/ffmpeg/libavutil"/random.h "/d/ffmpeg/libavutil"/ration al.h "/d/ffmpeg/libavutil"/sha1.h "/usr/local/include/libavutil"
install -m 644 "/d/ffmpeg"/libavutil.pc "/usr/local/lib/pkgconfig"
install -d "/usr/local/bin"
install -c -m 755 ffmpeg.exe "/usr/local/bin"
avformat-50.lib,avformat-50.dll,avformat.dll
avcodec-51.lib,avcodec-51.dll,avcodec.dll
avutil-49.lib,avutil-49.dll,avutil.dll
上面带版本号和不带版本号的文件应该是完全一样的