Heroku ffmpeg用于视频上传的buildpacks [英] Heroku ffmpeg buildpacks for video uploads

查看:205
本文介绍了Heroku ffmpeg用于视频上传的buildpacks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有正确的方式来获得英雄ffmpeg安装和运行,以便我的用户可以在我的rails应用程序上传视频?



尝试了关于导致我的应用运行heroku错误检查日志页面的主题的Heroku引用...



<我知道有一些安装我必须通过,但似乎没有找到任何东西 - 请帮助链接或想法:)

解决方案


用户可以上传视频


我们已经在Heroku上工作之前;我们使用 paperclip-ffmpeg (这是现在 paperclip-av-transcoder )与实际的 Paperclip 宝石。



虽然我无法提供关于构建包的任何信息,但我可以分享我们如何获得在Heroku上工作的视频上传 ...

  #app / models / attachment.rb 
class Attachment< ActiveRecord :: Base
has_attached_file:附件,
样式:{thumb:{几何:100x100#,格式:'jpg',时间:10},中:{几何:300x300#格式:'jpg',time:10}},
processor:[:transcoder]
end

只要 paperclip-av-transcoder gem安装(确保您已经在 Gemfile ),这样可以让您存储所需的视频和图像。


Is there a proper way to get heroku ffmpeg installed and running so that my users can upload videos in my rails app?

Tried the Heroku references on the topic which led to my app running the heroku error check logs page...

I know there has to be some installation I have to pass but don't seems to find anything on it - Please help with links or ideas :)

解决方案

users can upload videos

We've had it working on Heroku before; we used paperclip-ffmpeg (which is now paperclip-av-transcoder) with the actual Paperclip gem.

Whilst I can't provide any information about the buildpacks, I can share how we were able to get video uploading working on Heroku...

#app/models/attachment.rb
class Attachment < ActiveRecord::Base
    has_attached_file :attachment,
    styles:     { thumb: { geometry: "100x100#", format: 'jpg', time: 10}, medium: { geometry: "300x300#", format: 'jpg', time: 10} },
    processors: [ :transcoder ]
end

As long as the paperclip-av-transcoder gem installs (ensure you've got it in your Gemfile), this should allow you to store the videos - and images - you need.

这篇关于Heroku ffmpeg用于视频上传的buildpacks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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