Search Issue Tracker
Third Party Issue
Votes
1
Found in
2021.3.34f1
2022.3.17f1
2023.2.4f1
2023.3.0b1
6000.0.0b11
Issue ID
UUM-59771
Regression
No
Video freezes and LoopPointReached is called twice after the first loop of Video Clip playback
Reproduction steps:
1. Open the attached “CommonTest“ project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Enter the Play Mode and wait 10 seconds
4. Observe the Console
Expected result: LoopPointReached error is logged once and the video keeps playing
Actual result: LoopPointReached error is logged twice and the video freezes
Reproducible with: 2021.3.34f1, 2022.3.17f1, 2023.2.4f1, 2023.3.0b1
Reproducible on: Windows 10 (22H2)
Not reproducible on: No other environment tested
Note: Using 2021.3.34f1 and 2023.2.4f1 video didn’t freeze, but 2 errors were still logged
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Microsoft's Media Foundation has a mp4 file source implementation that doesn't support well the distinction between presentation and decode timestamps. When H.264 video content is encoded with so-called B-Frames - present in Main and High profiles - this requires some of the later frames in the stream to be decoded earlier (leading to out-of-order layout in the file). The resulting timestamp offsets and their impact on track duration is incorrectly reported in the API, causing internal issues in end-detection and looping implementation.
We do have some countermeasures to work around these issues, but when they persist, the best approach is to encode with the Baseline H.264 profile, which doesn't use B-Frames. The consequence is that the video will be less compact but also has the advantage of taking less computing resources for decoding.