ffmpeg交叉编译使用跨平台库版本.doc_第1页
ffmpeg交叉编译使用跨平台库版本.doc_第2页
ffmpeg交叉编译使用跨平台库版本.doc_第3页
ffmpeg交叉编译使用跨平台库版本.doc_第4页
ffmpeg交叉编译使用跨平台库版本.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Lsm 最后更新时间2012-04-19下载一、 下载 VS2010 + SP1 安装二、 下载yasm各个版本三、 下载MingW 最新,完全安装The cross-compile toolchain used to compile this FFmpeg was:MinGW-w64: /winpthreads (part of MinGW-w64)The GCC version used to compile this FFmpeg was:GCC 4.6.2: /四、 下载Msys Update 最新(不需要,可以自己手动更新)五、 下载源码SDL最新; ffmpegsource ; pthreadGC2.dll等等六、 扩展库:///projects/opencore-amr/////http:/rtmpdump.mplayerhq.hu//// /projects/opencore-amr/ /projects/opencore-amr///code//developers/x264.html///配置编译环境编译生成:1.配置 MingW下载msys.bat 启动文件 C:MinGWmsys1.0使用UltraEdit打开msys.bat文件,在文件的最最前面加入如下一行: call D:Program FilesMicrosoft Visual Studio 10.0VCbinvcvars32.bat /交叉编译产生lib链接库2.配置 yasm直接把 yasm-1.1.0-win32.exe 文件名修改成:yasm.exe,并放到系统目录下:C:WINDOWSsystem32。3.编译SDL 启动Msys 主要为【SDL support yes】和SDL本地库$ cd SDL-1.2.14 /到源码文件夹$ ./configure -prefix=/usr/生成配置$ Make /编译$ make install/安装编译完成后,在C:MinGWmsys1.0的bin、include和lib文件夹下可以看到编译结果。4.编译X264 为ffmpeg使用libx264.a 静态库 和动态库两种提供方式,下面是静态库$ cd x264/到源码文件夹$ ./configure -prefix=/e/MinGW -enable-static /生成配置-prefix=/C/MinGW 安装到MingW的安装目录才是对应的系统文件夹 -prefix=/usr 安装到 msys 要$ make install/编译-安装对应ffmpeg configure检查修改5. 对媒体线程库 pthread 、lpthreadGC2 、w32threads “pthreadGC2.dll”直接拷贝到当前目录,也可放到系统目录C:WINDOWSsystem32中X264 : configure -disable-pthread /x264默认不配置6. 编译 ffmpeg 最终库 双击“C:MinGWmsys1.0msys.bat”,启动“MinGW32”, 切换到SDL目录:D:ffmpegffmpeg-0.8.5SDL-1.2.14,切换方法如下:$ cd ffmpeg-0.8.10/到源码文件夹$ ./configure -disable-static -enable-shared -enable-gpl -enable-version3 -disable-doc -disable-ffplay -disable-ffprobe -disable-ffserver -disable-w32threads -enable-memalign-hack -enable-avisynth -enable-libx264/生成配置ffmpeg zeraone Static:-enable-gpl -enable-version3 -disable-w32threads -enable-runtime-cpudetect -enable-avisynth -enable-bzlib -enable-frei0r -enable-libopencore-amrnb -enable-libopencore-amrwb -enable-libfreetype -enable-libgsm -enable-libmp3lame -enable-libopenjpeg -enable-librtmp -enable-libschroedinger -enable-libspeex -enable-libtheora -enable-libvo-aacenc -enable-libvo-amrwbenc -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libxavs -enable-libxvid -enable-zlibffmpeg zeraone Shared:-disable-static -enable-shared -enable-gpl -enable-version3 -disable-w32threads -enable-runtime-cpudetect -enable-avisynth -enable-bzlib -enable-frei0r -enable-libopencore-amrnb -enable-libopencore-amrwb -enable-libfreetype -enable-libgsm -enable-libmp3lame -enable-libopenjpeg -enable-librtmp -enable-libschroedinger -enable-libspeex -enable-libtheora -enable-libvo-aacenc -enable-libvo-amrwbenc -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libxavs -enable-libxvid -enable-zlib-enable-runtime-cpudetect /Freedom版本/usr/bin -cross-prefix=i586-mingw32msvc- -arch=x86 -disable-gpl -disable-avisynth -disable-postproc -enable-runtime-cpudetect -disable-encoders -disable-muxers -disable-network -disable-devices -enable-sharedi586-mingw32msvc-pkg-config file is must be excutable. (chmod +x i586-mingw32msvc-pkg-config)$ make/编译$ Make install/安装 等待完成,在C:MinGWmsys1.0local中将会生成 bin、include、lib等文件夹,其中包含了ffmpeg.exe、ffplay.exe、ffprobe.exe、dll、lib和头文件等。 Ffmpeg命令ffmpeg.exe -i e:mobile_60K_15fps.mkv -y e:xcvaB.avi -vcodec libx264-baselineffmpeg.exe -i e:mobile_60K_15fps.mkv -y e:xcvaA.avi -dcodec libx264-baseline随手记2.编译ffmpeg的configure命令是:./configure -enable-memalign-hack -enable-shared -disable-static -enable-gpl -enable-pthreads -enable-avisynth -enable-nonfree -enable-libamr-nb -enable-libamr-wb -enable-libfaac -enable-libfaad -enable-libgsm -enable-libmp3lame -enable-libvorbis -enable-swscale -enable-avfilter -enable-libx264 -enable-libxvid -extra-libs=-lpthreadGC2 -extra-cflags=-I/static/include -extra-ldflags=-L/static/libI also encounter this issue a few weeks ago.Try the following configuration,hope it can help you to resolve this issue.Use -extra-libs=-lpthreadinstead of -extra-libs=-lpthreadGC2.About pthread,you can refer this link:url/wiki/index.php?title=Pthreads/url修改sdl-config配置文件 使用UltraEdit打开D:ffmpegffmpeg-0.8.5bin下的 sdl-config文件 把 prefix=/usr 该成: prefix=c:/mingw 其中:c:/mingw 为 mingw的安装路径,请根据你的安装进行修改。./configure -enable-shared -enable-pthread$ ./configure -prefix=/static./version.sh: line 2: git: command not foundPlatform: X86System: MINGWasm: yesavis input: yesmp4 output: nopthread: yesdebug: nogprof: noPIC: noshared: novisualize:noYou can run make or make fprofiled now.后make,make install,在static/include目录下有x264.h,static/lib目录下有libx264.a文件生成2.编译ffmpeg的configure命令是:./configure -enable-memalign-hack -enable-shared -disable-static -enable-gpl -enable-pthreads -enable-avisynth -enable-nonfree -enable-libamr-nb -enable-libamr-wb -enable-libfaac -enable-libfaa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论