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
- UI Toolkit throws warning and fails to clear references when fields are not typed as UnityEngine.Object
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
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.