# WowzaPlayerView break the aspect ratio of the video when using HLS

**URL:** https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783
**Category:** Wowza GoCoder SDK
**Created:** [March 10, 2020, 4:21pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783 "2020-03-10T16:21:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Ly\_Finik](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Ly\_Finik](https://community.wowza.com/u/Ly_Finik)
#### Post date: [March 10, 2020, 4:21pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/1 "2020-03-10T16:21:27Z")

</div>

When I use HLS to play live stream with WowzaPlayerview, it seem like the video ratio is broken. It doesn’t keep ratio to the same as we stream from obs

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [March 10, 2020, 4:31pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/2 "2020-03-10T16:31:42Z")

</div>

It will only support the ratio supported by the actual iOS device. They vary actually so you need to check what the device supports. We have seen this come up a few times before with all the new Apple devices being released all the time. They all have their own settings they support and it’s not the same across the platform unfortunately.

You’ll need to check the common ratios most devices support and match it up in OBS.

---

<div class="post-metadata">

### Author: ![Ly\_Finik](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Ly\_Finik](https://community.wowza.com/u/Ly_Finik)
#### Post date: [March 11, 2020, 1:47am UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/3 "2020-03-11T01:47:01Z")

</div>

Thanks for your answer. But actually It also happened in android devices.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [March 11, 2020, 1:57pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/4 "2020-03-11T13:57:00Z")

</div>

Ok that’s good feedback and helps actually to look somewhere else. Are you changing the orientation of the camera at all during the stream from portrait to landscape for example?

The reason I ask is the stream metadata such as aspectRatio is usually sent during the initial connection with the streaming server. The problem with mobile device encoders though is that the aspectRatio can change mid-stream (such as when a user switches from portrait to landscape).

Are you streaming vertical or horizontal through entire stream? Its very difficult to debug these things in a forum so we need you to share more info on the workflow and what is happening. Thanks.

Are you seeing the black bars on the side during video playback @Ly Finik?

---

<div class="post-metadata">

### Author: ![Ly\_Finik](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Ly\_Finik](https://community.wowza.com/u/Ly_Finik)
#### Post date: [March 11, 2020, 6:00pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/5 "2020-03-11T18:00:04Z")

</div>

OK. Let me recap. Now my issue is when I use Gocoder WowzaPlayerview to play live stream with wowza cloud ([https://cdn3.wowza.com/1/SVV5MjRXYXhUQ1ZF/UnRaMzAv/hls/live/playlist.m3u8](https://cdn3.wowza.com/1/SVV5MjRXYXhUQ1ZF/UnRaMzAv/hls/live/playlist.m3u8)), I face with a problem that aspect ratio in Gocoder WowzaPlayerview is different from OBS. OBS configuration: Base (Canvas) Resolution: 1920x1080 Output (Scaled) Resolution: 1920x1080 In addition, I don’t switches from portrait to landscape during initial connection and I also see the black bars at both left and right side of the screen.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [March 11, 2020, 6:23pm UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/6 "2020-03-11T18:23:12Z")

</div>

Ok, did you try setting it to FILL\_VIEW yet or making any of the adjustments you see here with aspect ratios?

**Android SDK aspect ratio settings:**

[https://www.wowza.com/resources/gocodersdk/docs/1.0/api-docs-android/com/wowza/gocoder/sdk/api/configuration/WZMediaConfig.html](https://www.wowza.com/resources/gocodersdk/docs/1.0/api-docs-android/com/wowza/gocoder/sdk/api/configuration/WZMediaConfig.html)

I’m not sure which SDK you are using so maybe here if you’re using the iOS SDK.

**iOS SDK aspect ratio settings:** (under WowzCameraPreviewGravity )

[https://www.wowza.com/resources/gocodersdk/docs/api-reference-ios/](https://www.wowza.com/resources/gocodersdk/docs/api-reference-ios/)

---

<div class="post-metadata">

### Author: ![Ly\_Finik](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@Ly\_Finik](https://community.wowza.com/u/Ly_Finik)
#### Post date: [March 13, 2020, 2:17am UTC](https://community.wowza.com/t/wowzaplayerview-break-the-aspect-ratio-of-the-video-when-using-hls/54783/7 "2020-03-13T02:17:02Z")

</div>

OK. Actually when I set FILL\_VIEW it just make the video full width but the issue of aspect ratio is still happened. You can see the attachment below:

Portrait:

[https://drive.google.com/open?id=1eQ5K8QQw20zqpljIsphw7BL6sBLGAB2X](https://drive.google.com/open?id=1eQ5K8QQw20zqpljIsphw7BL6sBLGAB2X)

Landscape:

[https://drive.google.com/open?id=1ce6NMs58zlVKjn3Hz-JvmBdoQh6qUA97](https://drive.google.com/open?id=1ce6NMs58zlVKjn3Hz-JvmBdoQh6qUA97)

In addition, I would to know that if I set hlsEnabled to true and add hls url so do I have to add host in WowzaConfig?
