reasonForWaitingToPlay: AVPlayerWaitingToMinimizeStallsReason

Hello,

We are currently developing a mobile game using Unreal Engine 5, and we have encountered an issue where a specific video (mp4 format) stops displaying at a particular frame during playback within the game.

The code within Unreal fails at the following point, causing the issue:

CMTime OutputItemTime = [Output itemTimeForHostTime:CACurrentMediaTime()];

if (![Output hasNewPixelBufferForItemTime:OutputItemTime]) { return; }

We have referred to the following Apple documentation:

AVPlayerTimeControlStatus reasonForWaitingToPlay Upon logging, we observed the following:

[2024.08.13-05.18.35:266][429]LogTemp: AMP PlayerItem.status AVPlayerItemStatusReadyToPlay

[2024.08.13-05.18.35:266][429]LogTemp: AMP MediaPlayer.timeControlStatus AVPlayerTimeControlStatusWaitingToPlayAtSpecifiedRate

[2024.08.13-05.18.35:266][429]LogTemp: AMP reasonForWaitingToPlay: AVPlayerWaitingToMinimizeStallsReason

[2024.08.13-05.18.35:266][429]LogTemp: AMP MediaPlayer.rate 1.000000

[2024.08.13-05.18.35:268][430]LogTemp: avf CurrentMediaTime : 455097.836833

[2024.08.13-05.18.35:268][430]LogTemp: avf OutputItemTime: 3.868346

[2024.08.13-05.18.35:268][430]LogTemp: avf Sampler::Tick() fail hasNewPixelBufferForItemTime OutputItemTime: 3.868346

This issue consistently occurs with videos that have the following specifications:

Codec: H.264 Resolution: 1080x608 Bitrate: 7,922,135 bits/sec Duration: 90.17 seconds Frame Rate: 30.0 fps Pixel Format: yuv420p Profile: Main

We would like to inquire about the possible reasons for the playback failure and the recommended MP4 specifications for seamless playback on Apple devices. Specifically, we need guidance on recommended resolution, FPS, profile, level, and bitrate limits.

Your assistance would be greatly appreciated.

reasonForWaitingToPlay: AVPlayerWaitingToMinimizeStallsReason
 
 
Q