许可证:[errno 13]拒绝了权限:' ffprobe' (自审见)

发布于 2025-02-08 03:04:45 字数 1632 浏览 2 评论 0原文

我正在尝试获取AudieSement在本地计算机上工作。解决了一些问题后,我陷入了我似乎无法解决的许可错误。让我详细说明到目前为止所做的事情(以便易于检测到错误):

i pip同时安装了ffprobeffmpeg。但是,当i 导入ffprobe时,它提高了Infrorror:无法导入名称'ffprobe'。值得庆幸的是,能够在出色的帖子下进行修复。但是现在,当我运行audio = audiosegring.from_file(audioname)时,它会引发以下错误:cermission> cermissionerror:[errno 13]拒绝了权限:'ffprobe'。基于评论之一在这里,我使用权限使用权限(我认为哪个是授予文件夹的最大权限?):

import os
import stat
os.chmod('/path/to/ffmpeg', stat.S_IRWXU)
os.chmod('/path/to/ffprobe', stat.S_IRWXU) 

为了100%确定,我然后手动调整了ffmpegffprobe中所有文件的权限使用stat.s_irwxu的文件夹,但无济于事(也尝试了CHMOD 755)。我还确认了是否实际授予执行权限(使用os.access(my_file,os.x_ok)),但仍会遇到相同的错误。 许可

AudioSegment.converter = "/path/to/ffmpeg"
AudioSegment.ffmpeg = "/path/to/ffmpeg"
AudioSegment.ffprobe = "/path/to/ffprobe"
  1. 还更改了.mp3文件的 还有一个运行时警告(我认为与我遇到的错误无关),但在这里提到它可以完成:
/opt/anaconda3/lib/python3.8/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)

谢谢!

I am trying to get AudioSegment working on my local computer. After resolving some issues, I am stuck on a permission error that I cannot seem to resolve. Let me detail what I have done so far (so that the error is easy to detect):

I pip installed both ffprobe and ffmpeg. But when I import ffprobe, it raised ImportError: cannot import name 'FFProbe'. Thankfully, was able to fix it following a brilliant post here. But now when I run audio = AudioSegment.from_file(audioname), it raises the following error: PermissionError: [Errno 13] Permission denied: 'ffprobe'. Based on one of the comments here, I manually adjusted the permissions using (which I think is the maximum permission granted to a folder?):

import os
import stat
os.chmod('/path/to/ffmpeg', stat.S_IRWXU)
os.chmod('/path/to/ffprobe', stat.S_IRWXU) 

Just to be 100% sure, I then manually adjusted the permissions for all the files in ffmpeg and ffprobe folders using stat.S_IRWXU, but to no avail (also tried chmod 755). I also confirmed if execution permission was actually granted (using os.access(my_file, os.X_OK)) but still get the same error. (Also changed the permission for the .mp3 file, no luck)

Additional details:

  1. Based on a suggestion somewhere, I also added the following options right after importing AudioSegment:
AudioSegment.converter = "/path/to/ffmpeg"
AudioSegment.ffmpeg = "/path/to/ffmpeg"
AudioSegment.ffprobe = "/path/to/ffprobe"
  1. There is also a runtime warning (that I don't think has anything to do with the error I get) but mentioning it here for completion:
/opt/anaconda3/lib/python3.8/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

§对你不离不弃 2025-02-15 03:04:45

更新:

我手动删除了ffmpegffprobe,然后安装ffmpeg通过BREW brew naster。它奏效了!

Update:

I manually deleted ffmpeg and ffprobe and then installed ffmpeg via brew install. It worked!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文