ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.26k stars 626 forks source link

The playback is rotated on some apple devices. #5044

Closed Mohit-3196 closed 1 year ago

Mohit-3196 commented 1 year ago

Short description

When publishing a stream from iPad and watching the stream, the playback is rotated upside down.

Environment

Steps to reproduce

  1. Publish a WebRTC stream from the sample WebRTC publish page with the mentioned device.
  2. Play the stream from the sample WebRTC player page.

Expected behavior

The stream should play without any rotation.

Actual behavior

The stream is rotated when playing.

ipad camera issue 001

Join community.antmedia.io and be a part of Ant Media Server Community.

Mohit-3196 commented 1 year ago

P.S. I tried with iPad 11 Pro but couldn't reproduce the issue.

lancerlink commented 1 year ago

I conducted several tests to determine the cause of the issue. As a result, the problem has been resolved. I went to antmedia of the live-demo site IMG_2421

The HLS Player-Low latency Playing is flipping up and down.

I checked my AMSEE WEB Panel settings. IMG_2422

Enable Low Latency DASH Streaming (CMAF) and Low Enable Latency HLS Streaming (CMAF) were selected. Adaptive Streaming was not selected.

  1. As a solution, when Enable Low Latency DASH Streaming (CMAF) or Enable Low Latency HLS Streaming (CMAF) was selected, selecting and enabling one of the video resolutions for Adaptive Streaming Enable Low Latency DLS Streaming (CMAF) is checked.
  2. Also, when either Enable Low Latency DASH Streaming (CMAF) or Enable Low Latency HLS Streaming (CMAF) is selected or when either one of them is selected, if Adaptive Streaming is not enabled, the Vertical inversion will occur.
  3. If Enable Low Latency DASH Streaming (CMAF) or Enable Low Latency HLS Streaming (CMAF) is not selected, this up/down reversal will not occur. In that case, the Adaptive Streaming setting is also irrelevant.
  4. This problem seems to be limited to the front camera on iOS and iPadOS. The rear camera works fine regardless of any of the settings.
  5. It works fine only on other OS (windows, MacOSX, ubuntu, Android). Also, the web browser seems to be irrelevant.
  6. I have not confirmed from which version of iOS this phenomenon occurs.

If you believe that this solution is incorrect or if you have any other suggestions, please let me know.

Mohit-3196 commented 1 year ago

Hi @lancerlink , Thank you for making these detailed observations here. Using transcoding/adaptive streaming seems to resolve the problem in this case as a workaround/quick solution.

Please let me know if I have missed anything.

Thank you

Mohit-3196 commented 1 year ago

Hi @lancerlink , This is an expected/known issue and an Adaptive setting resolves it. So I'm closing this issue for now. In case anything I have missed anything, please let me know.

Thank you