There are no api in Android cameraX API support 1:1 ratio for video size.There code below can not support this.
androidx.camera.video.recorder
Recorder.Builder().setAspectRatio()
Furthermore,I found the following api.
androidx.camera.video.VideoCapture
@RestrictTo(Scope.LIBRARY_GROUP)
@Override
public @NonNull Builder<T> setTargetAspectRatio(@AspectRatio.Ratio int aspectRatio) {
throw new UnsupportedOperationException("setTargetAspectRatio is not supported.");
}
But this cannot be used. I just want to implement 1:1 ratio for video size via Android cameraX API.Can you do me a favor?