ffmpeg - 如何在 Google App Engine 上安装 ffmpeg?
问题描述
我打算将 ffmpeg 和 ffprobe 安装到我的 Google App Engine flex 环境中,如何将 requirements.txt 作为一个包来执行此操作?
我目前正在使用 ffmpeg-python,这只是一个包装器。
ffmpeg-python==0.2.0
ffprobe-python==1.0.3
以下是我尝试使用 ffmpeg-python 包装器时出现的错误,这是预期的,因为没有 ffmpeg 和 ffprobe 可用:
2020-05-03 11:42:36 default[20200503t112932] [03/May/2020 11:42:36] ERROR [log.py:228] Internal Server Error: /capture_thumbnail/
2020-05-03 11:42:36 default[20200503t112932] Traceback (most recent call last): File "/env/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/env/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/env/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/vmagent/app/core/views.py", line 62, in capture_thumbnail generate_thumbnail(request, blob_uuid) File "/home/vmagent/app/core/videointelligence1.py", line 264, in generate_thumbnail probe = ffmpeg.probe(video_url) File "/env/lib/python3.6/site-packages/ffmpeg/_probe.py", line 20, in probe p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/opt/python3.6/lib/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/opt/python3.6/lib/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe'
您能否建议一种方法,以便我可以在 Google App Engine 上使用 ffprobe。
解决方案
推荐阅读
- python - Python 装饰器,增加了与 Python2 和 Python3 的关键字参数兼容性
- haskell - 如何使线像圆一样粗?
- grep - 将自定义消息和 grep 一起传送到 mutt
- redirect - NGINX/Openshift - 定位块重定向到错误的端口
- python - Python中的Toda-Yamamoto Granger因果关系检验
- algorithm - 检查两个列表的最佳算法技术
- sql - 我如何拉取或显示一个二级经理姓名而不是两个二级经理
- ansible - 在查找内部查找 - ansible
- python - 当平均值和标准值依赖于另一列值时,将高斯分布应用于特定列的所有值
- vue.js - vue-cli 3 导入'bootstrap/dist/css/bootstrap.css'错误