如何在一个django应用程序上安装ffmpeg在heroku? [英] How to install ffmpeg for a django app on heroku?

查看:106
本文介绍了如何在一个django应用程序上安装ffmpeg在heroku?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ffmpeg从视频中提取框架,将其用作海报。这是我第一次部署应用程序,更不用说英雄,所以我不知道如何在服务器上安装ffmpeg。

I'd like to use ffmpeg to extract a frame from a video to use it as a poster. This is my first time deploying an app, let alone on heroku, so I'm not sure how to install ffmpeg on the server.

我发现这个构建的ffmpeg ,并将其提供给我的应用程序,然后调整我的应用程序的配置设置/路径。供应商意味着什么?我有一种感觉,这是一个轨道的东西,因为我似乎找不到一个解释谷歌搜索。

I've found this build of ffmpeg with instructions to 'vendor' it into my app, and then adjust my app's configuration settings / path. What does it mean to vendor something? I have a feeling it's a rails thing, because I can't seem to find an explanation by googling.

另外,django等效的运行
的说明heroku config:set PATH = bin:vendor / ffmpeg /箱:其中...> -a yourapp heroku config:set LD_LIBRARY_PATH = vendor / ffmpeg / lib:/ usr / local / lib -a yourapp

Also, what would be the django equivalent of the instructions to run heroku config:set PATH=bin:vendor/ffmpeg/bin:<...> -a yourapp and heroku config:set LD_LIBRARY_PATH=vendor/ffmpeg/lib:/usr/local/lib -a yourapp?

推荐答案

您可能希望将代码转换为这个

You might want to swap out the build pack for this one:

heroku config:add BUILDPACK_URL=https://github.com/integricho/heroku-buildpack-python-ffmpeg.git

构建包是什么将您的源代码构建到您的Heroku dynos中。这个构建包在构建时明确地包含了应用程序的ffmpeg。

The build pack is what takes your source code and builds what gets deployed to your Heroku dynos. This build pack explicitly includes ffmpeg with your app when it's built.

这篇关于如何在一个django应用程序上安装ffmpeg在heroku?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆