问题描述
我想使用 Amazon 的 Elastic Transcoder 自动修剪 Django 中的视频文件。到目前为止的代码是:
def trim_video(key,new_key,duration):
pipeline_id = 'XXXXXXXXXXXX-XXXXXX'
region = 'XXXXXXXX'
transcoder_client = boto.elastictranscoder.connect_to_region(region)
create_job_result=transcoder_client.create_job(**{
'pipeline_id': pipeline_id,'input_name': {'Key': key},'output': {
'Key': new_key,"PresetId": 'XXXXXXXXXXXXX-XXXXXX'
}
})
print('Job has been created. The output key will be ' + new_key)
此代码将导致文件被转码但不会修剪它。我要添加什么来修剪视频?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)