Created
November 3, 2016 16:33
-
-
Save shentonfreude/39b33938ba2b31700c1768fdc2f609f3 to your computer and use it in GitHub Desktop.
Create AWS ElasticTranscoder preset that preserves frames per second based on their 1080p preset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create AWS ElasticTranscoder preset based on AWS 1080p with 'auto' framerate. | |
# This uses same output FPS as incoming, so we don't up/down sample. | |
import boto3 | |
et = boto3.client('elastictranscoder') | |
res = et.read_preset(Id='1351620000001-000001') # Generic 1080p | |
preset = res['Preset'] | |
del preset['Type'] | |
del preset['Id'] | |
del preset['Arn'] | |
del preset['Video']['AspectRatio'] # can't have this and maxwidth/maxheight | |
preset['Video']['FrameRate'] = 'auto' # change from 29.97 NTSC | |
preset['Name'] = 'AVAIL VideoAudio Large' | |
res = et.create_preset(**preset) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment