Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Some video's stop looping and freeze after certain run time

Discussion in 'Audio & Video' started by mickeyvanolst, Jun 29, 2020.

  1. mickeyvanolst

    mickeyvanolst

    Joined:
    Jun 23, 2020
    Posts:
    2
    Hi there,

    I'm struggeling with understanding whats happening here. I've got a couple of video's on constant loop inside Unity 2019.3.13f1. They work just fine for hours, but over a longer period some video's freeze, I've set them all to the same codec, but it keeps happening. The error I get is the following:

    Code (CSharp):
    1. WindowsVideoMedia error 0xc00d4a3e while reading C:/Users/Administrator/Desktop/JOURNEE/Forest_Data/sharedassets1.resource
    2.  
    3. Context: IMFSourceReader::Flush
    4. Error details: The sample allocator is currently empty, due to outstanding requests.
    5. Track types:
    6.    Unreadable Track
    7. (Filename: C:\buildslave\unity\build\Modules/Video/Public/Media/WindowsMedia/WindowsVideoMedia.cpp Line: 3590)
    Does anyone have any clue what it could be?
     
    chealin likes this.
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi Mickey,

    Are you in a position to try the same scenario with 2019.4? There are a few video-related changes that happened between 2019.3.13f1 and the current latest - 2019.4.1f1 - that could have an impact.

    But it's the first time we hear of this specific issue, so if it still reproduces with the latest 2019.4, then it would be good if you could submit a bug report with a project that reproduces the problem.

    In the mean time, here are a few things you may want to try:
    • Set the VideoPlayer.skipOnDrop to false. The error message you are showing happens during seek operations. There are 2 reasons for seeking in your context: 1) the video has hit the loop point, 2) the video is falling behind compared to the system clock and we're skipping ahead to make up. Setting skipOnDrop to false will eliminate seeks of the 2nd kind.
    • Once in a while (like every 10 loops), you can Stop()/Play() the movie, if the small visual interruption is tolerable. This will make sure that whatever condition builds up over time will be reset.
    • Transcode to VP8 instead of H.264. This will change the playback backend so it uses another code path not affected by this specific situation.
    Hope this helps, and if you do submit a bug, please report its id in this thread so we can help the assigned customer QA with analysis.

    Dominique Leroux
    A/V developer at Unity