I want to automate using Amazon's Elastic Transcoder to trim a video file in Django. My code so far is:
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)
This code will cause the file to be transcoded but will not trim it. What do I add in order to trim the video?
question from:
https://stackoverflow.com/questions/65661693/how-do-i-set-the-duration-of-the-output-of-a-job-in-elastic-transcoder-using-dja 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…