Wowza Community

WOWZMediaConfig.FILL_VIEW is not working, it stretch preview instead of cropping

Hello Wowza team,

I want to show camera preview fill screen so I am using WOWZMediaConfig.FILL_VIEW. It should be cropped preview for fill the screen instead of it stretch video.

I have checked your sdk demo as well as playstore application. Both are stretching the camera preview.

I am checking with Huawei P20 Pro. Android 8.0.1 and Samsung SM-G950FD

I am checking with your demo from this link: WowzaMediaSystems/gocoder-sdk-samples-android

I am using wowza GoCoder SDK v1.6.0

It is stretch screenshot of sdk demo from git:

This is original image from default camera:

Please check and help me for sort out this things as I am stuck with it

Hi @Deep Bhavsar,

I was struggling with the same problem for hours and found out that the problem is not related to the phone but to the screen ratio. The camera view’s dimension ratio must be 9:16 to work correctly(regardless the videosize). The easiest way is to use constraint layout with fixed dimensionRatio. “If it’s stupid but it works, it isn’t stupid.” :smiley: