win10 vs2017 ShiftMediaProject / ffmpegのコンパイルプロジェクトステップピット要約記事
今日は、私の上のステップは、再び、それ共有へ簡単に書き込み何か、私たちは私のステップを避けるために続けています。
1、ダウンロードShiftMediaProject / ffmpegのプロジェクト
これはGitHubのプロジェクトのアドレスであるShiftMediaProject
git clone https://github.com/ShiftMediaProject/FFmpeg.git
2、サードパーティのライブラリに依存してプルffmpegの
使用し、管理者権限がproject_get_dependencies.bat実行CMD、SMPフォルダにcd、起動する
プロセスを、プルffmpegdeは、VPNを開くために提案されているサードパーティ製のライブラリに依存しています。
次に示すようにして得られたファイルを使い果たしました:
3、FFmpegの/ ... / ... / MSVC /フォルダを含める含めるために、追加のヘッダファイルをインストールします
- opengl (requires glext)
a) Download glext.h and wglext.h from opengl.org.
b) Save the header files into “OutputDir/include/gl/".
c) Download khrplatform.h from khronos.org
d) Save the header file into "OutputDir/include/KHR/”.
2) ffnvcodec (requires nv-codec-headers)
a) Download the nv-codec-headers repository from https://github.com/FFmpeg/nv-codec-headers
b) Save the contents of the nv-codec-headers repositories “include” folder into “OutputDir/include/".
3) AMF (requires Advanced Media Framework (AMF) SDK headers)
a) Download the AMF repository from https://github.com/GPUOpen-LibrariesAndSDKs/AMF
b) Save the contents of the AMF repositories “amf/public/include” into "OutputDir/include/AMF/”.
4、安装VSNASM与VSYASM
VSNASM 地址:https://github.com/ShiftMediaProject/VSNASM/releases/tag/0.6
VSYASM地址: https://github.com/ShiftMediaProject/VSYASM/releases
分别运行 install_script.bat 脚本文件
一般YASM 不会有什么问题,如果NASM安装不上,可以手动下载安装包,nasm-2.14.02-win64.zip然后修改install_script.bat
set NASMDL=http://www.nasm.us/pub/nasm/releasebuilds
set NASMDOWNLOAD=%NASMDL%/%NASMVERSION%/win%SYSARCH%/nasm-%NASMVERSION%-win%SYSARCH%.zip
换为
set NASMDL=.
set NASMDOWNLOAD=%NASMDL%/nasm-%NASMVERSION%-win%SYSARCH%.zip
5、编译
打开ffmpeg_deps.sln文件
如果打开的是ffmpeg.sln 文件编译的话 会出现一大堆的.h头文件找不到的问题。
如果要生成dll文件,则将工程中 ffmpeg ffplay ffprobe 的配置类型 改为.dll动态库即可。
6、可能遇到的问题
由于我没有将问题的详细信息保存下来,就不多说。一般都是本地库与远端库不匹配造成的问题,尽量使用git 保证一致,就能编译通过。一定不要更改git获取的文件内容。