scale the coordinates and size of the crop square by the downloaded video size and viewport size, crop by that size, then scale the output png to the size of the crop square from the viewport
scale the coordinates and size of the crop square by the downloaded video size and viewport size, crop by that size, then scale the output png to the size of the crop square from the viewport

Stantheman/youtube-gif-go