If you run VideoPlayer multiple times, error 0xc00d36b4 appears

If you insert a video from an external folder of the Unity build program into VideoPlayer as a URL and run it, it runs normally at first.
If you change the video multiple times and run it, an error occurs at some point where the video does not play.

Videos that do not play are videos that previously played normally.

check Player-prev.log in C:\Users\user\AppData\LocalLow\Project\Mirror,
following message:

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 29117.
Total: 8.423300 ms (FindLiveObjects: 2.634300 ms CreateObjectMapping: 0.282900 ms MarkObjects: 5.385100 ms  DeleteObjects: 0.119700 ms)


WindowsVideoMedia error 0x80070057 while reading C:/Users/user/Documents/Video/MO_1.mp4

Context: IMFSourceReader::WaitForSample in ReadSample
Error details: <Empty>
Track types:
   Unreadable Track
VideoPlayer_ErrorPointReached : VideoPlayer cannot play url : C:/Users/user/Documents/Video/MO_1.mp4

Unexpected error code (10).

VideoPlayer_ErrorPointReached part is the message output after connecting to VideoPlayer’s errorReceived event handler.

Unity version is 2022.3.15f1
The video file is .mp4
codec is
Video: h.264
Audio: aac

The first error occurs when you try to play a video after the video has been prepared.

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 29117.
Total: 9.205300 ms (FindLiveObjects: 2.682100 ms CreateObjectMapping: 0.288800 ms MarkObjects: 6.110500 ms  DeleteObjects: 0.123200 ms)

Video isPrepared
Video Prepared enabled : True
Video Prepared frame : -1
Video Prepared frameCount : 2190
Video Prepared frameRate : 30
Video Prepared isPaused : False
Video Prepared isPlaying : False
Video Prepared isPrepared : True
Video Prepared length : 73
Video Prepared playbackSpeed : 1
Video Prepared skipOnDrop : True
Video Prepared tag : Untagged
Video Prepared time : 0
Video Prepared url : C:/Users/user/Documents/Video/MO_1.mp4
Video Prepared waitForFirstFrame : True
Video Play
Video Playing
WindowsVideoMedia error 0x80070057 while reading C:/Users/user/Documents/Video/MO_1.mp4

Context: IMFSourceReader::WaitForSample in ReadSample
Error details: <Empty>
Track types:
   Unreadable Track
VideoPlayer_ErrorPointReached : VideoPlayer cannot play url : C:/Users/user/Documents/Video/MO_1.mp4

Unexpected error code (10).

I really want to solve this problem.
Thanks for the help!

Then fix the errors. That’s what software engineers DO.

The complete error message contains everything you need to know to fix the error yourself.

The important parts of the error message are:

  • the description of the error itself (google this; you are NEVER the first one!)
  • the file it occurred in (critical!)
  • the line number and character position (the two numbers in parentheses)
  • also possibly useful is the stack trace (all the lines of text in the lower console window)

Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.

All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don’t have to stop your progress and fiddle around with the forum.