Can't get Video to appear on Raw Image.

I’m using the Unity Video Player to play a video on a canvas. I believe I set up everything correctly, but the video visuals don’t appear on the Raw Image I’m using to render, but the audio plays just fine.

Here’s my setup:

  1. Made a Render Texture. Set the dimensions.

  2. Create a “Raw Image” object under my canvas. Add the render texture into the texture slot:

  3. Make a empty game object with a Video Player component. Add the render texture to its texture slot:

  4. I have a simple script that has a list of videos in an array. I assigned a video clip to the VideoPlayer, and the instructed it to play:

public class VideoController : MonoBehaviour
{
    [SerializeField] private VideoPlayer mainVideo;
    [SerializeField] private VideoClip[] videos;

    private double[] vidLengths;

    public double[] Video_Lengths
    {
        get { return vidLengths; }
    }

    private void Start()
    {
        vidLengths = new double[] { videos[0].length, videos[1].length, videos[2].length, videos[3].length };
    }

    public void PlayMain()
    {
        mainVideo.clip = videos[0];
        mainVideo.Play();       
    }

    public void StopMain()
    {
        mainVideo.Stop();
    }
}

The video plays, but I only get the audio. I see the Render Texture and the VideoImage, but nothing appears on the actual screen.

Am I doing something wrong?

Thanks in advance.

anyone?

I am getting this warning when I play the vid:

Color primaries 0 is unknown or unsupported by WindowsMediaFoundation. Falling back to default may result in color shift.

Not sure if it has anything to do with the issue.

Problem fixed using Custom Render Texture instead of the normal one. Not sure what the difference was.