I’m getting some ugly pixelation if I downscale an image too much. (see the headshot in this screengrab) . The original image is 1200x1200 pixels. are there any recommendations? It scales correctly in premiere.
In scenarios like this, I would recommend resizing and cropping you assets to the exact size you want them in the video. Then in the edit JSON set the clip fit type to none
, so it maintains the original size and does not do any scaling.
You can use our Ingest API to handle the ingest/upload and storage of your assets and create a resized rendition that is the correct size and if needed, cropped to a square shape too.
Here’s the docs for the Ingest API: Ingest and Transform Source Footage | Shotstack Documentation, and an example API call:
POST https://api.shotstack.io/ingest/{{ENV}}/sources
{
"url": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/images/wave-barrel.jpg",
"outputs": {
"renditions": [
{
"format": "jpg",
"size": {
"width": 200,
"height": 200
},
"fit": "crop"
}
]
}
}
Here is the original image:
Run a GET https://api.shotstack.io/ingest/{{ENV}}/sources/{{SOURCE_ID}} to get the status, it should look like this:
{
"data": {
"type": "source",
"id": "zzy7thog-0ozy-bv14-hrag-2tnqyo4ds7g5",
"attributes": {
"id": "zzy7thog-0ozy-bv14-hrag-2tnqyo4ds7g5",
"owner": "lu8ta6o0i8",
"input": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/images/wave-barrel.jpg",
"source": "https://shotstack-ingest-api-dev-sources.s3.ap-southeast-2.amazonaws.com/lu8ta6o0i8/zzy7thog-0ozy-bv14-hrag-2tnqyo4ds7g5/source.jpg",
"status": "ready",
"outputs": {
"renditions": [
{
"id": "zzy7thoe-1lsr-420l-hkaj-00uidc3anfbl",
"status": "ready",
"url": "https://shotstack-ingest-api-dev-renditions.s3.ap-southeast-2.amazonaws.com/lu8ta6o0i8/zzy7thog-0ozy-bv14-hrag-2tnqyo4ds7g5/zzy7thoe-1lsr-420l-hkaj-00uidc3anfbl.jpg",
"executionTime": 246.08,
"transformation": {
"format": "jpg",
"size": {
"width": 200,
"height": 200
},
"fit": "crop"
},
"width": 200,
"height": 200
}
]
},
"width": 1920,
"height": 1079,
"created": "2024-05-12T23:27:29.453Z",
"updated": "2024-05-12T23:27:36.588Z"
}
}
}
You can see the resized image in the renditions array. The resized image looks like this:
You can now use the URL in your edit.