Search Issue Tracker
By Design
Votes
0
Found in
2022.3.36f1
6000.0.9f1
Issue ID
UUM-75345
Regression
Yes
[Android] VideoPlayer does not resume playing when the app has recovered after lagging
Steps to reproduce:
1. Open the attached “builds” project
2. Build And Run the project on the device
3. Press the “Increase” button 2 times
4. Press the “Reduce” button 2 times
Expected result: The video plays again after stalling
Actual result: The video doesn’t play after stalling
Reproducible with: 2022.1.0a10, 2022.3.36f1, 6000.0.9f1
Not reproducible with: 2022.1.0a1, 2022.1.0a9
Could not test with: 2021.3.40f1 (the Player crashes on Vulkan)
Testing environment: macOS Sonoma 14.5 (Intel), macOS 14.5 (M1) (by user)
Not reproducible on: No other environment tested
Reproducible with these devices:
Redmi K60 Ultra (by user)
Redmi Note 11 Pro (by user)
VLNQA00334 - Xiaomi Mi A3 (Mi A3), CPU: Snapdragon 665 SM6125, GPU: Adreno 610, OS: 11
Not reproducible with these devices:
VLNQA00460 - Google Pixel 6 (Pixel 6), CPU: Google Tensor (Whitechapel), GPU: Mali-G78, OS: 14
VLNQA00567 - Xiaomi Redmi Note 8 Pro (Redmi Note 8 Pro), CPU: MediaTek Helios G90T MT6785T, GPU: Mali-G76 MC4, OS: 9
VLNQA00391 - Xiaomi Redmi 9A (M2006C3LG), CPU: MediaTek Helio G25 (MT6762G), GPU: PowerVR Rogue GE8320, OS: 10
Notes:
- Sometimes it takes a few tries to reproduce the issue
- Sometimes the VideoPlayer shows only a green color after pressing the “Reduce” button on reproducible devices
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Resolution Note:
Based on Dominique suggestion, we have identified two options to address the keyframe issue observed in the video file:
Option 1: Re-encode the Video with More Keyframes
Problem: The current video has a keyframe every 6.25 seconds, which is insufficient for the "skip-on-drop" feature to work effectively. This can cause the VideoPlayer to struggle with skipping ahead when the engine's main loop falls behind the video frame rate, leading to poor performance on less powerful devices.
user can use this command to validate their video using the ffprobe
command-line tool from the ffmpeg suite
ffprobe -hide_banner -show_packets -select_streams v IN-78356_buildsFAV/Assets/StreamingAssets/LoginVideo.mp4 2> /dev/null | grep flags= | nl -v 0 | grep K
Solution: Re-encode the video with more frequent keyframes to improve skip-ahead performance.
Use the following command:
ffmpeg -i IN-78356_buildsFAV/Assets/StreamingAssets/LoginVideo.mp4 -c:a copy -c:v libx264 -x264opts keyint=24:no-scenecut -profile main -b:v 2.5M -maxrate 6M -bufsize 1M -y LoginVideoOneKFPerSecond.mp4
Since the digital conversions are lossy it is recommended do it from the user's end with original source file.
https://en.wikipedia.org/wiki/Generation_loss
Option 2: Disable Skip-on-Drop
Alternative: If the synchronization impact is manageable, you can disable the "skip-on-drop" feature. This may result in less precise video-to-animation and audio-to-video synchronization but can avoid the issues related to inadequate keyframe frequency.
User should choose the option that best aligns with their performance and synchronization requirements. Thanks
Please refer to the slack conversation: https://unity.slack.com/archives/C0105CH72UV/p1721042421826179