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 Windows 10 - Direct3D 11 - Error playing MP4 with Standalone

Discussion in 'Audio & Video' started by jsaade-gc, Jan 17, 2022.

  1. jsaade-gc

    jsaade-gc

    Joined:
    Apr 6, 2021
    Posts:
    11
    Standalone Windows 10 build does not show MP4 video on some windows machines.
    The video is in the Assets Folder, using VideoPlayer on a gameobject.
    The same result wether using rendertexture or camera targets

    Errors in Player.log:

    Code (CSharp):
    1. D3D11 device created for Microsoft Media Foundation video decoding.
    2. <RI> Initializing input.
    3. XInput1_3.dll not found. Trying XInput9_1_0.dll instead...
    4. <RI> Input initialized.
    5. <RI> Initialized touch support.
    6. UnloadTime: 0.980900 ms
    7. WindowsVideoMedia error 0x80004004 while reading F:/***/build/video-player_Data/sharedassets0.resource
    8. Context: WindowsVideoMedia::DiscardSamples ReadSample
    9. Error details: Operation aborted
    10. Track types:
    11.    Audio Track, type: %10%16
    12.    Video Track [480 x 270], type: H264
    I have tried on several machines, it works on some but not on others.
    If I force OpenGLES3 renderer, it works but there seems to be a loss in quality of the video.
     
  2. xwmeteor

    xwmeteor

    Joined:
    Jul 26, 2019
    Posts:
    3
    yes, my user get a same bug.

    Code (CSharp):
    1. Initialize engine version: 2020.3.22f1c1 (9ee66e5289da)
    2. ......
    3. GfxDevice: creating device client; threaded=1
    4. Direct3D:
    5.     Version:  Direct3D 11.0 [level 11.1]
    6.     Renderer: AMD Radeon (TM) 530 (ID=0x6900)
    7.     Vendor:  
    8.     VRAM:     2039 MB
    9.     Driver:   21.19.384.0
    10. <RI> Initializing input.
    11. <RI> Input initialized.
    12. D3D11 device created for Microsoft Media Foundation video decoding.
    13. <RI> Initialized touch support.
    14. ......
    15. ......
    16. WindowsVideoMedia error 0x80004004 while reading E:/......
    17. Context: WindowsVideoMedia::DiscardSamples ReadSample
    18. Error details: <Empty>
    19. Track types:
    20.    Audio Track, type: %10%16
    21.    Video Track [1920 x 1080], type: H264
    22. AudioSampleProvider buffer overflow. 194688 sample frames discarded.
    23. Setting up 2 worker threads for Enlighten.
    24.   Thread -> id: 18d0 -> priority: 1
    25.   Thread -> id: 1258 -> priority: 1
     
  3. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Hi! There have been some issues with some AMD GPUs and the VideoPlayer. There is a high chance you have the same problem, but the fix has not yet landed in every Unity version. The first thing I would recommend is to update your GPU driver to the latest. After that, if you still have an issue, I would open a bug report, and whenever the fix lands, try it out. If it still doesn't solve your problem, we will investigate further.
     
  4. xwmeteor

    xwmeteor

    Joined:
    Jul 26, 2019
    Posts:
    3
    ok.
    Can you tell me which versions have been repaired, please. I try update the unity version.
     
  5. xwmeteor

    xwmeteor

    Joined:
    Jul 26, 2019
    Posts:
    3
    I told the user to update the driver, That error is gone, but get the new error:

    Got null handle from IDXGIResource::GetSharedHandle.
     
  6. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Yeah, we were getting this error. For now, you can get the fix in 2022.1, and we are working on backporting it to 2019, 2020, and 2021.