Parade Series - FFMPEG (Stable X64)

在这里插入图片描述
MSYS2

https://github.com/msys2/msys2-installer/releases/download/2024-01-13/msys2-x86_64-20240113.exe

Initializing Toolschain

pacman -S mingw-w64-x86_64-toolchain 
pacman -S base-devel yasm nasm gcc libpng libtool autoconf automake vim
pacman -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-zlib mingw-w64-x86_64-ragel

msys2_shell.cmd

set MSYS2_PATH_TYPE=inherit

在这里插入图片描述

[x64 Native Tools Command Prompt for VS 2022] ==> [mingw64]

C:\Program Files\Microsoft Visual Studio\2022\Enterprise>C:\Tools\msys64\msys2_shell.cmd -mingw64
/home/55829/ffmpeg-6.0.1>grep -ni drawtext configure
235:  --enable-libfontconfig   enable libfontconfig, useful for drawtext filter [no]
236:  --enable-libfreetype     enable libfreetype, needed for drawtext filter [no]
237:  --enable-libfribidi      enable libfribidi, improves drawtext filter [no]
3663:drawtext_filter_deps="libfreetype"
3664:drawtext_filter_suggest="libfontconfig libfribidi"

Compiling X264

/home/55829/x264>CC=cl ./configure --prefix=/usr/local--enable-static
/home/55829/x264>make 
/home/55829/x264>make install
/home/55829/x264>echo $PKG_CONFIG_PATH
/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
/home/55829/x264>export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
/home/55829/ffmpeg-6.0.1>time CC=cl ./configure --prefix=/usr/local/install --enable-shared
		--target-os=win64 --arch=x86_64 --enable-cross-compile --toolchain=msvc
		--disable-debug --extra-cflags=-l/usr/local/include --extra-ldflags=-L/usr/local/lib
		--enable-gpl
		--enable-libvpx
		--enable-libfreetype
		--enable-libfontconfig
		--enable-libfribidi
		--enable-version3
		--enable-iconv
		--enable-libass
		--enable-libopenjpeg
		--enable-libopus
		--enable-libwebp
		--enable-libx264
		--enable-libxml2
		--enable-zlib
		--enable-lzma
		--enable-libx265
		--enable-libvorbis
		--enable-libsoxr
		--enable-libmp3lame
		--enable-libopenmpt
		--enable-sdl2

Compiling freetype2

/home/55829/freetype-2.13.2>./configure --prefix=/usr/local/
/home/55829/freetype-2.13.2>make
/home/55829/freetype-2.13.2>make install
/home/55829/freetype-2.13.2>cat /usr/local/lib/pkgconfig/freetype2.pc
prefix=/usr/local
exec_prefix=/usr/local
libdir=/usr/local/lib
includedir=/usr/local/include

Name: FreeType 2
URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 26.1.20
Requires:
Requires.private: zlib, bzip2, libpng
Libs: -L/usr/local/lib -lfreetype
Libs.private:
Cflags: -I${includedir}

Compiling fribidi

/home/55829/fribidi>./autogen.sh
/home/55829/fribidi>./configure --prefix=/usr/local/
/home/55829/fribidi>make
/home/55829/fribidi>make install

Compiling libvpx

/home/55829/libvpx>./configure --enable-static --target=x86_64-win64-vs17 --enable-vp8-encoder --enable-vp8-decoder
/home/55829/libvpx>
enabled libvpx            && {
    enabled libvpx_vp8_decoder && {
        check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
            check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-LC:/Tools/msys64/usr/local/lib -lvpx -lmsvcrtd $libm_extralibs $pthreads_extralibs"
    }
    enabled libvpx_vp8_encoder && {
        check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
            check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-LC:/Tools/msys64/usr/local/lib -lvpx -lmsvcrtd $libm_extralibs $pthreads_extralibs"
    }
    enabled libvpx_vp9_decoder && {
        check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
            check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-LC:/Tools/msys64/usr/local/lib -lvpx -lmsvcrtd $libm_extralibs $pthreads_extralibs"
    }
    enabled libvpx_vp9_encoder && {
        check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
            check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-LC:/Tools/msys64/usr/local/lib -lvpx -lmsvcrtd $libm_extralibs $pthreads_extralibs"
    }
    if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
        die "libvpx enabled but no supported decoders found"
    fi
}

pkg-config

/home/55829/ffmpeg-6.0.1>pkg-config --list-all

(pkg-config.exe:9292): GLib-CRITICAL **: g_string_append: assertion 'val != NULL' failed
python-3.11           Python - Build a C extension for Python
python3-embed         Python - Embed Python into an application
libpng16              libpng - Loads and saves PNG files
libxxhash             xxhash - extremely fast hash algorithm
fontconfig            Fontconfig - Font configuration and customization library
zlib                  zlib - zlib compression library
ncursesw              ncursesw - ncurses 6.4 library
avisynth              AviSynth+ - A powerful nonlinear scripting language for video.
mpfr                  mpfr - C library for multiple-precision floating-point computations
gio-2.0               GIO - glib I/O library
freetype2             FreeType 2 - A free, high-quality, and portable font engine.
isl                   isl - isl Library
tre                   TRE - TRE regexp matching library
termcap               Termcap - GNU Termcap library and data base that enables programs to use display terminals in a terminal-independent manner
libpng                libpng - Loads and saves PNG files
libbrotlienc          libbrotlienc - Brotli encoder library
gmodule-export-2.0    GModule - Dynamic module loader for GLib
gmp                   GNU MP - GNU Multiple Precision Arithmetic Library
iconv                 iconv - libiconv
panelw                panelw - ncurses 6.4 add-on library
graphite2             Graphite2 - Font rendering engine for Complex Scripts
gmpxx                 GNU MP C++ - GNU Multiple Precision Arithmetic Library (C++ bindings)
libbrotlicommon       libbrotlicommon - Brotli common dictionary library
python-3.11-embed     Python - Embed Python into an application
gnurx                 regex - Regular Expressions library
libffi                libffi - Library supporting Foreign Function Interfaces
libpcre2-8            libpcre2-8 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support
libzstd               zstd - fast lossless compression algorithm library
sqlite3               SQLite - SQL database engine
libcrypto             OpenSSL-libcrypto - OpenSSL cryptography library
openssl               OpenSSL - Secure Sockets Layer and cryptography libraries and tools
libbrotlidec          libbrotlidec - Brotli decoder library
expat                 expat - expat XML parser
tk                    The Tk Toolkit - Tk is a cross-platform graphical user interface toolkit, the standard GUI not only for Tcl, but for many other dynamic languages as well.
libssl                OpenSSL-libssl - Secure Sockets Layer and cryptography libraries
gmodule-2.0           GModule - Dynamic module loader for GLib
glib-2.0              GLib - C Utility Library
gthread-2.0           GThread - Thread support for GLib
gio-windows-2.0       GIO Windows specific APIs - Windows specific headers for glib I/O library
wineditline           wineditline - EditLine API implementation for the native Windows Console
libpcre2-posix        libpcre2-posix - Posix compatible interface to libpcre2-8
gobject-2.0           GObject - GLib Type, Object, Parameter and Signal Library
x264                  x264 - H.264 (MPEG4 AVC) encoder library
x265                  x265 - H.265/HEVC video encoder
liblzma               liblzma - General purpose data compression library
libpcre2-16           libpcre2-16 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support
libpcre2-32           libpcre2-32 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support
readline              Readline - Gnu Readline library for command line editing
menuw                 menuw - ncurses 6.4 add-on library
history               History - Gnu History library for managing previously-entered lines
regex                 regex - Regular Expressions library
bzip2                 bzip2 - Lossless, block-sorting data compression
tcl                   Tool Command Language - Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses.
fribidi               GNU FriBidi - Unicode Bidirectional Algorithm Library
formw                 formw - ncurses 6.4 add-on library
gmodule-no-export-2.0 GModule - Dynamic module loader for GLib
python3               Python - Build a C extension for Python
ncurses++w            ncurses++w - ncurses 6.4 add-on library

/home/55829/ffmpeg-6.0.1>time CC=cl ./configure --prefix=/usr/local/install --enable-shared --enable-gpl --arch=x86 --toolchain=msvc --extra-cflags=-l/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-cross-compile --enable-version3 --enable-sdl2 --enable-fontconfig --enable-libass --enable-libopenjpeg --enable-libopus --enable-libwebp --enable-libx264 --enable-libxml2 --enable-lzma --enable-zlib

$HOME/ffmpeg-6.0.1/config.h

#define CC_IDENT "Microsoft (R) C/C++"

$HOME/ffmpeg-6.0.1/libavformat/rtsp.c

const AVOption ff_rtsp_options[] = {

    { "timeout", "set timeout (in microseconds) of socket I/O operations", OFFSET(stimeout), AV_OPT_TYPE_INT64, {.i64 = 0}, INT_MIN, INT64_MAX, DEC },

    { NULL },
};
/home/55829/ffmpeg-6.0.1>make
/home/55829/ffmpeg-6.0.1>make install
/home/55829>ffmpeg
ffmpeg version 6.0.1 Copyright (c) 2000-2023 the FFmpeg developers
  configuration: --prefix=/usr/local/install --enable-shared --disable-debug --target-os=win64 --arch=x86_64 --enable-cross-compile --toolchain=msvc --extra-cflags=-l/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-gpl --enable-libvpx --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-version3 --enable-iconv --enable-libass --enable-libopenjpeg --enable-libopus --enable-libwebp --enable-libx264 --enable-libxml2 --enable-zlib --enable-lzma --enable-libx265 --enable-libvorbis --enable-libsoxr --enable-libmp3lame --enable-libopenmpt
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值