Skip to content
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

Not compatible with M1 chip #1867

Open
vitalii-bulyzhyn opened this issue Nov 14, 2022 · 4 comments
Open

Not compatible with M1 chip #1867

vitalii-bulyzhyn opened this issue Nov 14, 2022 · 4 comments
Labels
bug Issues that report (apparent) bugs. dependencies For issues and PRs concerning project dependencies. See lib- prefix for individual dependencies. environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. lib-FFmpeg Issues pertaining to dependency FFmpeg.

Comments

@vitalii-bulyzhyn
Copy link

Expected Behavior

Since mac with M1 has different architecture, path to ffmpeg should be /opt/homebrew/opt/ffmpeg

Actual Behavior

Now it's pointing to the /usr/bin and I get next error:

[Errno 2] No such file or directory: '/usr/bin/ffmpeg'

Steps to Reproduce the Problem

Specifications

  • Python Version: 3.9.15
  • Moviepy Version: 1.0.3
  • Platform Name: macOS
  • Platform Version: 12.0
@vitalii-bulyzhyn vitalii-bulyzhyn added the bug Issues that report (apparent) bugs. label Nov 14, 2022
@keikoro keikoro added lib-FFmpeg Issues pertaining to dependency FFmpeg. environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. dependencies For issues and PRs concerning project dependencies. See lib- prefix for individual dependencies. labels Nov 29, 2022
@keikoro
Copy link
Collaborator

keikoro commented Nov 29, 2022

Thanks for this bug report! Based on issues submitted to other projects I've seen, compatibility problems with M1 seem quite widespread...

@piotlinski
Copy link

@vitalii-bulyzhyn The real issue is that imageio_ffmpeg does not bundle ffmpeg for M1 macs: imageio/imageio-ffmpeg#71

The easiest solution I found was to install ffmpeg (version 4.x) via brew and alias ffmpeg to it (or pass it via the env variable). Unfortunately, moviepy is not yet fully compatible with version 5.x (default for brew as of Dec 2022)

@alairock
Copy link

alairock commented Feb 3, 2023

@vitalii-bulyzhyn The real issue is that imageio_ffmpeg does not bundle ffmpeg for M1 macs: imageio/imageio-ffmpeg#71

The easiest solution I found was to install ffmpeg (version 4.x) via brew and alias ffmpeg to it (or pass it via the env variable). Unfortunately, moviepy is not yet fully compatible with version 5.x (default for brew as of Dec 2022)

Can confirm. Running moviepy on an M1. Just needed to brew install ffmpeg.

@flerovious
Copy link

In case anyone else is stuck with the same issue but already has the latest version of ffmpeg installed, here is what I did to debug and fix:

  1. Install ffmpeg version 4 with brew install ffmpeg@4
  2. Check that ffmpeg 4.4.4 (latest version for ffmpeg 4) is installed. Mine was installed at /opt/homebrew/Cellar/ffmpeg@4/4.4.4/bin/ffmpeg
  3. Create or add the following environment variable to your .env file
FFMPEG_BINARY="/opt/homebrew/Cellar/ffmpeg@4/4.4.4/bin/ffmpeg"
  1. Check that moviepy loads ffmpeg successfully with the following python script
from moviepy.config import *

if try_cmd([FFMPEG_BINARY])[0]:
    print( "MoviePy : ffmpeg successfully found." )
else:
    print( "MoviePy : can't find or access ffmpeg." )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs. dependencies For issues and PRs concerning project dependencies. See lib- prefix for individual dependencies. environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. lib-FFmpeg Issues pertaining to dependency FFmpeg.
Projects
None yet
Development

No branches or pull requests

5 participants