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

在Mac电脑上运行出现“Segmentation fault: 11” #172

Open
wtqn0206 opened this issue Jan 6, 2025 · 3 comments
Open

在Mac电脑上运行出现“Segmentation fault: 11” #172

wtqn0206 opened this issue Jan 6, 2025 · 3 comments

Comments

@wtqn0206
Copy link

wtqn0206 commented Jan 6, 2025

mac电脑上安装bmf:
pip install BabitMF
运行代码出现“Segmentation fault: 11”
环境具体信息:2.3 GHz 双核Intel Core i5,macOS 13.6.9 (22G830),conda python3.7,python3.9也是会出现相同的错误
我的代码为:
import sys
import bmf

print("当前 Python 版本:", sys.version)

input_video_path = "./testData/input.mp4"
output_path = "./testData/output.mp4"
(
bmf.graph()
.decode({'input_path': input_video_path})['video']
.scale(720, 576)
.encode(None, {
"output_path": output_path,
"video_params": {
"codec": "libx264"
}
}).run()
)

Copy link

github-actions bot commented Jan 6, 2025

Thank you for your feedback! We have received your question and will deal with it later.
If any developer is interested in this issue, please leave a message "claim this issue" below the issue. Welcome to participate in open source co-construction!
We are very grateful to every contributor.
To communicate with official developers, you can download the Feishu app and scan the QR code to join the Feishu group!
Thank you again for your support!
feishu-qr-code
感谢您的反馈!我们已经收到您的问题,并会在稍后处理。
如果有开发者对这个问题感兴趣,请在问题下方留言“认领此问题”。欢迎参与开源共建!
如需与官方开发者沟通,可以下载飞书应用并扫描二维码加入飞书群!
再次感谢您的支持!

@JackLau1222
Copy link
Collaborator

JackLau1222 commented Jan 6, 2025

mac电脑上安装bmf: pip install BabitMF 运行代码出现“Segmentation fault: 11” 环境具体信息:2.3 GHz 双核Intel Core i5,macOS 13.6.9 (22G830),conda python3.7,python3.9也是会出现相同的错误 我的代码为: import sys import bmf

print("当前 Python 版本:", sys.version)

input_video_path = "./testData/input.mp4" output_path = "./testData/output.mp4" ( bmf.graph() .decode({'input_path': input_video_path})['video'] .scale(720, 576) .encode(None, { "output_path": output_path, "video_params": { "codec": "libx264" } }).run() )

请确保conda或python与芯片架构(x86,arm64)一致

file $(which python)

如果不一致,就可能出现此错误

@hulibruce
Copy link
Contributor

There was a Python path issue with pip installation on macOS using Conda. A temporary solution resolved the problem (sudo ln -s /Users/xxx/miniconda3/envs/bmf_39/bin/python3 /Users/xxx/miniconda3/envs/bmf_39/lib/python3.9/site-packages/bmf/lib/Python)but a thorough solution is needed for a permanent fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants