gpt4 book ai didi

ruby-on-rails - 回形针-ffmpeg 中的视频内容类型无效

转载 作者:行者123 更新时间:2023-12-04 23:09:04 25 4
gpt4 key购买 nike

当我尝试在回形针-ffmpeg 中上传 .mov 视频时,会出现错误

Video content type is invalid in paperclip-ffmpeg



我的代码是
has_attached_file :video, :styles => { 
:medium => { :geometry => "640x480", :format => 'webm' }
}, :processors => [:ffmpeg]
validates_attachment_size :video, :less_than => 100.megabytes
validates_attachment_presence :video
validates_attachment_content_type :video, :content_type => ["video/mov"]

最佳答案

您应该使用 video/quicktime作为 mimetype。在此处查看视频模仿类型列表:

http://help.encoding.com/knowledge-base/article/correct-mime-types-for-serving-video-files/

关于ruby-on-rails - 回形针-ffmpeg 中的视频内容类型无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33864604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com