Video Player from URL / Render Texture Size

Hi, in the docs it is recommended to match the target rendertexture's size to that of the video's resolution. However, if you choose a url source as opposed to a videoclip source, there is no way to extract the resolution information using Unity's APIs. Also there seems to be no way to create a video clip dynamically from a filepath, as that would also solve my problem as VideoClip exposes the dimensions. If I am wrong about any of this, or you have any suggestions please let me know as I don't want to include external libraries or binaries just to get video resolution...

I'm having the same issue. The only workarround I found so far is:
- Prepare the video
- Get the size from the internal texture (videoplayer.texture.width/height) on prepareCompleted
- Create a new render texture
- Assign render texture to videoplayer and material

It's not really a neat solution as it involves starting the player, but this is the only time the information is available it seems to me.
It abuses the fact that the videoplayer has a buffer texture that is the correct size, but this is only created after the player starts.

Maybe there is a way to get meta info from a file someway, but I have yet to find it.

If i dynamicaly load an url for a videoplayer on mac it works correctly but when build and play on iphone i receive this error, anyone had the same error and know how to fix?

  • CredStore - performQuery - Error copying matching creds. Error=-25300, query={ class = inet; "m_Limit" = "m_LimitAll"; "r_Attributes" = 1; sync = syna; }

This is the function:

public void WI_PlayVideo(string target, string video)
         MyVideo = GameObject.Find(target).GetComponent<VideoPlayer>();
         if (MyVideo == null)
             Debug.Log("player non trovato");
             //here there's the file name that is public whithout credential request
             MyVideo.url = "" + video;