如何使用 Django 在 Elastic Transcoder 中设置作业输出的持续时间?

问题描述

我想使用 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 (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...