Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

boto3 - How do I set the duration of the output of a job in Elastic Transcoder using Django?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...