许可证:[errno 13]拒绝了权限:' ffprobe' (自审见)
我正在尝试获取AudieSement
在本地计算机上工作。解决了一些问题后,我陷入了我似乎无法解决的许可错误。让我详细说明到目前为止所做的事情(以便易于检测到错误):
i pip
同时安装了ffprobe
和ffmpeg
。但是,当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%确定,我然后手动调整了ffmpeg
和ffprobe
中所有文件的权限使用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"
- 还更改了
.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:
- 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"
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:
我手动删除了
ffmpeg
和ffprobe
,然后安装ffmpeg
通过BREW brew naster
。它奏效了!Update:
I manually deleted
ffmpeg
andffprobe
and then installedffmpeg
viabrew install
. It worked!