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!