Skip to content

Build FFmpeg for Windows / ARM64 #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,25 @@ jobs:
- os: macos-13
arch: x86_64
shell: bash
- os: ubuntu-24.04-arm
arch: aarch64
shell: bash
- os: ubuntu-24.04
arch: i686
shell: bash
- os: ubuntu-24.04
arch: x86_64
shell: bash
- os: windows-11-arm
arch: ARM64
shell: 'msys2 {0}'
msys_prefix: mingw-w64-clang-aarch64
msys_system: CLANGARM64
- os: windows-latest
arch: AMD64
shell: 'msys2 {0}'
- os: ubuntu-24.04-arm
arch: aarch64
shell: bash
msys_prefix: mingw-w64-x86_64
msys_system: MINGW64
defaults:
run:
shell: ${{ matrix.shell }}
Expand All @@ -55,11 +62,11 @@ jobs:
brew update
brew unlink gettext libidn2 libpng libtiff libunistring libx11 libxau libxcb libxdmcp little-cms2 unbound
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-latest' || matrix.os == 'windows-11-arm'
with:
install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm openssl-devel
path-type: inherit
release: false
install: base-devel openssl-devel ${{ matrix.msys_prefix }}-gcc ${{ matrix.msys_prefix }}-gperf ${{ matrix.msys_prefix }}-nasm
msystem: ${{ matrix.msys_system }}
#path-type: inherit
- name: Build FFmpeg
env:
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down
26 changes: 0 additions & 26 deletions patches/winpthreads.patch

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/build-ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,6 @@ def main():
builder = Builder(dest_dir=dest_dir)
builder.create_directories()

# Fix winpthreads breakage until the fix reaches msys2 repos.
if plat == "Windows":
run(["patch", "-d", "C:/msys64/mingw64", "-i", os.path.join(builder.patch_dir, "winpthreads.patch"), "-p3"])

# install packages
available_tools = set()
if plat == "Windows":
Expand Down
4 changes: 3 additions & 1 deletion scripts/cibuildpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def get_platform() -> str:
elif system == "Darwin":
return f"macosx_{machine}"
elif system == "Windows":
if struct.calcsize("P") * 8 == 64:
if machine == "ARM64":
return "win_arm64"
elif struct.calcsize("P") * 8 == 64:
return "win_amd64"
else:
return "win32"
Expand Down
Loading