Hello, I have a very unique issue. As far as I can tell I’m probably the only person with this exact problem. whenever I attempt to watch a second video in scene . weather it be via YouTube URL or an MP4 file I get the same error (video works on first attempt. After pausing and playing. It fails on the second attempt and any further attempts until I restart unity entirely)
WindowsVideoMedia error 0xc00d36b4 while reading C:/Users/johnb/My project/Assets/Galaga Walkthrough_Gameplay NES HD 1080p.mp4
Context: IMFSourceReader::WaitForSample in StepAllStreams
Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object.
Track types:
Unreadable Track
I’m using an older version of unity since VRchat requires you use unity 4.3 from 2019
Never the less. The issue occurs in game and in unity. while in game I can watch a single video per instance. But anything more and the video breaks. Same exact issue happens within a project while editing a world inside unity
This “unsupported video” nonsense can’t be the issue. Because the video works on the first attempt. But won’t allow a second playing of the same video.
What does it mean by “windows video media” what exactly is this? An application? Because typing that in results in nothing found. I thought it might be referring to windows media player. But that can’t be it. I uninstalled and reinstalled it and no dice.
WindowsVideoMedia is the class that communicates between the Windows Media Foundation and Unity. WindowsVideoMedia error 0xc00d36b4 is a generic way to say the Windows Media Foundation could not open and play the file. Most of the time, it happens because the file has weird settings or is not supported by the foundation.
But in your case, it is a little bit different. If I understand correctly, the foundation was able to play it without any error, but after pausing and resuming, the video would stop (crash, black screen?) and send the error mentioned. Am I right?
Is it happening with every file or just with this one in particular? Can you try this video, for example?
Can you play the file in any other software like VLC or Media Player?
Can you try reproducing the issue with a new empty project?
Are you using the latest 2019.4+ version? If not, try updating it to the latest if you can.
For testing purposes, can you try upgrading your project (keep a backup) to a more recent version (>2021.2)
I downloaded the latest version of unity (Unity 2021.2.16)
and tested my original video as well as the test video you provided me. both times. the video works once you press play. but apon going back to edit. then back to play. i get this error message now
WindowsVideoMedia error 0x887a0005 while reading C:/Users/johnb/My project (2)/Assets/test video.mp4
Context: IMFSourceReader::WaitForSample in StepAllStreams
Error details: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
Track types:
Unreadable Track
this error message is entirely different to the one from earlier.
as far as if im using the latest 2019 version. im not. VRchat is specific in that it uses a precise version. using later versions wont even let you upload to their servers so that rules out that possibility.
Yeah, it looks like an issue with your hardware and Windows Media Foundation. The last thing I would try is updating your drivers to the latest. If this doesn’t work, open a bug report following these steps. We will investigate the issue.
A possible workaround would be to use VP8. It should still work in VR chat, and it may fix your problem. You can use any online converter or FFmpeg to convert your file to VP8. You can try to use the transcode feature in the Editor to transcode to VP8, but it uses Windows Media Foundation. So a high chance to either fail or give a poor result in your case.
The errors are generally from MediaFoundation so maybe you can check their docs. There is also, this cool site that often can find the name from a HEX Code. https://www.magnumdb.com/search?q=0x887a0005
If you can’t find anything. Just open a thread and I can try to help you find the issue. Otherwise, if you get a generic error like the one above unfortunately, you have to check your file setting. On Windows the biggest error is having a H265 file without the 1$ addons from Microsoft.
Thanks for your answer !
My problem is that i cannot plmay mp4 from web.
This comes from my OS ( win7 ) on wich i updated the nvidia driver to the latest.
My app works fine on win10 bus as i still develop on win7, i was wondering what i was missing ( and to be honest i strictly don’t understand all those media things, codecs, formats, etc… )
Is there a ‘basic standard’ thing to install on windows to make simple standard ( audio and video ) things work ?
EDIT: note that the video playback works fine when the file requested is a .webm file
EDIT2: also, the .mp4 file playback works perfectly when the file comes from my hard drive.
Here it is:
General
Complete name : V0000-29092022-540-.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 11.1 MiB
Duration : 3 min 11 s
Overall bit rate : 486 kb/s
Frame rate : 30.000 FPS
Writing application : Lavf58.29.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 5 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 5 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 11 s
Bit rate : 384 kb/s
Width : 960 pixels
Height : 540 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.025
Stream size : 8.71 MiB (79%)
Writing library : x264 core 157
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=17 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=384 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=576 / vbv_bufsize=768 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : 2 / 40 / mp4a-40-2
Duration : 3 min 11 s
Duration_LastFrame : -9 ms
Bit rate mode : Constant
Bit rate : 96.0 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.19 MiB (20%)
Default : Yes
Alternate group : 1
Then i thought i could format the requested URL on my server side with the htaccess file, by detecting appmedias/carcass in the requested URL and transform https to http in the request.
This just don’t work.
Therefore i guess the problem comes from the videoplayer in windows 7 ( note that any http or https URL works in windows 10 )
Any idea to solve this ?
EDIT2: for those wanting to give a try with my files on server, here’s the small unity3D project:
So it seems the web server’s config for https is not supported by the networking layer in Microsoft’s Media Foundation on Windows 7. The error code you’re getting is Windows telling us that something’s not going well at the network level when trying to read the file, which translates to WININET_E_DECODING_FAILED, which is documented to mean “The connection with the server has been reset.”.
Are you able to play this source when you point a web browser to it?
Yes this is the info i found: wininet_decode_fail however i was missing the ‘connection reset’ info…
My first thought was that this came from my win7 codecs…
The strange thing is that the U3D videoplayer use i make in my app was developped on the win7 machine i use !
The point is that i recently updated my nvidia driver. And since then i cannot play those videos from web…
I tried many things with many codecs installers but there was nothing to do…
Yes my videos can be played in opera and firefox with no problems and i can also play big buck bunny videos in unity with http and https…
Hmmm… connection reset ???
lemme try something…
I be back very soon with infos and with answers to your question
Thanks for these additional tests. We can see that even when files are served from other servers - not just yours - there can be problems. Although it’s a bit puzzling when you say
[…] i can also play big buck bunny videos in unity with http and https…
So some mp4 files do play correctly (like big buck bunny), but others (like the ones you created or some from www.file-examples.com) don’t.
It’s starting to look like bug-submission time… The most recent Win7-specific bug fix I can see for video is already integrated in 2022.1.6f1 (it was integrated at 2022.1.0a13 and had to do with reading movies from asset bundles… quite a different area).
You can of course keep trying with more recent versions like 2022.3 or 2023.1/2023.2, but I doubt this will be an actual solution for you unless you’re ready to upgrade.
A completely different approach would be to use the webm file format (with vp8 codec and vorbis audio), like you already found is working. This is a different code path that will not be affected by whatever seems to bother Microsoft Media Foundation in the current situation. But the downside is that in this implementation the file is completely downloaded before playback starts (you may or may not perceive this, depending on connection speed and file size). The other difference is that the decoding is not hardware-accelerated. Again, you may not perceive it depending on resolution and what’s happening in your game while the movie is playing. Furthermore, mp4/h.264 decoding is not hardware-accelerated on Win7, so this is not where you’ll see a difference if any, but it is on Win >=10.
Please let us know when/if you’ve submitted a bug: posting the bug id over here will let us contact our customer QAs quickly to help them with the investigation.