I try in Unity3D using the VideoPlayer component to display a video by URL (from an IP camera). When you connect, you must specify a username and password.

public RawImage image; private VideoPlayer videoPlayer; private VideoSource videoSource; private AudioSource audioSource; private string sourceURL = "http://login:password@192.168.100.108/axis-cgi/mjpg/video.cgi"; void Start () { Application.runInBackground = true; StartCoroutine (playVideo ()); } IEnumerator playVideo () { videoPlayer = gameObject.AddComponent<VideoPlayer> (); audioSource = gameObject.AddComponent<AudioSource> (); videoPlayer.playOnAwake = false; audioSource.playOnAwake = false; audioSource.Pause (); videoPlayer.source = VideoSource.Url; videoPlayer.url = sourceURL; videoPlayer.audioOutputMode = VideoAudioOutputMode.AudioSource; videoPlayer.EnableAudioTrack (0, true); videoPlayer.SetTargetAudioSource (0, audioSource); videoPlayer.Prepare (); WaitForSeconds waitTime = new WaitForSeconds (1); while (!videoPlayer.isPrepared) { yield return waitTime; break; } image.texture = videoPlayer.texture; videoPlayer.Play (); audioSource.Play (); while (videoPlayer.isPlaying) yield return null; } 

I get an error:

 WindowsVideoMedia error 0x80070005 while reading http://login:password@192.168.100.108/axis-cgi/mjpg/video.cgi 

It is possible to connect to the same camera via VLC Player with the same URL. Tell me, please, what is wrong.

    0