发布的视频

dev_jupyter
daiao 5 years ago
parent 2dfb081f4f
commit 8bdeb3ea45

@ -3,7 +3,7 @@ namespace :video_transcode do
desc "视频转码成h264"
task :submit => :environment do
i = []
Video.where.not(uuid: nil, file_url: nil).where(transcoded: false).find_each do |v|
Video.where.not(uuid: nil, file_url: nil).where(transcoded: false, status: "published").find_each do |v|
code_info = AliyunVod::Service.get_meta_code_info(v.uuid)
if v.file_url.include?('.mp4') && code_info[:codecnamne]&.include?("h264")
v.update(transcoded: true)

Loading…
Cancel
Save