UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

[visionOS] Slow Streaming on Apple Vision Pro

Open rrenderr opened this issue 3 months ago • 1 comments

### Unity version

6000.2.2а1

Unity editor platform

macOS

AVPro Video edition

Ultra

AVPro Video version

3.2.7-ultra

Device hardware

Vision Pro

Which visionOS version are you using?

2.2

Application mode

Immersive

Texture format

BGRA

Audio output

System Direct

Any other Media Player component configuration required to reproduce the issue.

No response

Which output component(s) are you using?

Apply to Mesh

Any other component configuration required to reproduce the issue.

No response

The issue

We started testing remote streaming on Apple Vision Pro and noticed that when playing high-resolution videos, playback often freezes for a while. We tested with 8K videos from https://deovr.com/ . The same videos played smoothly without any freezes when using Safari or other players on the device. We also checked the connection speed from the device to the DeoVR CDN, and it was higher than required. We also tried changing the buffer size and download speed settings, but that didn’t help.

We also measured buffering in AVPro when the freeze occurs. It looks like this: var ranges = MediaPlayer.Control.GetBufferedTimes(); if (ranges.Count > 0) { double buffered = ranges[0].EndTime - ranges[0].StartTime; Debug.Log($"{DateTime.Now:HH:mm:ss} >> Buffered: {buffered:F2} sec"); } else { Debug.Log(">> Buffered empty"); } [AVProVideo] Opening https://cdn-vr.deovr.com/full_videos_app/h265/64714_4096p.mp4 (offset 0) with API 12:46:49 >> Buffered: 49.03 sec 12:46:50 >> Buffered: 49.03 sec 12:46:51 >> Buffered: 8.31 sec 12:46:52 >> Buffered: 9.04 sec 12:46:53 >> Buffered: 7.47 sec 12:46:54 >> Buffered: 7.47 sec 12:46:55 >> Buffered: 5.04 sec Focused SettingsButton Updated 12:46:56 >> Buffered: 3.45 sec missing frame for item time {5722224541/1000000000 = 5.722, rounded} 12:46:57 >> Buffered: 0.00 sec 12:46:58 >> Buffered: 1.60 sec 12:46:59 >> Buffered: 1.85 sec 12:47:00 >> Buffered: 1.92 sec Focused MissClickButton 12:47:01 >> Buffered: 2.08 sec 12:47:02 >> Buffered: 2.23 sec 12:47:03 >> Buffered: 0.70 sec 12:47:04 >> Buffered: 0.85 sec 12:47:05 >> Buffered: 1.05 sec 12:47:06 >> Buffered: 1.26 sec 12:47:07 >> Buffered: 1.35 sec 12:47:08 >> Buffered: 1.27 sec 12:47:09 >> Buffered: 0.12 sec 12:47:10 >> Buffered: 0.12 sec 12:47:11 >> Buffered: 0.10 sec 12:47:12 >> Buffered: 1.20 sec 12:47:13 >> Buffered: 1.43 sec 12:47:14 >> Buffered: 1.55 sec 12:47:15 >> Buffered: 1.51 sec 12:47:16 >> Buffered: 1.54 sec 12:47:17 >> Buffered: 2.36 sec 12:47:18 >> Buffered: 1.37 sec 12:47:19 >> Buffered: 1.72 sec 12:47:20 >> Buffered: 1.92 sec 12:47:21 >> Buffered: 1.94 sec 12:47:22 >> Buffered: 1.98 sec 12:47:23 >> Buffered: 1.89 sec 12:47:24 >> Buffered: 0.73 sec 12:47:25 >> Buffered: 0.73 sec 12:47:26 >> Buffered: 1.36 sec 12:47:27 >> Buffered: 2.43 sec 12:47:28 >> Buffered: 3.37 sec 12:47:29 >> Buffered: 3.21 sec 12:47:30 >> Buffered: 3.33 sec 12:47:31 >> Buffered: 4.36 sec 12:47:32 >> Buffered: 5.66 sec 12:47:33 >> Buffered: 6.15 sec 12:47:34 >> Buffered: 6.97 sec 12:47:35 >> Buffered: 8.09 sec 12:47:36 >> Buffered: 9.50 sec 12:47:37 >> Buffered: 11.55 sec 12:47:38 >> Buffered: 0.00 sec 12:47:39 >> Buffered: 2.65 sec 12:47:40 >> Buffered: 2.65 sec 12:47:41 >> Buffered: 3.13 sec

Media information

No response

Log output


rrenderr avatar Sep 12 '25 12:09 rrenderr

We conducted further research and gathered some additional information. We set up an HLS server with the same CDN and added the same videos that were lagging before. Streaming has become much better — now there are no freezes at all, but when launching a video for the first time, it takes a very long time to open, sometimes up to 20 seconds... However, everything else works great!

Sample https://cdn-vr.deovr.com/test_videos/hls/58417_4096p/master.m3u8

We also examined the CDN logs. In the case of problematic streaming, we noticed that AVPro requests many small packets of about 130 KB. In my opinion, these packets are too small for streaming.

rrenderr avatar Sep 15 '25 14:09 rrenderr