如何在 Rails 中处理后更新回形针视频位置
我正在使用 Paperclip 来处理用户通过 ffmpeg 上传的视频。我想创建缩略图并将视频转换为我选择的标准格式。我有 ffmpeg 处理工作,但是,我似乎不知道如何在处理完成后更新记录。我使用了许多 Rails - paperclip - ffmpeg 参考资料,但没有看到有人转换视频,然后在 Rails 数据库中使用转换后的视频,因为它正在创建一个新视频,我需要能够更新记录在回形针处理器内,但是怎么做呢?
感谢
- Rails 3
- 使用带有回形针处理器和 ffmpeg 的
I'm using Paperclip for processing a user uploaded video with ffmpeg. I want to create a thumbnail image as well as convert the video to a standard format of my choosing. I have the ffmpeg processing working, however, I can't seem to figure out how to update the record after it has finished processing. I've used a number of rails - paperclip - ffmpeg references but haven't seen anyone converting the video and then using the converted video in the rails db, since it's creating a new video I will need to be able to update the record from within the paperclip processor, but how to do it??
Thanks
- using Rails 3
- using paperclip processor with ffmpeg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 Paperclip::Processor 的文档:
所以你的处理器看起来像这样:
Per the documentation for Paperclip::Processor:
So your Processor would look something like this: