Error " [WinError 5] Access is denied" when running Moviepy

 I received error "PermissionError: [WinError 5] Access is denied" when running Python code "AudioFileClip(...)" a function from "moviepy" package.

My code environment:

  • OS: Windows
  • Python:  3.12.5
  • Moviepy: 1.0.3
After I investigated the issue, I found the moviepy returns "..\Lib\site-packages\moviepy" from 
the code "FFMPEG_BINARY = get_exe()" in "config.py" file. This is not the correct path points to "ffmpeg.exe" , and so I manually set the value of "FFMPEG_BINARY" to  the path of  "ffmpeg-win64-v4.2.2.exe" in "config_defaults.py" file.

FFMPEG_BINARY = r"..\\Lib\\site-packages\\imageio_ffmpeg\binaries\\ffmpeg-win64-v4.2.2.exe"

Related screenshot shows the origin value from the code “FFMPEG_BINARY = get_exe()”:

 

After  this change, the "AudioFileClip(audio_path)" running successfully.

Comments

Popular posts from this blog

Top JavaScript courses helping you develop SPFx webPart with ReactJS and AngularJS

React Native error - Cannot find module 'metro-react-native-babel-preset'

SharePoint 2013 error - "Application error when access /_vti_bin/client.svc"