UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG] Odd-numbered encoding sizes cannot be decoded on iOS device
Describe the bug Setting the streaming size to e.g. 750x750 produces artifacts when decoded, whereas 1024x1024 or 512x512 do not. The reason 750 is a significant number is that it is the actual display pixel width of an iPhone 6-8 device.
Take a look at this list for all the iOS devices whose browsers or displays report odd numbered sizes: https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html
I was using software rendering because hardware rendering has motion artifacts.
To Reproduce Steps to reproduce the behavior:
- Set rendering size to 750x750.
- Disable hardware encoding.
- Visit the page on an iOS device.
- Observe an incorrectly decoded image of sideways stripes.
Expected behavior The video stream should decode fine at any size.
Environment (please complete the following information):
- OS: iOS 14, Windows 10
- Browser: Mobile Safari
- Unity Version: 2020.1
- Package version: afda2fe376e32ad3c379186b6791f55e5e0d7978 (before WebRTC 2.2.1)
WebRTC 2.2.1 is showing other issues so I reverted to an earlier build. I believe all versions of WebRTC have this issue, but I haven't yet tested.
This reproduces in com.unity.webrtc
2.3.1.
Sure. We will check it. Thanks
The software codec appears to fail in NPOT sizes.
memo: WRS-162
To clarify, it appears to be that iOS only decodes software (VP8) with horizontal multiples of 64.
@doctorpangloss Thank you for clarifying the problem We will confirm it in the next development.
This issue would be fixed for the PR in WebRTC package. https://github.com/Unity-Technologies/com.unity.webrtc/pull/843