I want to automate using Amazon's Elastic Transcoder to trim a video file in Django. The 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?