Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    编译windows 平台能用 ffmpeg sdk

    灌水区
    1
    8
    3049
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      memory LV 7 last edited by

      方案①:

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

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

      1 Reply Last reply Reply Quote Share 0
      • M
        memory LV 7 last edited by

        方案②,在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 Reply Last reply Reply Quote Share 0
        • M
          memory LV 7 last edited by

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

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

          1 Reply Last reply Reply Quote Share 0
          • M
            memory LV 7 last edited by

            下载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 Reply Last reply Reply Quote Share 0
            • M
              memory LV 7 last edited by 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 Reply Last reply Reply Quote Share 0
              • M
                memory LV 7 last edited by

                编译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 Reply Last reply Reply Quote Share 0
                • M
                  memory LV 7 last edited by

                  这样就在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 Reply Last reply Reply Quote Share 0
                  • M
                    memory LV 7 last edited by

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

                    1 Reply Last reply Reply Quote Share 0
                    • 1 / 1
                    • First post
                      Last post

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

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