diff --git a/lib/tasks/video_transcode.rake b/lib/tasks/video_transcode.rake index 98221e007..4fb7c17bd 100644 --- a/lib/tasks/video_transcode.rake +++ b/lib/tasks/video_transcode.rake @@ -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)