• (记录)MSYS2+MINGW32编译ffmpeg过程


    1.ffmpeg源码不包含一些格式的编码器,只是提供了接口,需要自己下载编译第三方库,下载了几种经常用到的:

    LAME 下载地址  mp3编码器

    libvo_aacenc 下载地址   AAC编码器  

    libxvidcore 下载地址        xvid编码器

    libx264 下载地址        h264编码器    

    2.第三方库的编译

    许多库的configure文件都不能识别msys2编译环境,所以最好手动指定  

    摘录自http://blog.chinaunix.net/uid-20634420-id-3027812.html

    --build= 谁在这里编译? 意思说你目前的编译动作在哪里跑的 ? 如果是编译一个arm工具链,虽然工具链为为arm弄的,但是构建工具链的时候是在主机上进行的。所以 --build=i686-pc-linux-gnu

    --host= 目前编译出来的程序在哪里跑 ? 所以工具链好了之后,给目标系统编译程序全部是设置host为arm的。

    --target=为谁编译程序,这在交叉编译的时候跟host一个意思,一般是guess的,而且configure 脚本会说是 =--host.

    lame:

      ./configure --build=mingw32 --host=i686-w64-mingw32    
    make
    make install 

    lame对于gcc版本在4.9.0以上,32位系统在xmm_quantize_sub.c会有编译错误,官方给出的修复办法是

    sed -i -e '/xmmintrin.h/d' configure

    libx264:

    ./configure --host=i686-w64-mingw32 --enable-static
    make
    make install 

    libvo-aacenc:

    ./configure --build=mingw32 --host=i686-w64-mingw32
    make 
    make install

    libxvidcore:

    ./configure  --build=mingw32 --host=i686-w64-mingw32
    make
    make install

    至此第三方库都被安装到了/usr/local目录下

    64位的mingw64把host改为x86_64-w64-mingw32

    (未完待续)

  • 相关阅读:
    操作系统简介
    计算机基础
    Django之form
    CMDB资产采集
    Git
    User model
    多级评论
    个人主页
    media路径设置
    Web框架
  • 原文地址:https://www.cnblogs.com/nkzhangkun/p/4698648.html
Copyright © 2020-2023  润新知