gpt4 book ai didi

visual-studio - 需要帮助使用 MSVC 工具编译 FFmpeg

转载 作者:行者123 更新时间:2023-12-04 22:55:33 31 4
gpt4 key购买 nike

我需要使用 MSVC 2017 编译器在 Windows 10 上编译 FFmpeg。我遵循了一些指南:

  • https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC
  • https://www.ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
  • https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html

  • 我安装了当前稳定版本的MSYS,修复了link.exe和PATH环境的使用,安装了 make diffutils gcc pkg-config并下载了 c99-to-c89、nasm 和 inttypes.h

    我认为我的环境现在已正确设置,我从 MSVC 命令提示符运行 MSYS shell 并且一切都可以访问。
    $ which cl
    /c/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.12.25827/bin/HostX64/x64/cl

    $ which link
    /c/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.12.25827/bin/HostX64/x64/link

    $ which yasm
    /home/Antoine/bin/yasm

    $ which c99conv
    /home/Antoine/bin/c99conv

    $ which c99wrap
    /home/Antoine/bin/c99wrap

    现在我配置构建
    $ ./configure --toolchain=msvc
    install prefix /usr/local
    source path .
    C compiler cl
    C library msvcrt
    ARCH x86 (generic)
    big-endian no
    runtime cpu detection yes
    standalone assembly yes
    x86 assembler nasm
    MMX enabled yes
    MMXEXT enabled yes
    3DNow! enabled yes
    3DNow! extended enabled yes
    SSE enabled yes
    SSSE3 enabled yes
    AESNI enabled yes
    AVX enabled yes
    AVX2 enabled yes
    XOP enabled yes
    FMA3 enabled yes
    FMA4 enabled yes
    i686 features enabled yes
    CMOV is fast yes
    EBX available no
    EBP available no
    debug symbols yes
    strip symbols no
    optimize for size no
    optimizations yes
    static yes
    shared no
    postprocessing support no
    network support yes
    threading support w32threads
    safe bitstream reader yes
    texi2html enabled no
    perl enabled no
    pod2man enabled no
    makeinfo enabled no
    makeinfo supports HTML no

    External libraries:
    schannel xlib

    External libraries providing hardware acceleration:
    cuda cuvid d3d11va dxva2 nvenc

    Libraries:
    avcodec avdevice avfilter avformat avutil swresample swscale

    Programs:
    ffmpeg ffprobe

    [...]
    Hundreds of modules, library, etc.
    [...]

    License: LGPL version 2.1 or later
    Creating configuration files ...
    config.h is unchanged
    config.asm is unchanged
    libavutil/avconfig.h is unchanged
    libavcodec/bsf_list.c is unchanged
    libavformat/protocol_list.c is unchanged

    但是当我运行 make它很快停止
    $ make
    Makefile:47: la cible « qt-faststart » ne correspond pas au motif de cible
    Makefile:47: la cible « trasher » ne correspond pas au motif de cible
    Makefile:47: la cible « uncoded_frame » ne correspond pas au motif de cible
    Makefile:91: ffbuild/library.mak: No such file or directory
    make: *** Aucune règle pour fabriquer la cible « ffbuild/library.mak ». Arrêt.

    对不起法语的措辞,我不知道如何告诉 MSVC 用英语打印它的输出。基本上,错误意味着:
    Makefile:47: target « qt-faststart » doesn't match the target pattern
    make: *** No rule to make target « ffbuild/library.mak ». Stopped.

    旁注:
    $ tree ffbuild
    ffbuild
    ├── config.fate
    ├── config.log
    ├── config.mak
    └── config.sh

    没错,在ffbuild里面没有生成library.mak,但是不知道为什么,configure脚本也没有输出任何错误信息……

    有人可以帮我找出我做错了什么吗?

    编辑:
    make distclean没有帮助
    $ make distclean
    Makefile:47: la cible « qt-faststart » ne correspond pas au motif de cible
    Makefile:47: la cible « trasher » ne correspond pas au motif de cible
    Makefile:47: la cible « uncoded_frame » ne correspond pas au motif de cible
    Makefile:91: ffbuild/library.mak: No such file or directory
    make: *** Aucune règle pour fabriquer la cible « ffbuild/library.mak ». Arrêt.

    最佳答案

    github 重新下载源为 zip 包后,我终于在 Windows 上成功编译了 FFmpeg .我之前从 ffmpeg.org 下载了源代码,但存档 (.tar.bz2) 可能已损坏和/或在某些时候提取失败。

    关于visual-studio - 需要帮助使用 MSVC 工具编译 FFmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48519993/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com