You can aggregate a collection of images into a Gif or MP4 video file.
For mp4_from_images
- "images" is the array of source images
- "output_size": "1280x480" (Dimensions of output video)
- "framerate_fps": 30 (Framerate in fps)
- "pad": true (If resized, whether to add padding or not)
- "padding_color": "#ffffff" (Color of padding if added)
- "total_frames": 180 (Optional, can define to "loop" a particular number of frames)
Example:
{
"application_id": "YOUR_APP_ID",
"src": "https://s3.amazonaws.com/blitdoc/gifs/1x1.gif",
"src_type": "pre_process_only",
"pre_process": [{
"mp4_from_images": {
"images": [
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0000.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0001.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0002.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0003.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0004.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0005.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0006.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0007.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0008.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0009.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0010.png",
"https://s3.amazonaws.com/blitdoc/pngs/animation/out0011.png"
],
"output_size": "1280x480",
"framerate_fps": 30,
"pad": true,
"padding_color": "#ffffff",
"total_frames": 180,
"s3_destination": {
"bucket": "YOUR_BUCKET",
"key": "YOUR_KEY.mp4"
}
}
}
]}
For gif_from_images
- "images" is the array of source images
- "delay" is the milliseconds between frames
- "autosharpen" is whether to autosharpen the images (if resized)
Example:
{
"application_id": "YOUR_APP_ID",
"src": "https://s3.amazonaws.com/blitdoc/gifs/1x1.gif",
"src_type": "pre_process_only",
"pre_process": [{
"gif_from_images": {
"images" : [
"http://pngimg.com/uploads/number1/number1_PNG14896.png?i=1",
"https://www.astrogle.com/images/2014/09/number-23.png",
"https://cdn.thinglink.me/api/image/652842870016835586/1240/10/scaletowidth"
],
"output_size" : "200x200",
"delay" : 500,
"autosharpen" : true,
"s3_destination": {
"bucket": "YOUR_BUCKET",
"key": "YOUR_KEY.gif"
}
}
]}