Set composition size Comp
For this script to work, your After Effects project should be set up with expressions or responsive settings that allow compositions to adapt dynamically to different resolutions. Ensure that any layers, effects, or assets scale appropriately when the composition size changes.
This script allows you to change the size of the composition and is useful when you need to adjust the resolution during the rendering process. Simply provide the width and/or height of the composition in pixels.
Dynamic composition size
If you want to dynamically change the composition size based on input data, during the render execution, use the width and height options with the Layer management script to control the composition layers accordingly.