Skip to content

Instantly share code, notes, and snippets.

@gianu
Last active June 23, 2021 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gianu/600d58e45fcd162bab041674efe96e22 to your computer and use it in GitHub Desktop.
Save gianu/600d58e45fcd162bab041674efe96e22 to your computer and use it in GitHub Desktop.
How to generate a thumbnail from an S3 video using MediaMachine.io
# This command will generate a thumbnail from a video on S3 and put that thumbnail on an S3 bucket.
# The service we're using here is https://mediamachine.io
curl --request POST \
--url https://api.mediamachine.io/thumbnail \
--header 'Content-Type: application/json' \
--data '{
"inputCreds": {
"region": "us-east-2",
"accessKeyId": "<AWS_ACCESS_KEY>",
"secretAccessKey": "<AWS_SECRET_ACCESS_KEY>"
},
"outputCreds": {
"region": "us-east-2",
"accessKeyId": "<AWS_ACCESS_KEY>",
"secretAccessKey": "<AWS_SECRET_ACCESS_KEY>"
},
"inputURL": "s3://<BUCKET>/<KEY>",
"outputURL": "s3://<BUCKET>/<KEY>",
"width": "720",
"APIKey": "<MEDIAMACHINE_API_KEY>"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment