adie's blog |
Windows平台编译 ffmpeg 二
2020-01-08 16:07:44
添加 SDL2 编译 ffplay1. 下载 SDL2开发包: https://www.libsdl.org/download-2.0.php SDL2-devel-2.0.10-mingw.tar.gz (MinGW 32/64-bit)
make native
拷贝 64 位版本进行覆盖 include, lib, bin
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig
ln -s /mingw64/x86_64-w64-mingw32/lib/libmingw32.a mingw32.lib
ln -s libSDL2main.a SDL2main.lib
ln -s libSDL2.dll.a SDL2.lib
/usr/lib/pkgconfig/sdl2.pc 修改: 去除 -mwindows -lmingw32 -Dmain=SDL_main
2. ./configure --disable-static --enable-shared --toolchain=msvc --arch=x86_64 --enable-nonfree --enable-gpl --enable-version3 --enable-libsrt --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-nvenc --enable-encoder=libx264 --enable-encoder=libx265 --enable-sdl2 --disable-doc --extra-cflags="-I/usr/local/include" --extra-ldflags="-libpath:/usr/local/lib"
make
make install
添加 libmp3lame1. 下载 lame-3.100.tar.gz https://sourceforge.net/projects/lame/files/lame/3.100/ msys64\usr\bin\glink.exe 改回 link.exe 进入 vc_solution 目录, 用 Visual C++ 打开编译. 拷贝头文件 lame.h 到 /usr/local/include/lame 下. 拷贝库文件 libmp3lame.lib 到 /usr/local/lib/mp3lame.lib 拷贝文件 libmp3lame.dll 到 /usr/local/bin 2. ./configure --disable-static --enable-shared --toolchain=msvc --arch=x86_64 --enable-nonfree --enable-gpl --enable-version3 --enable-libsrt --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-nvenc --enable-encoder=libx264 --enable-encoder=libx265 --enable-sdl2 --enable-libmp3lame --disable-doc --extra-cflags="-I/usr/local/include" --extra-ldflags="-libpath:/usr/local/lib" make
make install
添加 Decklink2. 解压在 Blackmagic DeckLink SDK 11.4\Win\include 目录下运行 midl /h DeckLinkAPI.h DeckLinkAPI.idl 命令生成头文件.
3. 拷贝 DeckLinkAPI.h, DeckLinkAPI_i.c 和 DeckLinkAPIVersion.h 到 /usr/local/include 目录下.
4. ./configure --disable-static --enable-shared --toolchain=msvc --arch=x86_64 --enable-nonfree --enable-gpl --enable-version3 --enable-libsrt --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-nvenc --enable-encoder=libx264 --enable-encoder=libx265 --enable-sdl2 --enable-libmp3lame --enable-decklink --disable-doc --extra-cflags="-I/usr/local/include" --extra-ldflags="-libpath:/usr/local/lib" make
make install
▲评论› 网友 匿名 () 于 2020-02-12 21:45:42 发表评论说:
想认识一下大佬
|