在 Linux 上使用 x264 为 MacOS 和 Windows 编译 FFmpeg

问题描述 投票:0回答:0

我成功地编译了一个最小的独立 FFmpeg 二进制文件,以从使用 x264 编码的 JPG 图像创建 MP4 视频。二进制文件 100% 可用,大小为 5.2MB。

为此,我使用了:

./configure \
--disable-everything \
--enable-decoder=mjpeg \
--enable-encoder=libx264 \
--enable-protocol=concat,file \
--enable-demuxer=image2 \
--enable-muxer=mp4 \
--enable-filter=scale \
--enable-gpl \
--enable-libx264 \
--extra-ldexeflags="-static" \
--pkg-config="pkg-config --static"

我现在想直接从我的 Linux 机器构建 macOS 和 windows 二进制文件。我试过 this repo 并用我的配置参数替换了配置参数,但输出 exe 是 30MB+。而且我没有找到任何关于为 MacOS 构建的信息。

是否有解决方案使这个最小构建跨平台兼容?

windows macos ffmpeg build cross-platform
© www.soinside.com 2019 - 2024. All rights reserved.