You can create an codec configuration, that will keep the aspect ratio of the original video by just omitting either the width or the height when you create it. Doing so, our service will maintain the aspect ratio of your input file, and calculate the omitted value based on that.
In the following an example for an encoding profile that will keep aspect ratio:
**Open API SDK Java Example - Create an H264 Codec Configuration that maintains the aspect ratio:**
This example is based on our [Open API SDK for Java](🔗), which is available on Github. Please see our [Open API SDK overview](🔗) for all our supported programming languages, and our [GH API SDK Example Repository](🔗) for further examples.