Server Version#: 1.32.3.7162 (Synology DS720+, 10GB RAM, Plex Pass, HW Transcoding ON)
Player Version#: iOS Plex App 8.20
Hello everybody. I’m having an issue with the Plex mobile app. On iOS, while watching contents when the Automatically Adjust Quality setting is on, after some time (whenever there’s a quality change), the video will freeze, but the audio will keep playing. I’m getting this especially on remote networks (since they are more subject to network condition changes).
The thing is, if I use Plex Web instead of the app, on the same video, the same device, and the same network, the quality switching works perfectly, so I think I’m right to assume that it’s a Plex iOS App thing.
To test this, I did the following:
- Switched to mobile network and opened the Plex App
- Turned on “Automatically Adjust Quality”, and set the Remote Streaming Quality to its minimum setting (so that it would be more likely to change quality sooner)
- Started playback of something and waited
Tonight, I went ahead and specifically looked for this bug, 'cause I wanted to collect the logs to post here.
Below here, you have me going through the logs:
On the iOS App, I start the playback, and the server sees that the max bandwidth is 320kbps (as I set it) (PMS Logs):
Jun 08, 2023 20:31:22.455 [139631818902328] DEBUG - [Req#12c9bc/Transcode] Streaming Resource: Calculated bandwidth of 4672kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 320kbps
Then, the server issues a quality change (PMS Logs):
Jun 08, 2023 20:31:38.742 [139631896369976] DEBUG - [Req#12cc14/Transcode/E71BE25C-A449-4ECC-809E-041773E278DD] Streaming Resource: Reducing playback quality for 19047kbps stream bitrate: video resolution to 1920x1080, quality to 85
And, after about 30 seconds, on the iOS App, you have the error (iOS App Logs):
2023/06/08 22:32:05.873 (136 MB) (235138) ❌ PMKAVQueuePlayer.m:118 | New error log entry: <AVPlayerItemErrorLogEvent:0x2837db060 date=2023-06-08 20:32:05 +0000 URI=https://188-217-76-167.056714736999471889c7dbac8af30179.plex.direct:61481/video/:/transcode/universal/session/E71BE25C-A449-4ECC-809E-041773E278DD/base/00398.ts serverAddress=188.217.76.167 playbackSessionID=167B3003-41C0-43B3-9853-094EE8B2CBA0 errorStatusCode=-16830 errorDomain=CoreMediaErrorDomain errorComment=Media file not received in 6s>
At the same time, the video freezes (and it never restarts, I let it run for minutes, the only way is to close the playback and restart it)
Seconds later, you even have this on the iOS App (iOS App Logs):
2023/06/08 22:32:39.933 (129 MB) (235138) ➖ PMKAVQueuePlayer.m:101 | Current item did stall
2023/06/08 22:32:39.933 (129 MB) (235138) ➖ PMKVideoPlaybackEngine.m:1926 | Video playback did stall
2023/06/08 22:32:39.933 (129 MB) (235138) ➖ PMKPlaybackEngine.m:493 | <PMKVideoPlaybackEngine: 0x10682a960> did stall
2023/06/08 22:32:39.933 (129 MB) (235138) 🔧 PMMediaPlayerBufferUnderflowManager.m:216 | New state - buffering
2023/06/08 22:32:39.933 (129 MB) (235138) 🔧 PMMediaPlayerBufferUnderflowManager.m:44 | Creating buffer timer
The issue seems related to the playback with AVFoundation’s AVQueuePlayer, and the error is visibile only if you turn “verbose logging” ON on the app.
I’m not the only one having this issue, as you can see e.g. from this link:
I tried various settings, both on the app and on the server, (use Old Video Player, Turn on/off HW Transcoding), but nothing. I’ve even tried reinstalling the app, both on my iPhone XR and my iPad Pro, but the issue is still present in both devices.
I can easily reproduce this issue, so I’d be glad to be of any help to fix this issue, because at the current state it makes using Automatically Adjust Quality impossible (it freezes every time).
To my knowledge, it seems that the “handoff” between the old quality and the new one on the app’s AVPlayer is not handled correctly: the player seems to stick to the old quality, looking for video chunks it’ll never get (because the server is now sending the new quality), and freezing, instead of resetting the player and actually switching to the new quality.
I’ll leave the logs here, both for the server and the app.
Plex Media Server Logs_2023-06-08_20-35-52.zip (5.3 MB)
PlexDebugInfo-belgio99-8.20-6066 (2023-06-08 22.33.41 +0200).zip (1.7 MB)
Thank you so much in advance! Hope you can catch this nasty bug!