imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
221 stars 50 forks source link

Include ffmpeg suitable for Apple Silicon macos arm64 platform #114

Open GenevieveBuckley opened 1 month ago

GenevieveBuckley commented 1 month ago

Closes https://github.com/imageio/imageio-ffmpeg/issues/71

This PR follows the approach suggested in https://github.com/imageio/imageio-ffmpeg/issues/71#issuecomment-2068803835

  • Update _definitions.py
    • Make sure the apple silicon platform is detected by get_platform().
    • Add new exe file name to FNAME_PER_PLATFORM.
    • Add entry to WHEEL_BUILDS.

Stilll required:

This comment suggests http://www.osxexperts.net/ is a reliable source for the ffmpeg binary. Example ffmpeg download:

wget https://www.osxexperts.net/ffmpeg7arm.zip
unzip ffmpeg7arm.zip
mv ffmpeg ffmpeg-osx-arm64-v7
shasum -a 256 ffmpeg
# Expected SHA256 checksum
# 326895b16940f238d76e902fc71150f10c388c281985756f9850ff800a2f1499

# https://github.com/imageio/imageio-ffmpeg/issues/71#issuecomment-1549677710
# "Although it is not notarized, so I had to run xattr -c ffmpeg to bless it"
xattr -c ffmpeg-osx-arm64-v7
GenevieveBuckley commented 1 month ago

Marking as draft PR, until the ffmpeg binary for macos arm64 is uploaded.

almarklein commented 1 month ago

I added the ffmpeg MacOS executable for Silicon: https://github.com/imageio/imageio-binaries/commit/66322a9e1472283468a2383b0eb896e9f1d41e73. Added the same version for x86 for good measure. Their names are: ffmpeg-osx-arm64-v7.0 and ffmpeg-osx-x86-v7.0.