导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    编译windows 平台能用 ffmpeg sdk

    灌水区
    1
    8
    2736
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • M
      memory LV 7 最后由 编辑

      方案①:

      https://blog.csdn.net/qq_38770502/article/details/116715809

      MSYS2+mingw 编译 ffmpeg 在windows下完整过程

      1 条回复 最后回复 回复 引用 分享 0
      • M
        memory LV 7 最后由 编辑

        方案②,在ubuntu18.04使用mingw工具链编译:

        ubunt18.04 编译安装 win32/win64 ffmpeg sdk:

        sudo apt-get install git mingw-w64* -y

        git clone git clone https://gitee.com/mirrors/ffmpeg -b release/6.0

        编译win32版本:
        ./configure --arch=x86 --target-os=mingw32 --prefix=/opt/ffmpeg_install/ --cross-prefix=i686-w64-mingw32-

        编译win64版本:
        ./configure --arch=x86 --target-os=mingw64 --prefix=/opt/ffmpeg_install/ --cross-prefix=x86_64-w64-mingw32-

        1 条回复 最后回复 回复 引用 分享 0
        • M
          memory LV 7 最后由 编辑

          48abaa33-eeef-44b0-9b53-953b3b350cf2-0dbad06fdcb8adf04fcd8e4ff6ff01f.png

          ca04a482-54ea-4210-8e4e-2ad1f363ebdf-b7544f128be074e1f94dfeefb07a99d.png

          1 条回复 最后回复 回复 引用 分享 0
          • M
            memory LV 7 最后由 编辑

            下载zlib:
            wget https://www.zlib.net/zlib-1.3.tar.gz

            编译zlib:

            CC=x86_64-w64-mingw32-gcc ./configure --prefix=/usr/x86_64-w64-mingw32 --static

            参考:https://stackoverflow.com/questions/60582331/curl-https-not-working-after-cross-compilation

            1 条回复 最后回复 回复 引用 分享 0
            • M
              memory LV 7 最后由 whycan 编辑

              编译libpng:

              tar xvf libpng-1.6.37.tar.xz

              CC=x86_64-w64-mingw32-gcc ./configure --prefix=/usr/x86_64-w64-mingw32 --host=x86_64-w64-mingw32

              make install

              1 条回复 最后回复 回复 引用 分享 0
              • M
                memory LV 7 最后由 编辑

                编译SDL2:

                tar xvf SDL2-2.0.14.tar.gz

                CC=x86_64-w64-mingw32-gcc ./configure --prefix=/usr/x86_64-w64-mingw32 --host=x86_64-w64-mingw32

                make install

                1 条回复 最后回复 回复 引用 分享 0
                • M
                  memory LV 7 最后由 编辑

                  这样就在ubunt18可以生成带ffplay.exe的sdk了:

                  ./configure --arch=x86 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --prefix=/mnt/hgfs/D/work/ffmpeg/ffmpeg_sdk_win64_shared --enable-shared --disable-static --enable-ffplay --enable-decoder=png

                  1 条回复 最后回复 回复 引用 分享 0
                  • M
                    memory LV 7 最后由 编辑

                    编译 ffplay.exe 需要依赖SDL2,所以要先编译SDL2。

                    1 条回复 最后回复 回复 引用 分享 0
                    • 1 / 1
                    • First post
                      Last post

                    Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                    行为准则 | 用户协议 | 隐私权政策