I'm on Unity 2018.1.0b13 trying to play a video from a local server.
I've transcoded the video myself with ffmpeg. This is the encoding of the streams (by running ffmpeg -i v1.mp4
):
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu v420p, 960x540, 1244 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
In the folder of my v1.mp4
file I'm running http-server
so that the file is available at http://127.0.0.1:8080/v1.mp4
In unity I'm trying to play the video via this URL but I keep getting this same error, no matter what codec I try for encoding:
WindowsVideoMedia error 0xc00d36c4 while reading http://127.0.0.1:8080/v1.mp4
Context: MFCreateSourceReaderFromURL
Error details: The byte stream type of the given URL is unsupported.
Track types:
The same video plays ok on Android so I'm guessing it's just Media Foundation that's messing me up, not Unity. Any suggestions on how can I make this work in Unity?
Thanks!
User contributions licensed under CC BY-SA 3.0