FFmpeg Compilation
Compile pthreads-w32-8-0-release.tar.gz as a dynamic library
Tar zxfv pthreads-w32-2-8-0-release.tar.gz.
Patch-P0 <pthreads-w32-2-8-0.diff
CD pthreads-w32-2-8-0-release
Make clean GC
CP pthreadgc2.dll/mingw/lib
CP pthreadgc2.dll/mingw/bin
CP pthreadgc2.dll/mingw/lib/pthread. dll
CP pthread. h sched. h/mingw/include
Compiled as a static Library:
Tar zxfv pthreads-w32-2-8-0-release.tar.gz.
Patch-P0 <pthreads-w32-2-8-0.diff
CD pthreads-w32-2-8-0-release
Make clean GC-static
CP libpthreadgc2.a/mingw/lib
CP pthread. h sched. h/mingw/include
Static Compilation:
CD/D/FFMPEG
./Configure -- enable-memalign-hack -- extra-cflags = "-fno-common"
Make
Make install
Shared Compilation:
CD/D/FFMPEG
./Configure -- enable-shared -- disable-static -- enable-memalign-hack -- extra-cflags = "-fno-common"
Make
Make install
Path = $ path:/usr/local/lib
The current directory will automatically display an FFMPEG directory. wait patiently until it is downloaded. My size is about 32 MB
./Configure -- prefix =/usr -- enable-GPL -- enable-shared -- enable-libmp3lame -- enable-libxvid -- enable-libfaad -- enable-libfaadbin -- enable-swscale -- enable-pthreads
-- Enable-swscale must be used to compile mediastreamer2 later.
Clear:
Make distclean
Or make clean
Lib library required for msvc Compilation
Strmbasd. Lib winmm. Lib strmiids. Lib
Libavutil. Lib libavcodec. Lib libavformat. Lib
Libswscale. Lib may also be required
Avutil-49.lib avformat-52.lib avcodec-52.lib
If you need it, you must also add libavdevice..
If your build has enabled the software scaler, you must also add libswscale..
Additionally, for static libraries, you must add libgcc. A, which belongs to mingw. It must be the same library as the GCC version used to compile FFMPEG.
If you get an unresolved symbol to _ snprint, you must also link to libmingwex. A, found in the mingw lib folder.
If you get an unresolved symbol to _ strcasecmp, you must also link to libcoldname. A, found in the mingw lib folder.
Obviusly, if you used any external library, you must also link to them (e.g. libxvidcore. A, libz. ).
Static pthreads-w32 libraries must also be linked to wsock32.lib (from msvc ).
Static x264 libraries must also be linked to pthreads-w32 (which in their turn need wsock32.lib ).
If avisynth was enabled, you must also link to vfw32.lib.
If you get an unresolved symbol to * _ lc_codepage, you must either use a non-DLL Runtime Library (in C/C ++-> code generation-> Runtime Library ), or also link to libmsvcrt. a, found in the mingw lib folder, which is probably an incredibly stupid idea (I shoshould investigate further ).
Additional Dependencies
Libavcodec. A libavformat. A libavutil. A libswscale. A libz. A libdts. A libfaac.
Libfaad. A libgsm. A libmp 3lame. A libnut. A libogg. A libtheora. A libvorbis.
Libvorbisenc. A libx264.a libxvidcore. A libpthreadgc2.a libgcc. A libmingwex.
Wsock32.lib vfw32.lib