|
|
|
@ -26,7 +26,7 @@ module AliyunVod::Service::VideoManage
|
|
|
|
|
result
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 读取视频编码格式
|
|
|
|
|
# 读取视频编码格式与视频格式
|
|
|
|
|
def get_meta_code_info(video_id)
|
|
|
|
|
params = {
|
|
|
|
|
Action: 'GetMezzanineInfo',
|
|
|
|
@ -36,11 +36,14 @@ module AliyunVod::Service::VideoManage
|
|
|
|
|
|
|
|
|
|
result = request(:post, params)
|
|
|
|
|
Rails.logger.info("#######:#{result['Mezzanine']['VideoStreamList'][0]['CodecName']}")
|
|
|
|
|
result['Mezzanine']['VideoStreamList'][0]['CodecName']
|
|
|
|
|
codecnamne = result['Mezzanine']['VideoStreamList'].first['CodecName']
|
|
|
|
|
file_url = result['Mezzanine']['FileURL']
|
|
|
|
|
format = file_url&.split(".")&.last
|
|
|
|
|
|
|
|
|
|
{codecnamne: codecnamne, format: format}
|
|
|
|
|
rescue => e
|
|
|
|
|
Rails.logger.info "读取视频编码信息失败: #{video_id}, #{e.message}"
|
|
|
|
|
""
|
|
|
|
|
[codecnamne: "", format: ""]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 删除视频信息
|
|
|
|
|